| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private Transaction | |
| private MVMap. | |
| protected K | key
Key for the map entry to decide upon |
| private long | lastOperationId
Id of the last operation, we decided to
|
| private V | |
| private final int | mapId
Map to decide upon |
| private final Transaction | transaction
Transaction we are operating within |
| private long | undoKey
Id for the undo log entry created for this modification |
| private V | value
Value for the map entry |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final boolean | |
| public MVMap. | decide(VersionedValue<V>
value currently exists in the map existingValue, VersionedValue<V> original input value providedValue)Implements abstract org. Makes a decision about how to proceed with the update. |
| pack-priv final MVMap. | |
| pack-priv final Transaction | |
| pack-priv final MVMap. | |
| pack-priv final V | |
| pack-priv V | Returns: the current value.the parameter value existingValue)Get the new value. |
| pack-priv void | |
| pack-priv final boolean | Returns: true if transaction should be considered as committed, false otherwiseto use transactionId)Determine whether specified id corresponds to a logically committed transaction. |
| pack-priv final boolean | Returns: true if the same as last operation id, false otherwisefor the operation we decided to
id)org.Store operation id provided, but before that, compare it against last stored one. |
| pack-priv final boolean | Returns: true it it is "current" transaction's id, false otherwiseto check transactionId)Check whether specified transaction id belongs to "current" transaction (transaction we are acting within). |
| pack-priv MVMap. | Returns: org.previous value to be logged valueToLog, V last known committed value lastValue)Create undo log entry and record for future references
|
| public final void | reset()
Overrides org. Resets internal state (if any) of a this DecisionMaker to it's initial state. |
| public <T extends VersionedValue | selectValue(T
value currently exists in the map existingValue, T original input value providedValue)Overrides org. Provides revised value for insert/update based on original input value and value currently existing in the map. |
| pack-priv final MVMap. | Returns: argument providedmade decisionRecord for future references specified value as a decision that has been made. |
| public final String |
| blockingTransaction | back to summary |
|---|---|
| private Transaction blockingTransaction | |
| decision | back to summary |
|---|---|
| private MVMap. | |
| key | back to summary |
|---|---|
| protected K key Key for the map entry to decide upon | |
| lastOperationId | back to summary |
|---|---|
| private long lastOperationId Id of the last operation, we decided to
| |
| lastValue | back to summary |
|---|---|
| private V lastValue | |
| mapId | back to summary |
|---|---|
| private final int mapId Map to decide upon | |
| transaction | back to summary |
|---|---|
| private final Transaction transaction Transaction we are operating within | |
| undoKey | back to summary |
|---|---|
| private long undoKey Id for the undo log entry created for this modification | |
| value | back to summary |
|---|---|
| private V value Value for the map entry | |
| TxDecisionMaker | back to summary |
|---|---|
| pack-priv TxDecisionMaker(int mapId, Transaction transaction) | |
| allowNonRepeatableRead | back to summary |
|---|---|
| pack-priv final boolean allowNonRepeatableRead() | |
| decide | back to summary |
|---|---|
| public MVMap. Implements abstract org. Doc from org. Makes a decision about how to proceed with the update.
| |
| decideToAbort | back to summary |
|---|---|
| pack-priv final MVMap. | |
| getBlockingTransaction | back to summary |
|---|---|
| pack-priv final Transaction getBlockingTransaction() | |
| getDecision | back to summary |
|---|---|
| pack-priv final MVMap. | |
| getLastValue | back to summary |
|---|---|
| pack-priv final V getLastValue() | |
| getNewValue | back to summary |
|---|---|
| pack-priv V getNewValue(VersionedValue<V> existingValue) Get the new value. This implementation always return the current value (ignores the parameter).
| |
| initialize | back to summary |
|---|---|
| pack-priv void initialize(K key, V value) | |
| isCommitted | back to summary |
|---|---|
| pack-priv final boolean isCommitted(int transactionId) Determine whether specified id corresponds to a logically committed transaction. In case of pending transaction, reference to actual Transaction object (if any) is preserved for future use.
| |
| isRepeatedOperation | back to summary |
|---|---|
| pack-priv final boolean isRepeatedOperation(long id) Store operation id provided, but before that, compare it against last stored one. This is to prevent an infinite loop in case of uncommitted "leftover" entry (one without a corresponding undo log entry, most likely as a result of unclean shutdown).
| |
| isThisTransaction | back to summary |
|---|---|
| pack-priv final boolean isThisTransaction(int transactionId) Check whether specified transaction id belongs to "current" transaction (transaction we are acting within).
| |
| logAndDecideToPut | back to summary |
|---|---|
| pack-priv MVMap. Create undo log entry and record for future references
| |
| reset | back to summary |
|---|---|
| public final void reset() Overrides org. Doc from org. 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.
| |
| selectValue | back to summary |
|---|---|
| public <T extends VersionedValue Overrides org. Doc from org. 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.
| |
| setDecision | back to summary |
|---|---|
| pack-priv final MVMap. Record for future references specified value as a decision that has been made. | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public MVMap. | decide(VersionedValue<V>
value currently exists in the map existingValue, VersionedValue<V> original input value providedValue)Overrides org. Makes a decision about how to proceed with the update. |
| pack-priv V | getNewValue(VersionedValue<V>
the parameter value existingValue)Overrides org. Get the new value. |
| LockDecisionMaker | back to summary |
|---|---|
| pack-priv LockDecisionMaker(int mapId, Transaction transaction) | |
| decide | back to summary |
|---|---|
| public MVMap. Overrides org. Doc from org. Makes a decision about how to proceed with the update.
| |
| getNewValue | back to summary |
|---|---|
| pack-priv V getNewValue(VersionedValue<V> existingValue) Overrides org. Doc from org. Get the new value. This implementation always return the current value (ignores the parameter).
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Function |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public MVMap. | decide(VersionedValue<V>
value currently exists in the map existingValue, VersionedValue<V> original input value providedValue)Overrides org. Makes a decision about how to proceed with the update. |
| private V |
| oldValueSupplier | back to summary |
|---|---|
| private final Function<K, V> oldValueSupplier | |
| PutIfAbsentDecisionMaker | back to summary |
|---|---|
| pack-priv PutIfAbsentDecisionMaker(int mapId, Transaction transaction, Function<K, V> oldValueSupplier) | |
| decide | back to summary |
|---|---|
| public MVMap. Overrides org. Doc from org. Makes a decision about how to proceed with the update.
| |
| getValueInSnapshot | back to summary |
|---|---|
| private V getValueInSnapshot() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Function | |
| private final DataType |
| Access | Constructor and Description |
|---|---|
| pack-priv | RepeatableReadLockDecisionMaker(int mapId, Transaction transaction, DataType<VersionedValue<V>> valueType, Function<K, V> snapshotValueSupplier)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv MVMap. | logAndDecideToPut(VersionedValue<V>
previous value to be logged valueToLog, V last known committed value value)Overrides org. Create undo log entry and record for future references
|
| snapshotValueSupplier | back to summary |
|---|---|
| private final Function<K, V> snapshotValueSupplier | |
| valueType | back to summary |
|---|---|
| private final DataType<VersionedValue<V>> valueType | |
| RepeatableReadLockDecisionMaker | back to summary |
|---|---|
| pack-priv RepeatableReadLockDecisionMaker(int mapId, Transaction transaction, DataType<VersionedValue<V>> valueType, Function<K, V> snapshotValueSupplier) | |
| logAndDecideToPut | back to summary |
|---|---|
| pack-priv MVMap. Overrides org. Doc from org. Create undo log entry and record for future references
| |