Search in sources :

Example 21 with TopicConfig

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

the class DynamicConfigTest method assertConfigurationsEqualOnAllMembers.

private void assertConfigurationsEqualOnAllMembers(TopicConfig topicConfig) {
    String name = topicConfig.getName();
    for (HazelcastInstance instance : members) {
        TopicConfig registeredConfig = instance.getConfig().getTopicConfig(name);
        assertEquals(topicConfig, registeredConfig);
    }
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig)

Example 22 with TopicConfig

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

the class DynamicConfigTest method testTopicConfig.

@Test
public void testTopicConfig() {
    TopicConfig topicConfig = new TopicConfig(name).setGlobalOrderingEnabled(true).setMultiThreadingEnabled(false).setStatisticsEnabled(true);
    driver.getConfig().addTopicConfig(topicConfig);
    assertConfigurationsEqualOnAllMembers(topicConfig);
}
Also used : ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 23 with TopicConfig

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

the class ReliableTopicStressTest method setup.

@Before
public void setup() {
    Config config = new Config();
    RingbufferConfig ringbufferConfig = new RingbufferConfig("foobar");
    ringbufferConfig.setCapacity(1000 * 1000);
    ringbufferConfig.setTimeToLiveSeconds(5);
    config.addRingBufferConfig(ringbufferConfig);
    TopicConfig topicConfig = new TopicConfig("foobar");
    config.addTopicConfig(topicConfig);
    HazelcastInstance hz = createHazelcastInstance(config);
    topic = hz.getReliableTopic(topicConfig.getName());
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) Config(com.hazelcast.config.Config) RingbufferConfig(com.hazelcast.config.RingbufferConfig) TopicConfig(com.hazelcast.config.TopicConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) TopicConfig(com.hazelcast.config.TopicConfig) Before(org.junit.Before)

Aggregations

TopicConfig (com.hazelcast.config.TopicConfig)23 ReliableTopicConfig (com.hazelcast.config.ReliableTopicConfig)16 ListenerConfig (com.hazelcast.config.ListenerConfig)9 Test (org.junit.Test)9 Config (com.hazelcast.config.Config)8 RingbufferConfig (com.hazelcast.config.RingbufferConfig)8 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)7 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)7 DurableExecutorConfig (com.hazelcast.config.DurableExecutorConfig)7 ExecutorConfig (com.hazelcast.config.ExecutorConfig)7 FlakeIdGeneratorConfig (com.hazelcast.config.FlakeIdGeneratorConfig)7 ListConfig (com.hazelcast.config.ListConfig)7 MapConfig (com.hazelcast.config.MapConfig)7 MultiMapConfig (com.hazelcast.config.MultiMapConfig)7 PNCounterConfig (com.hazelcast.config.PNCounterConfig)7 QueueConfig (com.hazelcast.config.QueueConfig)7 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)7 ScheduledExecutorConfig (com.hazelcast.config.ScheduledExecutorConfig)7 SetConfig (com.hazelcast.config.SetConfig)7 QuickTest (com.hazelcast.test.annotation.QuickTest)7