Package org.apache.ignite.cache
Enum ReadRepairStrategy
- java.lang.Object
- 
- java.lang.Enum<ReadRepairStrategy>
- 
- org.apache.ignite.cache.ReadRepairStrategy
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<ReadRepairStrategy>
 
 public enum ReadRepairStrategy extends Enum<ReadRepairStrategy> Read repair strategies.- See Also:
- for details.
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description CHECK_ONLYOnly check will be performed.LWWLast write (the newest entry) wins.PRIMARYValue from the primary node wins.RELATIVE_MAJORITYThe relative majority, any value found more times than any other wins.REMOVEInconsistent entries will be removed.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static ReadRepairStrategyfromString(String name)Provides strategy by name.static ReadRepairStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static ReadRepairStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
LWWpublic static final ReadRepairStrategy LWW Last write (the newest entry) wins.May cause IgniteExceptionwhen fix is impossible (unable to detect the newest entry):- Null(s) found as well as non-null values for the same key.
 Null (missed entry) has no version, so, it can not be compared with the versioned entry. 
- Entries with the same version have different values.
 
- Null(s) found as well as non-null values for the same key.
 
 - 
PRIMARYpublic static final ReadRepairStrategy PRIMARY Value from the primary node wins.
 - 
RELATIVE_MAJORITYpublic static final ReadRepairStrategy RELATIVE_MAJORITY The relative majority, any value found more times than any other wins.Works for an even number of copies (which is typical of Ignite) instead of an absolute majority. May cause IgniteExceptionwhen it is unable to detect values found more times than any other.For example, when 5 copies (4 backups) are given and value `A` is found twice, but `X`, `Y`, and `Z` only once, `A` wins. But, when `A` is found twice, as well as `B`, and `X` only once, the strategy is unable to determine the winner. When 4 copies (3 backups) are given, any value found two or more times, when others are found only once, is the winner. 
 - 
REMOVEpublic static final ReadRepairStrategy REMOVE Inconsistent entries will be removed.
 - 
CHECK_ONLYpublic static final ReadRepairStrategy CHECK_ONLY Only check will be performed.
 
- 
 - 
Method Detail- 
valuespublic static ReadRepairStrategy[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ReadRepairStrategy c : ReadRepairStrategy.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static ReadRepairStrategy valueOf(String name) 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 name
- NullPointerException- if the argument is null
 
 - 
fromStringpublic static ReadRepairStrategy fromString(String name) Provides strategy by name.- Parameters:
- name- Text.
- Returns:
- Read Repair strategy.
 
 
- 
 
-