public static boolean hasObserver() {
    return _instance != NO_OBSERVER;
  }
Set the given observer to be notified of query events. Returns the current observer.
geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryObserverHolder.java