public boolean isDisconnecting() {
    if (dm == null) {
      return true;
    }
    if (dm.getCancelCriterion().isCancelInProgress()) {
      return true;
    }
    if (!isConnected) {
      return true;
    }
    return isDisconnecting;
  }
Handles all cancellation queries for this distributed system
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java