use of com.hazelcast.config.ReplicatedMapConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method testReplicatedMapDefaultConfig.
@Test
public void testReplicatedMapDefaultConfig() {
ReplicatedMapConfig config = new ReplicatedMapConfig(name);
driver.getConfig().addReplicatedMapConfig(config);
assertConfigurationsEqualOnAllMembers(config);
}
use of com.hazelcast.config.ReplicatedMapConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method assertConfigurationsEqualOnAllMembers.
private void assertConfigurationsEqualOnAllMembers(ReplicatedMapConfig replicatedMapConfig) {
String name = replicatedMapConfig.getName();
for (HazelcastInstance instance : members) {
ReplicatedMapConfig registeredConfig = instance.getConfig().getReplicatedMapConfig(name);
assertEquals(replicatedMapConfig, registeredConfig);
}
}
use of com.hazelcast.config.ReplicatedMapConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method testReplicatedMapConfig_withListenerByClassName.
@Test
public void testReplicatedMapConfig_withListenerByClassName() {
ReplicatedMapConfig config = new ReplicatedMapConfig(name).setStatisticsEnabled(true).setInMemoryFormat(InMemoryFormat.NATIVE).addEntryListenerConfig(new EntryListenerConfig(randomString(), true, false));
config.getMergePolicyConfig().setPolicy("com.hazelcast.SomeMergePolicy");
config.setAsyncFillup(true);
driver.getConfig().addReplicatedMapConfig(config);
assertConfigurationsEqualOnAllMembers(config);
}
use of com.hazelcast.config.ReplicatedMapConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method testSameReplicatedMapConfig_canBeAddedTwice.
@Test
public void testSameReplicatedMapConfig_canBeAddedTwice() {
ReplicatedMapConfig config = new ReplicatedMapConfig(name);
driver.getConfig().addReplicatedMapConfig(config);
ReplicatedMap map = driver.getReplicatedMap(name);
driver.getConfig().addReplicatedMapConfig(config);
assertConfigurationsEqualOnAllMembers(config);
}
use of com.hazelcast.config.ReplicatedMapConfig in project hazelcast by hazelcast.
the class AbstractSplitBrainProtectionTest method newReplicatedMapConfig.
protected static ReplicatedMapConfig newReplicatedMapConfig(SplitBrainProtectionOn splitBrainProtectionOn, String splitBrainProtectionName) {
ReplicatedMapConfig config = new ReplicatedMapConfig(REPLICATED_MAP_NAME + splitBrainProtectionOn.name());
config.setSplitBrainProtectionName(splitBrainProtectionName);
return config;
}
Aggregations