public void checkCancelInProgress(Throwable e) {
    SystemFailure.checkFailure();
    String reason = cancelInProgress();
    if (reason == null) {
      return;
    }
    throw generateCancelledException(e);
  }
See if the current operation is being cancelled. If so, it either throws a
{@link RuntimeException} (usually a {@link CancelException}).

@param e an underlying exception or null if there is no exception that triggered this check
@see #cancelInProgress()
geode-core/src/main/java/org/apache/geode/CancelCriterion.java