@Override
  public boolean isRebalanceNecessary(boolean redundancyImpaired, boolean withPersistence) {
    // Restoring redundancy does not require that persistence is enabled to consider the operation
    // necessary
    if (isRestoreRedundancy) {
      return redundancyImpaired || initialMovePrimaries;
    }
    // We can skip a rebalance is redundancy is not impaired and we
    // don't need to move primaries.
    return redundancyImpaired || (initialMovePrimaries && withPersistence);
  }
@param removeOverRedundancy true to remove buckets that exceed redundancy levels
@param satisfyRedundancy true to satisfy redundancy as part of the operation
@param moveBuckets true to move buckets as part of the operation
@param movePrimaries true to move primaries as part of the operation
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/CompositeDirector.java