Package org.h2.mvstore.tx
Class TxDecisionMaker.PutIfAbsentDecisionMaker<K,V>
java.lang.Object
org.h2.mvstore.MVMap.DecisionMaker<VersionedValue<V>>
org.h2.mvstore.tx.TxDecisionMaker<K,V>
org.h2.mvstore.tx.TxDecisionMaker.PutIfAbsentDecisionMaker<K,V>
- Enclosing class:
TxDecisionMaker<K,
V>
public static final class TxDecisionMaker.PutIfAbsentDecisionMaker<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
FieldsFields inherited from class org.h2.mvstore.tx.TxDecisionMaker
key
Fields inherited from class org.h2.mvstore.MVMap.DecisionMaker
DEFAULT, PUT, REMOVE
-
Constructor Summary
ConstructorsConstructorDescriptionPutIfAbsentDecisionMaker
(int mapId, Transaction transaction, Function<K, V> oldValueSupplier) -
Method Summary
Modifier and TypeMethodDescriptiondecide
(VersionedValue<V> existingValue, VersionedValue<V> providedValue) Makes a decision about how to proceed with the update.private V
Methods inherited from class org.h2.mvstore.tx.TxDecisionMaker
allowNonRepeatableRead, decideToAbort, getBlockingTransaction, getDecision, getLastValue, getNewValue, initialize, isCommitted, isRepeatedOperation, isThisTransaction, logAndDecideToPut, reset, selectValue, setDecision, toString
Methods inherited from class org.h2.mvstore.MVMap.DecisionMaker
decide
-
Field Details
-
oldValueSupplier
-
-
Constructor Details
-
PutIfAbsentDecisionMaker
PutIfAbsentDecisionMaker(int mapId, Transaction transaction, Function<K, V> oldValueSupplier)
-
-
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
-
getValueInSnapshot
-