Package org.h2.mvstore
Class MVMap.EqualsDecisionMaker<V>
- java.lang.Object
-
- org.h2.mvstore.MVMap.DecisionMaker<V>
-
- org.h2.mvstore.MVMap.EqualsDecisionMaker<V>
-
private static final class MVMap.EqualsDecisionMaker<V> extends MVMap.DecisionMaker<V>
-
-
Field Summary
Fields Modifier and Type Field Description private DataType<V>
dataType
private MVMap.Decision
decision
private V
expectedValue
-
Fields inherited from class org.h2.mvstore.MVMap.DecisionMaker
DEFAULT, IF_ABSENT, IF_PRESENT, PUT, REMOVE
-
-
Constructor Summary
Constructors Constructor Description EqualsDecisionMaker(DataType<V> dataType, V expectedValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MVMap.Decision
decide(V existingValue, V providedValue)
Makes a decision about how to proceed with the update.(package private) MVMap.Decision
getDecision()
void
reset()
Resets internal state (if any) of a this DecisionMaker to it's initial state.java.lang.String
toString()
-
Methods inherited from class org.h2.mvstore.MVMap.DecisionMaker
decide, selectValue
-
-
-
-
Field Detail
-
expectedValue
private final V expectedValue
-
decision
private MVMap.Decision decision
-
-
Method Detail
-
decide
public MVMap.Decision decide(V existingValue, V providedValue)
Description copied from class:MVMap.DecisionMaker
Makes a decision about how to proceed with the update.- Specified by:
decide
in classMVMap.DecisionMaker<V>
- Parameters:
existingValue
- value currently exists in the mapprovidedValue
- original input value- Returns:
- PUT if a new value need to replace existing one or a new value to be inserted if there is none REMOVE if existing value should be deleted ABORT if update operation should be aborted or repeated later REPEAT if update operation should be repeated immediately
-
reset
public void reset()
Description copied from class:MVMap.DecisionMaker
Resets internal state (if any) of a this DecisionMaker to it's initial state. This method is invoked whenever concurrent update failure is encountered, so we can re-start update process.- Overrides:
reset
in classMVMap.DecisionMaker<V>
-
getDecision
MVMap.Decision getDecision()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-