Search in sources :

Example 91 with RingbufferConfig

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

the class RingbufferMapEventJournalImpl method toRingbufferConfig.

@Override
public RingbufferConfig toRingbufferConfig(EventJournalConfig config, ObjectNamespace namespace) {
    MapContainer mapContainer = mapServiceContext.getMapContainer(namespace.getObjectName());
    int partitionCount = nodeEngine.getPartitionService().getPartitionCount();
    return new RingbufferConfig().setAsyncBackupCount(mapContainer.getAsyncBackupCount()).setBackupCount(mapContainer.getBackupCount()).setInMemoryFormat(InMemoryFormat.OBJECT).setCapacity(config.getCapacity() / partitionCount).setTimeToLiveSeconds(config.getTimeToLiveSeconds());
}
Also used : RingbufferConfig(com.hazelcast.config.RingbufferConfig) MapContainer(com.hazelcast.map.impl.MapContainer)

Aggregations

RingbufferConfig (com.hazelcast.config.RingbufferConfig)91 Test (org.junit.Test)43 Config (com.hazelcast.config.Config)35 QuickTest (com.hazelcast.test.annotation.QuickTest)26 HazelcastInstance (com.hazelcast.core.HazelcastInstance)22 Before (org.junit.Before)21 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)14 NightlyTest (com.hazelcast.test.annotation.NightlyTest)12 ReliableTopicConfig (com.hazelcast.config.ReliableTopicConfig)11 RingbufferStoreConfig (com.hazelcast.config.RingbufferStoreConfig)9 Data (com.hazelcast.internal.serialization.Data)7 TopicConfig (com.hazelcast.config.TopicConfig)6 ClientConfig (com.hazelcast.client.config.ClientConfig)5 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)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