com.hazelcast.map.merge
Interface MapMergePolicy

All Superinterfaces:
DataSerializable
All Known Implementing Classes:
HigherHitsMapMergePolicy, LatestUpdateMapMergePolicy, PassThroughMergePolicy, PutIfAbsentMapMergePolicy, VersionAwareMapMergePolicy

public interface MapMergePolicy
extends DataSerializable

A policy for merging maps after a splitbrain was detected and the different network partitions need to be merged.

See Also:
MapMergePolicy, PutIfAbsentMapMergePolicy, LatestUpdateMapMergePolicy, PassThroughMergePolicy

Method Summary
 Object merge(String mapName, EntryView mergingEntry, EntryView existingEntry)
          Returns the value of the entry after the merge of entries with the same key.
 
Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable
readData, writeData
 

Method Detail

merge

Object merge(String mapName,
             EntryView mergingEntry,
             EntryView existingEntry)
Returns the value of the entry after the merge of entries with the same key. You should consider the case where existingEntry's value is null.

Parameters:
mapName - name of the map
mergingEntry - entry merging into the destination cluster
existingEntry - existing entry in the destination cluster
Returns:
final value of the entry. If returns null then entry will be removed.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.