@Override
  protected void rebalanceCache() {
    try {
      getLogger().info("Rebalancing: " + cache);
      RebalanceResults results = RegionHelper.rebalanceCache(cache);
      if (getLogger().isDebugEnabled()) {
        getLogger().debug("Done rebalancing: " + cache);
        getLogger().debug(RegionHelper.getRebalanceResultsMessage(results));
      }
    } catch (Exception e) {
      getLogger().warn("Rebalance failed because of the following exception:", e);
    }
  }
This is a singleton class which maintains configuration properties as well as starting a
Peer-To-Peer cache.
extensions/geode-modules/src/main/java/org/apache/geode/modules/session/bootstrap/PeerToPeerCache.java