private void removeEngineState(String engineId){
  if (log.isInfoEnabled()) {
    log.info("Removing engine: " + engineId);
  }
  try {
    if (dataManager.checkExists(getOrdersPath(engineId)) != null) {
      for (      String orderId : dataManager.getChildren(getOrdersPath(engineId))) {
        String message="Order processing terminated during execution, order was not completed. " + "Check with your administrator. Reboot may have occurred.";
        killOrder(URI.create(orderId),message);
        dataManager.removeNode(getOrderPath(engineId,orderId));
      }
      dataManager.removeNode(getEnginePath(engineId));
    }
  }
 catch (  Exception e) {
    log.error("Error whilst removing " + engineId + " engine state",e);
  }
}

private void removeEngineState ( String engineId ) { if ( log . isInfoEnabled ( ) ) { log . info ( "Removing engine: " + engineId ) ; } try { if ( dataManager . checkExists ( getOrdersPath ( engineId ) ) != null ) { for ( String orderId : dataManager . getChildren ( getOrdersPath ( engineId ) ) ) { String message = "Order processing terminated during execution, order was not completed. " + "Check with your administrator. Reboot may have occurred." ; killOrder ( URI . create ( orderId ) , message ) ; dataManager . removeNode ( getOrderPath ( engineId , orderId ) ) ; } dataManager . removeNode ( getEnginePath ( engineId ) ) ; } } catch ( Exception e ) { log . error ( "Error whilst removing " + engineId + " engine state" , e ) ; } }
kills any orders associated with the engine and removes the engine from zookeeper .
