public class TopologyAwareSyncConsistentHashFactory extends SyncConsistentHashFactory
ConsistentHashFactory
implementation that guarantees caches
with the same members have the same consistent hash and also tries to distribute segments based on the
topology information in TransportConfiguration
.
It has a drawback compared to DefaultConsistentHashFactory
:
it can potentially move a lot more segments during a rebalance than strictly necessary.
It is not recommended using the TopologyAwareSyncConsistentHashFactory
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 when numSegments < numNodes
Modifier and Type | Class and Description |
---|---|
protected static class |
TopologyAwareSyncConsistentHashFactory.Builder |
static class |
TopologyAwareSyncConsistentHashFactory.Externalizer |
OWNED_SEGMENTS_ALLOWED_VARIATION, PRIMARY_SEGMENTS_ALLOWED_VARIATION
Constructor and Description |
---|
TopologyAwareSyncConsistentHashFactory() |
Modifier and Type | Method and Description |
---|---|
protected TopologyAwareSyncConsistentHashFactory.Builder |
createBuilder(Hash hashFunction,
int numOwners,
int numSegments,
List<Address> members,
Map<Address,Float> capacityFactors) |
checkCapacityFactors, create, equals, fromPersistentState, hashCode, rebalance, union, updateMembers
public TopologyAwareSyncConsistentHashFactory()
protected TopologyAwareSyncConsistentHashFactory.Builder createBuilder(Hash hashFunction, int numOwners, int numSegments, List<Address> members, Map<Address,Float> capacityFactors)
createBuilder
in class SyncConsistentHashFactory
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.