222223224225226227228229230231232
// Wait on the handler removing the OPENED znode. while (am.getEntityGroupStates().isEntityGroupInTransition( ENTITYGROUPINFO)) Threads.sleep(1); } finally { executor.shutdown(); am.shutdown(); // Clean up all znodes ZKAssign.deleteAllNodes(this.watcher); } }