@Override
  public boolean cancel() {
    cancelled.set(true);

    synchronized (futureLock) {
      for (Future<RebalanceResults> fr : getFutureList()) {
        if (fr.cancel(false)) {
          pendingTasks--;
        }
      }
      if (pendingTasks == 0) {
        cache.getInternalResourceManager().removeInProgressRebalance(this);
      }
    }

    return true;
  }
Implements {@code RebalanceOperation} for rebalancing Cache resources.
geode-core/src/main/java/org/apache/geode/internal/cache/control/RebalanceOperationImpl.java