Search in sources :

Example 31 with ReplicatedMapConfig

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);
}
Also used : ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 32 with ReplicatedMapConfig

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);
    }
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig)

Example 33 with ReplicatedMapConfig

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);
}
Also used : ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 34 with ReplicatedMapConfig

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);
}
Also used : ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ReplicatedMap(com.hazelcast.replicatedmap.ReplicatedMap) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 35 with ReplicatedMapConfig

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;
}
Also used : ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig)

Aggregations

ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)36 Test (org.junit.Test)16 QuickTest (com.hazelcast.test.annotation.QuickTest)15 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)13 Config (com.hazelcast.config.Config)9 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)8 MergePolicyConfig (com.hazelcast.config.MergePolicyConfig)7 ListenerConfig (com.hazelcast.config.ListenerConfig)6 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)5 CacheSimpleEntryListenerConfig (com.hazelcast.config.CacheSimpleEntryListenerConfig)5 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)5 DurableExecutorConfig (com.hazelcast.config.DurableExecutorConfig)5 ExecutorConfig (com.hazelcast.config.ExecutorConfig)5 FlakeIdGeneratorConfig (com.hazelcast.config.FlakeIdGeneratorConfig)5 ListConfig (com.hazelcast.config.ListConfig)5 MapConfig (com.hazelcast.config.MapConfig)5 MultiMapConfig (com.hazelcast.config.MultiMapConfig)5 PNCounterConfig (com.hazelcast.config.PNCounterConfig)5 QueueConfig (com.hazelcast.config.QueueConfig)5 ReliableTopicConfig (com.hazelcast.config.ReliableTopicConfig)5