@Override
public void onReplicationEvent(WanReplicationEvent replicationEvent) {
Object eventObject = replicationEvent.getEventObject();
if (eventObject instanceof MapReplicationUpdate) {
MapReplicationUpdate replicationUpdate = (MapReplicationUpdate) eventObject;
EntryView entryView = replicationUpdate.getEntryView();
MapMergePolicy mergePolicy = replicationUpdate.getMergePolicy();
String mapName = replicationUpdate.getMapName();
MapContainer mapContainer = getMapContainer(mapName);
MergeOperation operation = new MergeOperation(mapName, toData(entryView.getKey(), mapContainer.getPartitioningStrategy()), entryView, mergePolicy);
try {
int partitionId = nodeEngine.getPartitionService().getPartitionId(entryView.getKey());
Future f = nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME, operation, partitionId);