@Override
  public boolean contains(Object key) {
    // Handle events that may have been deleted,
    // but added by result caching.
    if (!isInitialized()) {
      logger.warn(
          "The CQ Result key cache is not initialized. This should not happen as the call to isPartOfCqResult() is based on the condition cqResultsCacheInitialized.");
      return false;
    }

    synchronized (LOCK) {
      destroysWhileCqResultsInProgress.forEach(cqResultKeys::remove);
      destroysWhileCqResultsInProgress.clear();
      return cqResultKeys.containsKey(key);
    }
  }
Returns if the passed key is part of the CQs result set. This method needs to be called once
the CQ result key caching is completed (cqResultsCacheInitialized is true).

@return true if key is in the Results Cache.
geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/ServerCQResultsCacheReplicateRegionImpl.java