@Experimental public interface HealthStatusManager
The health status manager coordinates health checks for multiple endpoints and provides a unified view of their health statuses. It also allows registering listeners to be notified when the health status of any endpoint changes.
The health status manager is responsible for:
| Modifier and Type | Method and Description |
|---|---|
HealthCheck |
add(RedisURI endpoint,
HealthCheckStrategy strategy)
Create and register a health check for the given endpoint.
|
void |
close()
Close the health status manager and stop all health checks.
|
HealthStatus |
getHealthStatus(RedisURI endpoint)
Get the health status for the given endpoint.
|
long |
getMaxWaitFor(RedisURI endpoint)
Get the maximum wait time for the health check to complete.
|
void |
registerListener(HealthStatusListener listener)
Register a global listener to be notified when the health status of any endpoint changes.
|
void |
registerListener(RedisURI endpoint,
HealthStatusListener listener)
Register a listener to be notified when the health status of the given endpoint changes.
|
void |
remove(RedisURI endpoint)
Unregister the health check for the given endpoint.
|
void |
unregisterListener(HealthStatusListener listener)
Unregister a previously registered global listener.
|
void |
unregisterListener(RedisURI endpoint,
HealthStatusListener listener)
Unregister a previously registered listener for the given endpoint.
|
HealthCheck add(RedisURI endpoint, HealthCheckStrategy strategy)
endpoint - the endpoint to checkstrategy - the health check strategyvoid remove(RedisURI endpoint)
endpoint - the endpoint to checkHealthStatus getHealthStatus(RedisURI endpoint)
endpoint - the endpoint to checkvoid registerListener(HealthStatusListener listener)
listener - the listener to add, must not be nullvoid unregisterListener(HealthStatusListener listener)
listener - the listener to remove, must not be nullvoid registerListener(RedisURI endpoint, HealthStatusListener listener)
endpoint - the endpoint to checklistener - the listener to add, must not be nullvoid unregisterListener(RedisURI endpoint, HealthStatusListener listener)
endpoint - the endpoint to checklistener - the listener to remove, must not be nulllong getMaxWaitFor(RedisURI endpoint)
endpoint - the endpoint to checkvoid close()
Copyright © 2026 lettuce.io. All rights reserved.