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 (e.g. a member leaves, state transfer
starts or ends).
The rebalanceId
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 |
static class |
CacheTopology.Phase
Phase of the rebalance process.
|
Constructor and Description |
---|
CacheTopology(int topologyId,
int rebalanceId,
ConsistentHash currentCH,
ConsistentHash pendingCH,
CacheTopology.Phase phase,
List<Address> actualMembers,
List<PersistentUUID> persistentUUIDs) |
CacheTopology(int topologyId,
int rebalanceId,
ConsistentHash currentCH,
ConsistentHash pendingCH,
ConsistentHash unionCH,
CacheTopology.Phase phase,
List<Address> actualMembers,
List<PersistentUUID> persistentUUIDs) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<Address> |
getActualMembers() |
ConsistentHash |
getCurrentCH()
The current consistent hash.
|
List<Address> |
getMembers() |
List<PersistentUUID> |
getMembersPersistentUUIDs() |
ConsistentHash |
getPendingCH()
The future consistent hash.
|
CacheTopology.Phase |
getPhase() |
ConsistentHash |
getReadConsistentHash()
Read operations should always go to the "current" owners.
|
int |
getRebalanceId()
The id of the latest started rebalance.
|
int |
getTopologyId() |
ConsistentHash |
getUnionCH()
The union of the current and future consistent hashes.
|
ConsistentHash |
getWriteConsistentHash()
When there is a rebalance in progress, write operations should go to the union of the "current" and "future" owners.
|
int |
hashCode() |
void |
logRoutingTableInformation() |
String |
toString() |
public CacheTopology(int topologyId, int rebalanceId, ConsistentHash currentCH, ConsistentHash pendingCH, CacheTopology.Phase phase, List<Address> actualMembers, List<PersistentUUID> persistentUUIDs)
public CacheTopology(int topologyId, int rebalanceId, ConsistentHash currentCH, ConsistentHash pendingCH, ConsistentHash unionCH, CacheTopology.Phase phase, List<Address> actualMembers, List<PersistentUUID> persistentUUIDs)
public int getTopologyId()
public ConsistentHash getCurrentCH()
public ConsistentHash getPendingCH()
null
if there is no rebalance in progress.public ConsistentHash getUnionCH()
null
if there is no rebalance in progress.public int getRebalanceId()
public List<Address> getMembers()
pendingCH != null
,
otherwise the members of the current CH).getActualMembers()
public List<Address> getActualMembers()
getMembers()
when the
cache is available, and a strict subset if the cache is in degraded mode.AvailabilityMode
public List<PersistentUUID> getMembersPersistentUUIDs()
public ConsistentHash getReadConsistentHash()
public ConsistentHash getWriteConsistentHash()
public final void logRoutingTableInformation()
public CacheTopology.Phase getPhase()
Copyright © 2021 JBoss by Red Hat. All rights reserved.