Package org.infinispan.topology
Enum Class CacheTopology.Phase
- All Implemented Interfaces:
Serializable
,Comparable<CacheTopology.Phase>
,Constable
- 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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
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 = unionCH -
Method Summary
Modifier and TypeMethodDescriptionboolean
static CacheTopology.Phase
valueOf
(int ordinal) Returns the enum constant of this class with the specified name.static CacheTopology.Phase
Returns the enum constant of this class with the specified name.static CacheTopology.Phase[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_REBALANCE
Only currentCH should be set, this works as both readCH and writeCH -
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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isRebalance
public boolean isRebalance() -
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-