public abstract class AbstractSplitBrainMergePolicy extends Object implements SplitBrainMergePolicy, IdentifiedDataSerializable
SplitBrainMergePolicy for the out-of-the-box merge policies.
Doesn't save the injected SerializationService, since it's not needed by any out-of-the-box merge policy.
| Constructor and Description |
|---|
AbstractSplitBrainMergePolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInstanceOf(MergingValueHolder dataHolder,
Class<?> clazz) |
int |
getFactoryId()
Returns DataSerializableFactory factory ID 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. |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdprotected void checkInstanceOf(MergingValueHolder dataHolder, Class<?> clazz)
public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out)
DataSerializablewriteData in interface DataSerializableout - outputpublic void readData(ObjectDataInput in)
DataSerializablereadData in interface DataSerializablein - inputpublic <V> V merge(MergingValueHolder<V> mergingValue, MergingValueHolder<V> existingValue)
SplitBrainMergePolicyMergingValueHolder 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 SplitBrainMergePolicyV - 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 existsCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.