Interface MergeOnStore
-
- All Known Implementing Classes:
AtomicKeySetImpl
public interface MergeOnStore
This interface is not a public API.A value implementing this interface is merged with the actual value when storing into
DataContainer
. As the merge operation is synchronized externally, the implementation of this interface does not need to be thread-safe. Note that the value in context (last written value) needs to implementMergeOnStore
, if the cache already containing such instance is overwritten by a non-implementor, the merge does not happen.The intended use is when executing a command with
Flag.SKIP_LOCKING
; in that case we may have two different instances in context at one moment and the writes may be applied in any order, even in a different order on different owners. Therefore it's strongly recommended that all operations on such entry are commutative (order-independent).As the atomicity of load and store into persistence layer cannot be guaranteed, it is recommended to use such values only with
Flag.SKIP_CACHE_LOAD
andFlag.SKIP_CACHE_STORE
or implementing a custom externalizer that will deal with this.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
merge(Object other)
-