use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class ReliableTopicBlockTest method setup.
@Before
public void setup() {
Config config = smallInstanceConfig();
config.addRingBufferConfig(new RingbufferConfig("blockingReliableTopic*").setCapacity(10).setTimeToLiveSeconds(60));
config.addReliableTopicConfig(new ReliableTopicConfig("blockingReliableTopic*").setReadBatchSize(10).setTopicOverloadPolicy(TopicOverloadPolicy.BLOCK));
HazelcastInstance[] instances = createHazelcastInstanceFactory(1).newInstances(config);
local = instances[0];
HazelcastInstance target = instances[instances.length - 1];
String name = randomNameOwnedBy(target, "reliableTopic");
topic = local.getReliableTopic(name);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class ErrorHandlingTest method setup.
@Before
public void setup() {
Config config = new Config();
config.addRingBufferConfig(new RingbufferConfig("foo").setCapacity(100).setTimeToLiveSeconds(0));
HazelcastInstance hz = createHazelcastInstance(config);
topic = (ReliableTopicProxy<String>) hz.<String>getReliableTopic("foo");
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class ReliableTopicAbstractTest method setup.
@Before
public void setup() {
ReliableTopicConfig topicConfig = new ReliableTopicConfig("reliableTopic*");
RingbufferConfig ringbufferConfig = new RingbufferConfig(topicConfig.getName());
ringbufferConfig.setCapacity(CAPACITY);
Config config = new Config();
config.addReliableTopicConfig(topicConfig);
config.addRingBufferConfig(ringbufferConfig);
instances = newInstances(config);
local = instances[0];
HazelcastInstance target = instances[instances.length - 1];
String name = randomNameOwnedBy(target, "reliableTopic");
topic = (ReliableTopicProxy<String>) local.<String>getReliableTopic(name);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class RingbufferAddAllReadManyStressTest method whenNoTTL.
@Test(timeout = MINUTE * 10)
public void whenNoTTL() {
RingbufferConfig ringbufferConfig = new RingbufferConfig("rb").setCapacity(20 * 1000 * 1000).setInMemoryFormat(InMemoryFormat.OBJECT).setTimeToLiveSeconds(0);
test(ringbufferConfig);
}
use of com.hazelcast.config.RingbufferConfig in project hazelcast by hazelcast.
the class RingbufferAddAllReadManyStressTest method whenTTLEnabled.
@Test(timeout = MINUTE * 10)
public void whenTTLEnabled() {
RingbufferConfig ringbufferConfig = new RingbufferConfig("rb").setCapacity(200 * 1000).setTimeToLiveSeconds(2);
test(ringbufferConfig);
}
Aggregations