public class PutIfAbsentMergePolicy extends AbstractSplitBrainMergePolicy
Constructor and Description |
---|
PutIfAbsentMergePolicy() |
Modifier and Type | Method and Description |
---|---|
int |
getId()
Returns type identifier for this class.
|
<V> V |
merge(MergingValueHolder<V> mergingValue,
MergingValueHolder<V> existingValue)
Selects the value of either the merging or the existing
MergingValueHolder which should be merged. |
checkInstanceOf, getFactoryId, readData, writeData
public <V> V merge(MergingValueHolder<V> mergingValue, MergingValueHolder<V> existingValue)
SplitBrainMergePolicy
MergingValueHolder
which should be merged.
Note that the existing MergingValueHolder
instance may be null
if no matching data could be found to the merging MergingValueHolder
.
merge
in interface SplitBrainMergePolicy
merge
in class AbstractSplitBrainMergePolicy
V
- the type of the valuemergingValue
- MergingValueHolder
instance that has the merging data of the smaller sub-clusterexistingValue
- MergingValueHolder
instance that has the existing data
or null
if no matching data existspublic int getId()
IdentifiedDataSerializable
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.