Search in sources :

Example 1 with MapReplicationUpdate

use of com.hazelcast.map.impl.wan.MapReplicationUpdate in project hazelcast by hazelcast.

the class MapEventPublisherImpl method publishWanReplicationUpdate.

@Override
public void publishWanReplicationUpdate(String mapName, EntryView entryView) {
    MapContainer mapContainer = mapServiceContext.getMapContainer(mapName);
    MapReplicationUpdate replicationEvent = new MapReplicationUpdate(mapName, mapContainer.getWanMergePolicy(), entryView);
    mapContainer.getWanReplicationPublisher().publishReplicationEvent(SERVICE_NAME, replicationEvent);
}
Also used : MapReplicationUpdate(com.hazelcast.map.impl.wan.MapReplicationUpdate) MapContainer(com.hazelcast.map.impl.MapContainer)

Example 2 with MapReplicationUpdate

use of com.hazelcast.map.impl.wan.MapReplicationUpdate in project hazelcast by hazelcast.

the class WanDataSerializerHookTest method testExistingTypes.

@Test
public void testExistingTypes() {
    WanDataSerializerHook hook = new WanDataSerializerHook();
    IdentifiedDataSerializable wanReplicationEvent = hook.createFactory().create(WanDataSerializerHook.WAN_REPLICATION_EVENT);
    assertTrue(wanReplicationEvent instanceof WanReplicationEvent);
    IdentifiedDataSerializable mapUpdate = hook.createFactory().create(WanDataSerializerHook.MAP_REPLICATION_UPDATE);
    assertTrue(mapUpdate instanceof MapReplicationUpdate);
    IdentifiedDataSerializable mapRemove = hook.createFactory().create(WanDataSerializerHook.MAP_REPLICATION_REMOVE);
    assertTrue(mapRemove instanceof MapReplicationRemove);
}
Also used : IdentifiedDataSerializable(com.hazelcast.nio.serialization.IdentifiedDataSerializable) MapReplicationRemove(com.hazelcast.map.impl.wan.MapReplicationRemove) WanReplicationEvent(com.hazelcast.wan.WanReplicationEvent) MapReplicationUpdate(com.hazelcast.map.impl.wan.MapReplicationUpdate) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

MapReplicationUpdate (com.hazelcast.map.impl.wan.MapReplicationUpdate)2 MapContainer (com.hazelcast.map.impl.MapContainer)1 MapReplicationRemove (com.hazelcast.map.impl.wan.MapReplicationRemove)1 IdentifiedDataSerializable (com.hazelcast.nio.serialization.IdentifiedDataSerializable)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 WanReplicationEvent (com.hazelcast.wan.WanReplicationEvent)1 Test (org.junit.Test)1