com.hazelcast.map.merge
Class PassThroughMergePolicy

java.lang.Object
  extended by com.hazelcast.map.merge.PassThroughMergePolicy
All Implemented Interfaces:
MapMergePolicy, DataSerializable

public class PassThroughMergePolicy
extends Object
implements MapMergePolicy

PassThroughMergePolicy causes the merging entry to be merged from source to destination map unless merging entry is null.


Constructor Summary
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.
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassThroughMergePolicy

public PassThroughMergePolicy()
Method Detail

merge

public Object merge(String mapName,
                    EntryView mergingEntry,
                    EntryView existingEntry)
Description copied from interface: MapMergePolicy
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.

Specified by:
merge in interface MapMergePolicy
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.

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException


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