@Experimental public class PingStrategy extends Object implements HealthCheckStrategy
HealthCheckStrategy.Config| Modifier and Type | Field and Description |
|---|---|
static HealthCheckStrategySupplier |
DEFAULT |
| Constructor and Description |
|---|
PingStrategy(RawConnectionFactory connectionFactory) |
PingStrategy(RawConnectionFactory connectionFactory,
HealthCheckStrategy.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any resources used by the health check strategy.
|
HealthStatus |
doHealthCheck(RedisURI endpoint)
Perform the health check for the given endpoint.
|
int |
getDelayInBetweenProbes()
Get the delay (in milliseconds) between retries for failed health checks.
|
int |
getInterval()
Get the interval (in milliseconds) between health checks.
|
int |
getNumProbes()
Get the number of probes for health checks to repeat.
|
ProbingPolicy |
getPolicy()
Get the policy for health checks.
|
int |
getTimeout()
Get the timeout (in milliseconds) for a health check.
|
public static final HealthCheckStrategySupplier DEFAULT
public PingStrategy(RawConnectionFactory connectionFactory)
public PingStrategy(RawConnectionFactory connectionFactory, HealthCheckStrategy.Config config)
public int getInterval()
HealthCheckStrategygetInterval in interface HealthCheckStrategypublic int getTimeout()
HealthCheckStrategygetTimeout in interface HealthCheckStrategypublic int getNumProbes()
HealthCheckStrategygetNumProbes in interface HealthCheckStrategypublic ProbingPolicy getPolicy()
HealthCheckStrategygetPolicy in interface HealthCheckStrategypublic int getDelayInBetweenProbes()
HealthCheckStrategygetDelayInBetweenProbes in interface HealthCheckStrategypublic HealthStatus doHealthCheck(RedisURI endpoint)
HealthCheckStrategydoHealthCheck in interface HealthCheckStrategyendpoint - the endpoint to checkpublic void close()
HealthCheckStrategyclose in interface HealthCheckStrategyclose in interface Closeableclose in interface AutoCloseableCopyright © 2026 lettuce.io. All rights reserved.