private void keepAlive(){
  Thread current=Thread.currentThread();
  try {
    heartBeat();
    while (current == keepAliveThread) {
      Thread.sleep(HEART_BEAT);
      heartBeat();
    }
  }
 catch (  InterruptedException e) {
    log.warn("Heartbeat interrupted",e);
  }
}

private void keepAlive ( ) { Thread current = Thread . currentThread ( ) ; try { heartBeat ( ) ; while ( current == keepAliveThread ) { Thread . sleep ( HEART_BEAT ) ; heartBeat ( ) ; } } catch ( InterruptedException e ) { log . warn ( "Heartbeat interrupted" , e ) ; } }
sends a heartbeat every minute , keeping the engine alive .
