public static synchronized ClientCache getAnyInstance() {
    InternalClientCache instance = getInternalClientCache();
    if (instance == null) {
      throw new CacheClosedException(
          "A cache has not yet been created.");
    } else {
      if (!instance.isClient()) {
        throw new IllegalStateException(
            "The singleton cache was created by CacheFactory not ClientCacheFactory.");
      }
      instance.getCancelCriterion().checkCancelInProgress(null);
      return instance;
    }
  }
Gets an arbitrary open instance of {@link ClientCache} produced by an earlier call to
{@link #create}.

@return an arbitrary open instance of {@link ClientCache} produced by an earlier call to
        {@link #create}

@throws CacheClosedException if a cache has not been created or the only created one is
        {@link ClientCache#isClosed closed}
@throws IllegalStateException if the cache was created by CacheFactory instead of
        ClientCacheFactory
geode-core/src/main/java/org/apache/geode/cache/client/ClientCacheFactory.java