Package io.stargate.sdk.grpc
Class ServiceGrpc
java.lang.Object
io.stargate.sdk.Service
io.stargate.sdk.grpc.ServiceGrpc
public class ServiceGrpc
extends io.stargate.sdk.Service
Implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longKeep Alive.protected TimeUnitKeep Alive.protected intRetries.protected booleanSecured transport.Fields inherited from class io.stargate.sdk.Service
endpoint, healthCheckEndpoint, id -
Constructor Summary
ConstructorsConstructorDescriptionServiceGrpc(String id, String endpoint, String healthCheckEndpoint) Constructor.ServiceGrpc(String id, String endpoint, String healthCheckEndpoint, boolean securedTransport) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionio.grpc.ManagedChannelGets channelbooleanisAlive()Check that a service is alive.voidsetKeepAliveTimeout(long keepAliveTimeout) Set value for keepAliveTimeoutvoidsetKeepAliveTimeoutUnit(TimeUnit keepAliveTimeoutUnit) Set value for keepAliveTimeoutUnitvoidsetMaxRetries(int maxRetries) Set value for maxRetriesMethods inherited from class io.stargate.sdk.Service
getEndpoint, getHealthCheckEndpoint, getId, setEndpoint, setHealthCheckEndpoint, setId
-
Field Details
-
securedTransport
protected boolean securedTransportSecured transport. -
maxRetries
protected int maxRetriesRetries. -
keepAliveTimeout
protected long keepAliveTimeoutKeep Alive. -
keepAliveTimeoutUnit
Keep Alive.
-
-
Constructor Details
-
ServiceGrpc
Constructor.- Parameters:
id- identifierendpoint- endpointhealthCheckEndpoint- health check
-
ServiceGrpc
public ServiceGrpc(String id, String endpoint, String healthCheckEndpoint, boolean securedTransport) Constructor.- Parameters:
id- identifierendpoint- endpointhealthCheckEndpoint- health checksecuredTransport- s
-
-
Method Details
-
isAlive
public boolean isAlive()Check that a service is alive.- Specified by:
isAlivein classio.stargate.sdk.Service- Returns:
- validate that the current service is alive
-
setMaxRetries
public void setMaxRetries(int maxRetries) Set value for maxRetries- Parameters:
maxRetries- new value for maxRetries
-
setKeepAliveTimeout
public void setKeepAliveTimeout(long keepAliveTimeout) Set value for keepAliveTimeout- Parameters:
keepAliveTimeout- new value for keepAliveTimeout
-
setKeepAliveTimeoutUnit
Set value for keepAliveTimeoutUnit- Parameters:
keepAliveTimeoutUnit- new value for keepAliveTimeoutUnit
-
getChannel
public io.grpc.ManagedChannel getChannel()Gets channel- Returns:
- value of channel
-