public static CacheObserver setInstance(CacheObserver observer) {
    if (observer == null) {
      observer = NO_OBSERVER;
    }
    CacheObserver oldObserver = _instance;
    _instance = observer;
    return oldObserver;
  }
Set the given observer to be notified of query events. Returns the current observer.
geode-core/src/main/java/org/apache/geode/internal/cache/CacheObserverHolder.java