Search in sources :

Example 1 with SetConfig

use of com.hazelcast.config.SetConfig in project hazelcast by hazelcast.

the class DynamicConfigTest method testSetConfig_whenItemListenersConfigured.

@Test
public void testSetConfig_whenItemListenersConfigured() {
    SetConfig setConfig = getSetConfig(name);
    setConfig.addItemListenerConfig(getItemListenerConfig_byImplementation());
    setConfig.addItemListenerConfig(getItemListenerConfig_byClassName());
    driver.getConfig().addSetConfig(setConfig);
    assertConfigurationsEqualOnAllMembers(setConfig);
}
Also used : SetConfig(com.hazelcast.config.SetConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 2 with SetConfig

use of com.hazelcast.config.SetConfig in project hazelcast by hazelcast.

the class DynamicConfigTest method testSetConfig.

@Test
public void testSetConfig() {
    SetConfig setConfig = getSetConfig(name);
    driver.getConfig().addSetConfig(setConfig);
    assertConfigurationsEqualOnAllMembers(setConfig);
}
Also used : SetConfig(com.hazelcast.config.SetConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 3 with SetConfig

use of com.hazelcast.config.SetConfig in project hazelcast by hazelcast.

the class ConfigSearchTest method testSetConfig_Dynamic.

@Test
public void testSetConfig_Dynamic() {
    TestCase<SetConfig> testCase = new TestCase<SetConfig>(new SetConfig().setName(STATIC_NAME), new SetConfig().setName(DYNAMIC_NAME), true) {

        @Override
        void addStaticConfig(Config config) {
            config.addSetConfig(this.staticConfig);
        }

        @Override
        void addDynamicConfig(HazelcastInstance hazelcastInstance) {
            hazelcastInstance.getConfig().addSetConfig(this.dynamicConfig);
        }

        @Override
        void asserts() {
            SetConfig dataConfig = hazelcastInstance.getConfig().findSetConfig(DYNAMIC_NAME);
            assertThat(dataConfig.getName(), equalTo(DYNAMIC_NAME));
        }
    };
    testTemplate(testCase);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ListConfig(com.hazelcast.config.ListConfig) SetConfig(com.hazelcast.config.SetConfig) PNCounterConfig(com.hazelcast.config.PNCounterConfig) QueueConfig(com.hazelcast.config.QueueConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) MapConfig(com.hazelcast.config.MapConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) ExecutorConfig(com.hazelcast.config.ExecutorConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) TopicConfig(com.hazelcast.config.TopicConfig) Config(com.hazelcast.config.Config) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) SetConfig(com.hazelcast.config.SetConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 4 with SetConfig

use of com.hazelcast.config.SetConfig in project hazelcast by hazelcast.

the class MergePolicyValidatorSetIntegrationTest method addConfig.

@Override
void addConfig(Config config, String name, MergePolicyConfig mergePolicyConfig) {
    SetConfig setConfig = new SetConfig(name).setMergePolicyConfig(mergePolicyConfig);
    config.addSetConfig(setConfig);
}
Also used : SetConfig(com.hazelcast.config.SetConfig)

Example 5 with SetConfig

use of com.hazelcast.config.SetConfig in project hazelcast by hazelcast.

the class AbstractSplitBrainProtectionTest method newSetConfig.

protected static SetConfig newSetConfig(SplitBrainProtectionOn splitBrainProtectionOn, String splitBrainProtectionName) {
    SetConfig config = new SetConfig(SET_NAME + splitBrainProtectionOn.name());
    config.setSplitBrainProtectionName(splitBrainProtectionName);
    return config;
}
Also used : SetConfig(com.hazelcast.config.SetConfig)

Aggregations

SetConfig (com.hazelcast.config.SetConfig)18 Test (org.junit.Test)6 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)5 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)5 Config (com.hazelcast.config.Config)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 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)5 RingbufferConfig (com.hazelcast.config.RingbufferConfig)5 ScheduledExecutorConfig (com.hazelcast.config.ScheduledExecutorConfig)5 TopicConfig (com.hazelcast.config.TopicConfig)5 MergePolicyConfig (com.hazelcast.config.MergePolicyConfig)4 HazelcastInstance (com.hazelcast.core.HazelcastInstance)4