Package org.h2.mvstore.tx
Class TxDecisionMaker.LockDecisionMaker<K,V>
- java.lang.Object
-
- org.h2.mvstore.MVMap.DecisionMaker<VersionedValue<V>>
-
- org.h2.mvstore.tx.TxDecisionMaker<K,V>
-
- org.h2.mvstore.tx.TxDecisionMaker.LockDecisionMaker<K,V>
-
- Direct Known Subclasses:
TxDecisionMaker.RepeatableReadLockDecisionMaker
- Enclosing class:
- TxDecisionMaker<K,V>
public static class TxDecisionMaker.LockDecisionMaker<K,V> extends TxDecisionMaker<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.h2.mvstore.tx.TxDecisionMaker
TxDecisionMaker.LockDecisionMaker<K,V>, TxDecisionMaker.PutIfAbsentDecisionMaker<K,V>, TxDecisionMaker.RepeatableReadLockDecisionMaker<K,V>
-
-
Field Summary
-
Fields inherited from class org.h2.mvstore.tx.TxDecisionMaker
key
-
Fields inherited from class org.h2.mvstore.MVMap.DecisionMaker
DEFAULT, PUT, REMOVE
-
-
Constructor Summary
Constructors Constructor Description LockDecisionMaker(int mapId, Transaction transaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MVMap.Decision
decide(VersionedValue<V> existingValue, VersionedValue<V> providedValue)
Makes a decision about how to proceed with the update.(package private) V
getNewValue(VersionedValue<V> existingValue)
Get the new value.-
Methods inherited from class org.h2.mvstore.tx.TxDecisionMaker
allowNonRepeatableRead, decideToAbort, getBlockingTransaction, getDecision, getLastValue, initialize, isCommitted, isRepeatedOperation, isThisTransaction, logAndDecideToPut, reset, selectValue, setDecision, toString
-
Methods inherited from class org.h2.mvstore.MVMap.DecisionMaker
decide
-
-
-
-
Constructor Detail
-
LockDecisionMaker
LockDecisionMaker(int mapId, Transaction transaction)
-
-
Method Detail
-
decide
public MVMap.Decision decide(VersionedValue<V> existingValue, VersionedValue<V> providedValue)
Description copied from class:MVMap.DecisionMaker
Makes a decision about how to proceed with the update.- Overrides:
decide
in classTxDecisionMaker<K,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
-
getNewValue
V getNewValue(VersionedValue<V> existingValue)
Description copied from class:TxDecisionMaker
Get the new value. This implementation always return the current value (ignores the parameter).- Overrides:
getNewValue
in classTxDecisionMaker<K,V>
- Parameters:
existingValue
- the parameter value- Returns:
- the current value.
-
-