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>
-
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 -
Method Summary
Modifier and TypeMethodDescriptiondecide
(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 Details
-
LockDecisionMaker
LockDecisionMaker(int mapId, Transaction transaction)
-
-
Method Details
-
decide
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
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.
-