if (groupManager == null) {
return cacheTopology;
}
ConsistentHash currentCH = cacheTopology.getCurrentCH();
currentCH = new GroupingConsistentHash(currentCH, groupManager);
ConsistentHash pendingCH = cacheTopology.getPendingCH();
if (pendingCH != null) {
pendingCH = new GroupingConsistentHash(pendingCH, groupManager);
}
return new CacheTopology(cacheTopology.getTopologyId(), currentCH, pendingCH);
}