Interface HealthCheckerContext
public interface HealthCheckerContext
Provides the properties and operations required for sending health check requests.
-
Method Summary
Modifier and TypeMethodDescriptionReturns theClientOptions
of theClient
that sends health check requests.endpoint()
Returns theEndpoint
to send health check requests to.executor()
Returns theScheduledExecutorService
which is used for scheduling the tasks related with sending health check requests.long
Returns the delay for the next health check request in milliseconds.protocol()
Returns theSessionProtocol
to be used when sending health check requests.void
updateHealth(double health)
Updates the health of theEndpoint
being checked.
-
Method Details
-
endpoint
Endpoint endpoint()Returns theEndpoint
to send health check requests to. -
protocol
SessionProtocol protocol()Returns theSessionProtocol
to be used when sending health check requests. -
clientOptions
ClientOptions clientOptions()Returns theClientOptions
of theClient
that sends health check requests. -
executor
ScheduledExecutorService executor()Returns theScheduledExecutorService
which is used for scheduling the tasks related with sending health check requests. Note that theScheduledExecutorService
returned by this method cannot be shut down; callingExecutorService.shutdown()
orExecutorService.shutdownNow()
will trigger anUnsupportedOperationException
. -
nextDelayMillis
long nextDelayMillis()Returns the delay for the next health check request in milliseconds. -
updateHealth
void updateHealth(double health)Updates the health of theEndpoint
being checked.
-