Class TopologyAwareSyncConsistentHashFactory
- java.lang.Object
-
- org.infinispan.distribution.ch.impl.SyncConsistentHashFactory
-
- org.infinispan.distribution.ch.impl.TopologyAwareSyncConsistentHashFactory
-
- All Implemented Interfaces:
ConsistentHashFactory<DefaultConsistentHash>
public class TopologyAwareSyncConsistentHashFactory extends SyncConsistentHashFactory
AConsistentHashFactory
implementation that guarantees caches with the same members have the same consistent hash and also tries to distribute segments based on the topology information inTransportConfiguration
. It has a drawback compared toDefaultConsistentHashFactory
: it can potentially move a lot more segments during a rebalance than strictly necessary. It is not recommended using theTopologyAwareSyncConsistentHashFactory
with a very small number of segments. The distribution of segments to owners gets better with a higher number of segments, and is especially bad whennumSegments < numNodes
- Since:
- 5.2
- Author:
- Dan Berindei
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TopologyAwareSyncConsistentHashFactory.Builder
static class
TopologyAwareSyncConsistentHashFactory.Externalizer
-
Constructor Summary
Constructors Constructor Description TopologyAwareSyncConsistentHashFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TopologyAwareSyncConsistentHashFactory.Builder
createBuilder(int numOwners, int numSegments, List<Address> members, Map<Address,Float> capacityFactors)
-
Methods inherited from class org.infinispan.distribution.ch.impl.SyncConsistentHashFactory
create, equals, fromPersistentState, hashCode, rebalance, union, updateMembers
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.distribution.ch.ConsistentHashFactory
create
-
-