public class CacheTopology extends Object
null
if we don't have a state transfer in progress.
The topologyId
is incremented every time the topology changes (i.e. state transfer
starts or ends). It is not modified when the consistent hashes are updated without requiring state
transfer (e.g. when a member leaves).Modifier and Type | Class and Description |
---|---|
static class |
CacheTopology.Externalizer |
Constructor and Description |
---|
CacheTopology(int topologyId,
ConsistentHash currentCH,
ConsistentHash pendingCH) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ConsistentHash |
getCurrentCH()
The current consistent hash.
|
List<Address> |
getMembers() |
ConsistentHash |
getPendingCH()
The future consistent hash.
|
ConsistentHash |
getReadConsistentHash()
Read operations should always go to the "current" members.
|
int |
getTopologyId() |
ConsistentHash |
getWriteConsistentHash()
When there is a rebalance in progress, write operations should go to the "pending" members.
|
int |
hashCode() |
void |
logRoutingTableInformation() |
String |
toString() |
public CacheTopology(int topologyId, ConsistentHash currentCH, ConsistentHash pendingCH)
public int getTopologyId()
public ConsistentHash getCurrentCH()
public ConsistentHash getPendingCH()
null
if there is no rebalance in progress.public ConsistentHash getReadConsistentHash()
public ConsistentHash getWriteConsistentHash()
public final void logRoutingTableInformation()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.