private synchronized void reportHeartbeatSuccess(){
  currentConsecutiveFailures=0;
  currentConsecutiveSuccesses+=1;
  if (isLive) {
    return;
  }
  if (currentConsecutiveSuccesses >= consecutiveSuccesses) {
    LOG.info(String.format("Server %s:%d is determined as live by health check.",host,port));
    isLive=true;
  }
}

private synchronized void reportHeartbeatSuccess ( ) { currentConsecutiveFailures = 0 ; currentConsecutiveSuccesses += 1 ; if ( isLive ) { return ; } if ( currentConsecutiveSuccesses >= consecutiveSuccesses ) { LOG . info ( String . format ( "Server %s:%d is determined as live by health check." , host , port ) ) ; isLive = true ; } }
report a successful heartbeat .
