Search in sources :

Example 36 with ReplicatedMapConfig

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

the class ReplicatedMapStatsTest method testEmptyStatsIfDisabled.

@Test
public void testEmptyStatsIfDisabled() {
    String name = randomMapName();
    ReplicatedMapConfig replicatedMapConfig = new ReplicatedMapConfig();
    replicatedMapConfig.setName(name);
    replicatedMapConfig.setStatisticsEnabled(false);
    getInstance().getConfig().addReplicatedMapConfig(replicatedMapConfig);
    ReplicatedMap<Integer, Integer> replicatedMap = getInstance().getReplicatedMap(name);
    replicatedMap.put(1, 1);
    replicatedMap.get(1);
    LocalReplicatedMapStats stats = replicatedMap.getReplicatedMapStats();
    assertEquals(0, stats.getGetOperationCount());
    assertEquals(0, stats.getPutOperationCount());
}
Also used : ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

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