if (cacheMode.isClustered()) {
if (cacheMode.isDistributed()) {
if (globalConfiguration.transport().hasTopologyInfo()) {
factory = new TopologyAwareConsistentHashFactory();
} else {
factory = new DefaultConsistentHashFactory();
}
} else {
// this is also used for invalidation mode
factory = new ReplicatedConsistentHashFactory();
}