public class PingStrategy extends java.lang.Object implements HealthCheckStrategy
HealthCheckStrategy.Config| Modifier and Type | Field and Description |
|---|---|
static MultiDbConfig.StrategySupplier |
DEFAULT |
| Constructor and Description |
|---|
PingStrategy(HostAndPort hostAndPort,
JedisClientConfig jedisClientConfig) |
PingStrategy(HostAndPort hostAndPort,
JedisClientConfig jedisClientConfig,
HealthCheckStrategy.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any resources used by the health check strategy.
|
HealthStatus |
doHealthCheck(Endpoint 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 MultiDbConfig.StrategySupplier DEFAULT
public PingStrategy(HostAndPort hostAndPort, JedisClientConfig jedisClientConfig)
public PingStrategy(HostAndPort hostAndPort, JedisClientConfig jedisClientConfig, 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(Endpoint endpoint)
HealthCheckStrategydoHealthCheck in interface HealthCheckStrategyendpoint - the endpoint to checkpublic void close()
HealthCheckStrategyclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface HealthCheckStrategyCopyright © 2025. All rights reserved.