Class TxDecisionMaker.PutIfAbsentDecisionMaker<K,​V>

    • Field Detail

      • oldValueSupplier

        private final java.util.function.Function<K,​V> oldValueSupplier
    • Constructor Detail

      • PutIfAbsentDecisionMaker

        PutIfAbsentDecisionMaker​(int mapId,
                                 Transaction transaction,
                                 java.util.function.Function<K,​V> oldValueSupplier)
    • Method Detail

      • decide

        public MVMap.Decision decide​(VersionedValue<V> existingValue,
                                     VersionedValue<V> providedValue)
        Description copied from class: MVMap.DecisionMaker
        Makes a decision about how to proceed with the update.
        Overrides:
        decide in class TxDecisionMaker<K,​V>
        Parameters:
        existingValue - value currently exists in the map
        providedValue - 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

        private V getValueInSnapshot()