Top Description Fields Constructors Methods
org.h2.mvstore.tx

pack-priv final Class CommitDecisionMaker<V>

extends MVMap.DecisionMaker<VersionedValue<V>>
Class Inheritance
Imports
org.h2.mvstore.MVMap, org.h2.value.VersionedValue

Class CommitDecisionMaker makes a decision during post-commit processing about how to transform uncommitted map entry into committed one, based on undo log information.
Author
Andrei Tokar

Field Summary

Modifier and TypeField and Description
private MVMap.Decision
private long
Inherited from org.h2.mvstore.MVMap.DecisionMaker:
DEFAULTPUTREMOVE

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public MVMap.Decision
decide(VersionedValue<V>
value currently exists in the map
existingValue
,
VersionedValue<V>
original input value
providedValue
)

Implements abstract org.h2.mvstore.MVMap.DecisionMaker.decide.

Makes a decision about how to proceed with the update.

public void
reset()

Overrides org.h2.mvstore.MVMap.DecisionMaker.reset.

Resets internal state (if any) of a this DecisionMaker to it's initial state.

public <T extends VersionedValue<V>> T
selectValue(T
value currently exists in the map
existingValue
,
T
original input value
providedValue
)

Overrides org.h2.mvstore.MVMap.DecisionMaker.selectValue.

Provides revised value for insert/update based on original input value and value currently existing in the map.

pack-priv void
setUndoKey(long undoKey)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.mvstore.MVMap.DecisionMaker:
decide

Field Detail

decisionback to summary
private MVMap.Decision decision
undoKeyback to summary
private long undoKey

Constructor Detail

CommitDecisionMakerback to summary
pack-priv CommitDecisionMaker()

Method Detail

decideback to summary
public MVMap.Decision decide(VersionedValue<V> existingValue, VersionedValue<V> providedValue)

Implements abstract org.h2.mvstore.MVMap.DecisionMaker.decide.

Doc from org.h2.mvstore.MVMap.DecisionMaker.decide.

Makes a decision about how to proceed with the update.

Parameters
existingValue:VersionedValue<V>

value currently exists in the map

providedValue:VersionedValue<V>

original input value

Returns:MVMap.Decision

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

Annotations
@Override
resetback to summary
public void reset()

Overrides org.h2.mvstore.MVMap.DecisionMaker.reset.

Doc from org.h2.mvstore.MVMap.DecisionMaker.reset.

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.

Annotations
@Override
selectValueback to summary
public <T extends VersionedValue<V>> T selectValue(T existingValue, T providedValue)

Overrides org.h2.mvstore.MVMap.DecisionMaker.selectValue.

Doc from org.h2.mvstore.MVMap.DecisionMaker.selectValue.

Provides revised value for insert/update based on original input value and value currently existing in the map. This method is only invoked after call to decide(), if it returns PUT.

Parameters
<T>
value type
existingValue:T

value currently exists in the map

providedValue:T

original input value

Returns:T

value to be used by insert/update

Annotations
@SuppressWarnings:unchecked
@Override
setUndoKeyback to summary
pack-priv void setUndoKey(long undoKey)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override