private synchronized void reportHeartbeatFailure(){
  Stats.incr(String.format("heartbeat_failures_%s_%d",host,port));
  currentConsecutiveSuccesses=0;
  currentConsecutiveFailures+=1;
  if (!isLive) {
    Stats.incr(String.format("healthcheck_dead_%s_%d",host,port));
    return;
  }
  if (currentConsecutiveFailures >= consecutiveFailures) {
    LOG.info(String.format("Server %s:%d is determined as dead by health check.",host,port));
    Stats.incr(String.format("healthcheck_dead_%s_%d",host,port));
    isLive=false;
  }
}

private synchronized void reportHeartbeatFailure ( ) { Stats . incr ( String . format ( "heartbeat_failures_%s_%d" , host , port ) ) ; currentConsecutiveSuccesses = 0 ; currentConsecutiveFailures += 1 ; if ( ! isLive ) { Stats . incr ( String . format ( "healthcheck_dead_%s_%d" , host , port ) ) ; return ; } if ( currentConsecutiveFailures >= consecutiveFailures ) { LOG . info ( String . format ( "Server %s:%d is determined as dead by health check." , host , port ) ) ; Stats . incr ( String . format ( "healthcheck_dead_%s_%d" , host , port ) ) ; isLive = false ; } }
report a failed heartbeat .
