private void closeAllCallbacks() {
    closeCallbacksExceptListener();
    CacheListener[] listeners = fetchCacheListenersField();
    if (listeners != null) {
      for (final CacheListener listener : listeners) {
        closeCacheCallback(listener);
      }
    }
  }
This is only done when the cache is closed.
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java