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 |
|---|---|
static class |
TopologyAwareSyncConsistentHashFactory.Externalizer |
SyncConsistentHashFactory.Builder| Constructor and Description |
|---|
TopologyAwareSyncConsistentHashFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
populateOwnersFewSegments(SyncConsistentHashFactory.Builder builder,
SortedMap<Integer,Address> primarySegments) |
protected void |
populateOwnersManySegments(SyncConsistentHashFactory.Builder builder,
SortedMap<Integer,Address> primarySegments) |
create, normalizedHash, rebalance, union, updateMemberspublic TopologyAwareSyncConsistentHashFactory()
protected void populateOwnersFewSegments(SyncConsistentHashFactory.Builder builder, SortedMap<Integer,Address> primarySegments)
populateOwnersFewSegments in class SyncConsistentHashFactoryprotected void populateOwnersManySegments(SyncConsistentHashFactory.Builder builder, SortedMap<Integer,Address> primarySegments)
populateOwnersManySegments in class SyncConsistentHashFactoryCopyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.