Код: Выделить всё
public HealthCheckResponse call() {
String redisHost = this.configuration.getRedisHost();
log.info("connect to redis host: {}", redisHost);
Future redisConnectionFuture = Redis.createClient(Vertx.vertx(), redisHost).connect();
while (!redisConnectionFuture.isComplete()) {
log.debug("waiting for redis connection future complete: ({})", redisConnectionFuture.isComplete());
}
log.info("redis connection future completed, {} and succeded {}", redisConnectionFuture.isComplete(), redisConnectionFuture.succeeded());
if (redisConnectionFuture.isComplete() && redisConnectionFuture.succeeded()) {
return HealthCheckResponse.up("RedisCustomHealthCheck");
}
log.info("sending down RedisCustomHealthCheck");
return HealthCheckResponse.down("RedisCustomHealthCheck");
}
Подробнее здесь: https://stackoverflow.com/questions/782 ... e-complete