private void checkEngineStates(){
  try {
    for (    String engine : dataManager.getChildren(BASE_PATH)) {
      Long lastHeartBeat=getHeartBeat(engine);
      if (lastHeartBeat != null) {
        long age=System.currentTimeMillis() - lastHeartBeat;
        if (age >= MAX_AGE) {
          removeEngineState(engine);
        }
      }
    }
  }
 catch (  Exception e) {
    log.error("Error checking Engine States",e);
  }
}

private void checkEngineStates ( ) { try { for ( String engine : dataManager . getChildren ( BASE_PATH ) ) { Long lastHeartBeat = getHeartBeat ( engine ) ; if ( lastHeartBeat != null ) { long age = System . currentTimeMillis ( ) - lastHeartBeat ; if ( age >= MAX_AGE ) { removeEngineState ( engine ) ; } } } } catch ( Exception e ) { log . error ( "Error checking Engine States" , e ) ; } }
checks the state of all registered engines , killing any which are no longer alive .
