V - value type of the mappublic abstract static class MVMap.DecisionMaker<V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static MVMap.DecisionMaker<java.lang.Object> |
DEFAULT
Decision maker for transaction rollback.
|
static MVMap.DecisionMaker<java.lang.Object> |
PUT
Decision maker for put().
|
static MVMap.DecisionMaker<java.lang.Object> |
REMOVE
Decision maker for remove().
|
| Constructor and Description |
|---|
MVMap.DecisionMaker() |
| Modifier and Type | Method and Description |
|---|---|
abstract MVMap.Decision |
decide(V existingValue,
V 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.
|
<T extends V> |
selectValue(T existingValue,
T providedValue)
Provides revised value for insert/update based on original input value
and value currently existing in the map.
|
public static final MVMap.DecisionMaker<java.lang.Object> DEFAULT
public static final MVMap.DecisionMaker<java.lang.Object> PUT
public static final MVMap.DecisionMaker<java.lang.Object> REMOVE
public abstract MVMap.Decision decide(V existingValue, V providedValue)
existingValue - value currently exists in the mapprovidedValue - original input valuepublic <T extends V> T selectValue(T existingValue, T providedValue)
T - value typeexistingValue - value currently exists in the mapprovidedValue - original input valuepublic void reset()