Package com.hazelcast.config
Enum ConsistencyCheckStrategy
- All Implemented Interfaces:
Serializable
,Comparable<ConsistencyCheckStrategy>
,java.lang.constant.Constable
public enum ConsistencyCheckStrategy extends Enum<ConsistencyCheckStrategy>
Strategy for checking the consistency of data between replicas.
- Since:
- 3.11
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description MERKLE_TREES
Uses merkle trees (if configured) for consistency checks.NONE
No consistency checks -
Method Summary
Modifier and Type Method Description static ConsistencyCheckStrategy
getById(byte id)
Returns the ConsistencyCheckStrategy for the given ID.byte
getId()
Gets the ID for this ConsistencyCheckStrategy.static ConsistencyCheckStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConsistencyCheckStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
No consistency checks -
MERKLE_TREES
Uses merkle trees (if configured) for consistency checks.- See Also:
MerkleTreeConfig
-
-
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
-
getId
public byte getId()Gets the ID for this ConsistencyCheckStrategy.The reason this ID is used instead of an the ordinal value is that the ordinal value is more prone to changes due to reordering.
- Returns:
- the ID
-
getById
Returns the ConsistencyCheckStrategy for the given ID.- Returns:
- the ConsistencyCheckStrategy for the given ID
- Throws:
IllegalArgumentException
- if no ConsistencyCheckStrategy was found
-