Package org.infinispan.topology
Enum CacheTopology.Phase
- All Implemented Interfaces:
Serializable
,Comparable<CacheTopology.Phase>
- Enclosing class:
CacheTopology
Phase of the rebalance process. Using four phases guarantees these properties:
1. T(x+1).writeCH contains all nodes from Tx.readCH (this is the requirement for ISPN-5021)
2. Tx.readCH and T(x+1).readCH has non-empty subset of nodes (that will allow no blocking for read commands
and reading only entries node owns according to readCH)
Old entries should be wiped out only after coming to the
NO_REBALANCE
phase.-
Enum Constant Summary
Enum ConstantDescriptionInterim state between NO_REBALANCE → READ_OLD_WRITE_ALL readCh is set locally using previous Topology (of said node) readCH, whilst writeCH contains all members after mergeOnly currentCH should be set, this works as both readCH and writeCHUsed after state transfer completes: readCH == writeCH = unionCHIntermediate state that prevents ISPN-5021: readCH == pendingCH, writeCH = unionCHUsed during state transfer: readCH == currentCH, writeCH = unionCHUsed by caches that don't use 4-phase topology change. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static CacheTopology.Phase
valueOf
(int ordinal) Returns the enum constant of this type with the specified name.static CacheTopology.Phase
Returns the enum constant of this type with the specified name.static CacheTopology.Phase[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NO_REBALANCE
Only currentCH should be set, this works as both readCH and writeCH -
TRANSITORY
Used by caches that don't use 4-phase topology change. PendingCH is used for both read and write. -
CONFLICT_RESOLUTION
Interim state between NO_REBALANCE → READ_OLD_WRITE_ALL readCh is set locally using previous Topology (of said node) readCH, whilst writeCH contains all members after merge -
READ_OLD_WRITE_ALL
Used during state transfer: readCH == currentCH, writeCH = unionCH -
READ_ALL_WRITE_ALL
Used after state transfer completes: readCH == writeCH = unionCH -
READ_NEW_WRITE_ALL
Intermediate state that prevents ISPN-5021: readCH == pendingCH, writeCH = unionCH
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isRebalance
public boolean isRebalance() -
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
ordinal
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-