use of com.hazelcast.config.WanCustomPublisherConfig in project hazelcast by hazelcast.
the class WanCustomPublisherConfigDTOTest method testDefault.
@Test
public void testDefault() {
WanCustomPublisherConfig expected = new WanCustomPublisherConfig();
WanCustomPublisherConfig actual = cloneThroughJson(expected);
assertTrue("Expected: " + expected + ", got:" + actual, WAN_PUBLISHER_CONFIG_CHECKER.check(expected, actual));
}
use of com.hazelcast.config.WanCustomPublisherConfig in project hazelcast by hazelcast.
the class WanReplicationConfigurationTest method getConfig.
@Override
protected Config getConfig() {
if (!isWanReplicationEnabled) {
return super.getConfig();
}
WanCustomPublisherConfig wanCustomPublisherConfig = new WanCustomPublisherConfig().setPublisherId("dummyPublisherId").setClassName(WanDummyPublisher.class.getName());
WanReplicationConfig wanReplicationConfig = new WanReplicationConfig().setName("dummyWan").addCustomPublisherConfig(wanCustomPublisherConfig);
WanReplicationRef wanRef = new WanReplicationRef().setName("dummyWan").setRepublishingEnabled(isWanRepublishingEnabled).setMergePolicyClassName(PassThroughMergePolicy.class.getName());
MapConfig mapConfig = new MapConfig("default").setWanReplicationRef(wanRef);
return super.getConfig().addWanReplicationConfig(wanReplicationConfig).addMapConfig(mapConfig);
}
Aggregations