private void cancelAllQueries(final ScheduledThreadPoolExecutor executor) {
        final BlockingQueue<Runnable> expirationTaskQueue = executor.getQueue();
        for (final Runnable cancelationTask : expirationTaskQueue) {
          if (expirationTaskQueue.remove(cancelationTask)) {
            cancelationTask.run();
          }
        }
      }
Run all cancelation tasks. Leave the executor's task queue empty.
geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryMonitor.java