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 MapMergePolicy
mapName
- 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
DataSerializable
writeData
in interface DataSerializable
out
- 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
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.