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());
}
Aggregations