public class HigherHitsMapMergePolicy extends Object implements MapMergePolicy, IdentifiedDataSerializable
| Constructor and Description |
|---|
HigherHitsMapMergePolicy() |
| Modifier and Type | Method and Description |
|---|---|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
Object |
merge(String mapName,
EntryView mergingEntry,
EntryView existingEntry)
Selects one of the merging and existing map entries to be merged.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public Object merge(String mapName, EntryView mergingEntry, EntryView existingEntry)
MapMergePolicy
Note that the existingEntry may be null if there
is no entry with the same key in the destination map.
This happens, when the entry for that key was
merge in interface MapMergePolicymapName - name of the mapmergingEntry - EntryView instance that has the map entry to be mergedexistingEntry - EntryView instance that has the existing map entry
or null if there is no existing map entrynull if the entry should be removedpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializableCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.