use of com.hazelcast.map.impl.wan.WanMapAddOrUpdateEvent in project hazelcast by hazelcast.
the class MapEventPublisherImpl method publishWanUpdate.
@Override
public void publishWanUpdate(@Nonnull String mapName, @Nonnull WanMapEntryView<Object, Object> entryView, boolean hasLoadProvenance) {
if (!isOwnedPartition(entryView.getDataKey())) {
return;
}
MapContainer mapContainer = mapServiceContext.getMapContainer(mapName);
SplitBrainMergePolicy wanMergePolicy = mapContainer.getWanMergePolicy();
WanMapAddOrUpdateEvent event = new WanMapAddOrUpdateEvent(mapName, wanMergePolicy, entryView);
publishWanEvent(mapName, event);
}
use of com.hazelcast.map.impl.wan.WanMapAddOrUpdateEvent in project hazelcast by hazelcast.
the class WanDataSerializerHookTest method testExistingTypes.
@Test
public void testExistingTypes() {
WanDataSerializerHook hook = new WanDataSerializerHook();
IdentifiedDataSerializable mapUpdate = hook.createFactory().create(WanDataSerializerHook.MAP_REPLICATION_UPDATE);
assertTrue(mapUpdate instanceof WanMapAddOrUpdateEvent);
IdentifiedDataSerializable mapRemove = hook.createFactory().create(WanDataSerializerHook.MAP_REPLICATION_REMOVE);
assertTrue(mapRemove instanceof WanMapRemoveEvent);
}
Aggregations