public static void emergencyClose() {
    impl.itrForEmergencyClose.ifPresent(poolIterator -> {
      while (poolIterator.hasNext()) {
        Pool pool = poolIterator.next();
        if (pool instanceof PoolImpl) {
          ((PoolImpl) pool).emergencyClose();
        }
      }
    });
  }
@param xmlPoolsOnly if true then only call readyForEvents on pools declared in XML.
geode-core/src/main/java/org/apache/geode/internal/cache/PoolManagerImpl.java