Package com.hazelcast.spi.merge
Class HigherHitsMergePolicy<V,T extends MergingValue<V> & MergingHits>
java.lang.Object
com.hazelcast.spi.impl.merge.AbstractSplitBrainMergePolicy<V,T,Object>
com.hazelcast.spi.merge.HigherHitsMergePolicy<V,T>
- Type Parameters:
V- the type of the merged valueT- the type of the merging value
- All Implemented Interfaces:
DataSerializable,IdentifiedDataSerializable,SplitBrainMergePolicy<V,T, Object>
public class HigherHitsMergePolicy<V,T extends MergingValue<V> & MergingHits>
extends com.hazelcast.spi.impl.merge.AbstractSplitBrainMergePolicy<V,T,Object>
Merges data structure entries from source to destination data structure if the source entry
has more hits than the destination one.
- Since:
- 3.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns type identifier for this class.Selects the value of either the merging or the existingMergingValuewhich should be merged.Methods inherited from class com.hazelcast.spi.impl.merge.AbstractSplitBrainMergePolicy
getFactoryId, readData, writeData
-
Constructor Details
-
HigherHitsMergePolicy
public HigherHitsMergePolicy()
-
-
Method Details
-
merge
Description copied from interface:SplitBrainMergePolicySelects the value of either the merging or the existingMergingValuewhich should be merged.Note that the existing
MergingValueinstance may benullif no matching data could be found to the mergingMergingValue.- Parameters:
mergingValue-MergingValueinstance that has the merging data of the smaller sub-clusterexistingValue-MergingValueinstance that has the existing data ornullif no matching data exists- Returns:
- the selected value for merging
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Returns:
- type ID
-