Package org.h2.mvstore.tx
Class RollbackDecisionMaker
- java.lang.Object
-
- org.h2.mvstore.MVMap.DecisionMaker<Record<?,?>>
-
- org.h2.mvstore.tx.RollbackDecisionMaker
-
final class RollbackDecisionMaker extends MVMap.DecisionMaker<Record<?,?>>
Class RollbackDecisionMaker process undo log record during transaction rollback.
-
-
Field Summary
Fields Modifier and Type Field Description private MVMap.Decision
decision
private TransactionStore.RollbackListener
listener
private TransactionStore
store
private long
toLogId
private long
transactionId
-
Fields inherited from class org.h2.mvstore.MVMap.DecisionMaker
DEFAULT, PUT, REMOVE
-
-
Constructor Summary
Constructors Constructor Description RollbackDecisionMaker(TransactionStore store, long transactionId, long toLogId, TransactionStore.RollbackListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MVMap.Decision
decide(Record existingValue, Record providedValue)
Makes a decision about how to proceed with the update.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
-
store
private final TransactionStore store
-
transactionId
private final long transactionId
-
toLogId
private final long toLogId
-
listener
private final TransactionStore.RollbackListener listener
-
decision
private MVMap.Decision decision
-
-
Constructor Detail
-
RollbackDecisionMaker
RollbackDecisionMaker(TransactionStore store, long transactionId, long toLogId, TransactionStore.RollbackListener listener)
-
-
Method Detail
-
decide
public MVMap.Decision decide(Record existingValue, Record providedValue)
Description copied from class:MVMap.DecisionMaker
Makes a decision about how to proceed with the update.- Specified by:
decide
in classMVMap.DecisionMaker<Record<?,?>>
- 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<Record<?,?>>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-