public final class PutIfAbsentMapMergePolicy extends Object implements ReplicatedMapMergePolicy, IdentifiedDataSerializable
Modifier and Type | Field and Description |
---|---|
static PutIfAbsentMapMergePolicy |
INSTANCE
Single instance of this class.
|
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,
com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView mergingEntry,
com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView 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 static final PutIfAbsentMapMergePolicy INSTANCE
public Object merge(String mapName, com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView mergingEntry, com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView existingEntry)
ReplicatedMapMergePolicy
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 ReplicatedMapMergePolicy
mapName
- name of the replicated mapmergingEntry
- ReplicatedMapEntryView
instance that has the map entry to be mergedexistingEntry
- ReplicatedMapEntryView
instance that has the existing map entry
or null
if there is no existing map entrynull
if the entry should be removedpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out)
DataSerializable
writeData
in interface DataSerializable
out
- outputpublic void readData(ObjectDataInput in)
DataSerializable
readData
in interface DataSerializable
in
- inputCopyright © 2018 Hazelcast, Inc.. All rights reserved.