use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class AddAllOperationTest method setup.
@Before
public void setup() {
RingbufferConfig rbConfig = new RingbufferConfig("foo").setCapacity(10).setTimeToLiveSeconds(10);
Config config = new Config().addRingBufferConfig(rbConfig);
HazelcastInstance hz = createHazelcastInstance(config);
nodeEngine = getNodeEngineImpl(hz);
serializationService = getSerializationService(hz);
ringbuffer = hz.getRingbuffer(rbConfig.getName());
ringbufferService = nodeEngine.getService(RingbufferService.SERVICE_NAME);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class GenericOperationTest method setup.
@Before
public void setup() {
RingbufferConfig rbConfig = new RingbufferConfig("foo").setCapacity(CAPACITY).setTimeToLiveSeconds(10);
Config config = new Config().addRingBufferConfig(rbConfig);
HazelcastInstance hz = createHazelcastInstance(config);
nodeEngine = getNodeEngineImpl(hz);
serializationService = nodeEngine.getSerializationService();
final String name = rbConfig.getName();
ringbuffer = hz.getRingbuffer(name);
ringbufferService = getNodeEngineImpl(hz).getService(RingbufferService.SERVICE_NAME);
ringbufferContainer = ringbufferService.getOrCreateContainer(ringbufferService.getRingbufferPartitionId(name), RingbufferService.getRingbufferNamespace(name), rbConfig);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class ReadOneOperationTest method setup.
@Before
public void setup() {
RingbufferConfig rbConfig = new RingbufferConfig("foo").setCapacity(10).setTimeToLiveSeconds(10);
Config config = new Config().addRingBufferConfig(rbConfig);
hz = createHazelcastInstance(config);
nodeEngine = getNodeEngineImpl(hz);
serializationService = getSerializationService(hz);
final String name = rbConfig.getName();
ringbuffer = hz.getRingbuffer(name);
ringbufferService = getNodeEngineImpl(hz).getService(RingbufferService.SERVICE_NAME);
ringbufferContainer = ringbufferService.getOrCreateContainer(ringbufferService.getRingbufferPartitionId(name), RingbufferService.getRingbufferNamespace(name), rbConfig);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class ReadManyOperationTest method setup.
@Before
public void setup() {
RingbufferConfig rbConfig = new RingbufferConfig("foo").setCapacity(10).setTimeToLiveSeconds(10);
Config config = new Config().addRingBufferConfig(rbConfig);
hz = createHazelcastInstance(config);
nodeEngine = getNodeEngineImpl(hz);
serializationService = nodeEngine.getSerializationService();
final String name = rbConfig.getName();
ringbuffer = hz.getRingbuffer(name);
ringbufferService = getNodeEngineImpl(hz).getService(RingbufferService.SERVICE_NAME);
ringbufferContainer = ringbufferService.getOrCreateContainer(ringbufferService.getRingbufferPartitionId(name), RingbufferService.getRingbufferNamespace(name), rbConfig);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class RingbufferTTLTest method setup.
public void setup(RingbufferConfig ringbufferConfig) {
Config config = new Config();
config.addRingBufferConfig(ringbufferConfig);
hz = createHazelcastInstance(config);
final String name = ringbufferConfig.getName();
ringbuffer = hz.getRingbuffer(name);
RingbufferService ringbufferService = getNodeEngineImpl(hz).getService(RingbufferService.SERVICE_NAME);
ringbufferContainer = ringbufferService.getOrCreateContainer(ringbufferService.getRingbufferPartitionId(name), RingbufferService.getRingbufferNamespace(name), ringbufferConfig);
arrayRingbuffer = (ArrayRingbuffer) ringbufferContainer.getRingbuffer();
}
Aggregations