return new ContainsHealthyEndPointCheck(ServicePoolProxies.getPool(proxy), name);
}
@Override
public Result check() throws Exception {
HealthCheckResults results = _pool.checkForHealthyEndPoint();
boolean healthy = results.hasHealthyResult();
HealthCheckResult healthyResult = results.getHealthyResult();
// Get stats about any failed health checks
int numUnhealthy = 0;
long totalUnhealthyResponseTimeInMicros = 0;
for (HealthCheckResult unhealthy : results.getUnhealthyResults()) {
++numUnhealthy;
totalUnhealthyResponseTimeInMicros += unhealthy.getResponseTime(TimeUnit.MICROSECONDS);
}
if (!healthy && numUnhealthy == 0) {