if (endPoint == null) {
// Load balancer didn't like our end points, so just go sequentially.
endPoint = endPoints.iterator().next();
}
HealthCheckResult result = checkHealth(endPoint);
aggregate.addHealthCheckResult(result);
if (!result.isHealthy()) {
Exception exception = ((FailedHealthCheckResult) result).getException();
if (exception == null || isRetriableException(exception)) {
LOG.debug("Unhealthy end point discovered. End point ID: {}", endPoint.getId());
endPoints.remove(endPoint);
markEndPointAsBad(endPoint);