public static void throwExceptionIfQueryOnCurrentThreadIsCanceled() {
    if (ExecutionContext.isCanceled.get().get()) {
      throw new QueryExecutionCanceledException();
    }
  }
Throw an exception if the query has been canceled. The {@link QueryMonitor} cancels the query
if it takes more than the max query execution time or in low memory situations where critical
heap percentage has been set on the resource manager.

@throws QueryExecutionCanceledException if the query has been canceled
geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryMonitor.java