use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class QueueAbstractTest method setup.
@Before
public void setup() {
Config config = smallInstanceConfig();
config.getQueueConfig("default").setPriorityComparatorClassName(comparatorClassName);
config.getQueueConfig("testOffer_whenFull*").setMaxSize(100);
config.getQueueConfig("testOfferWithTimeout*").setMaxSize(100);
instances = newInstances(config);
HazelcastInstance local = instances[0];
HazelcastInstance target = instances[instances.length - 1];
String methodName = getTestMethodName();
String name = randomNameOwnedBy(target, methodName);
queueConfig = config.getQueueConfig(name);
queue = local.getQueue(name);
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class StoreLatencyPlugin_QueueIntegrationTest method setup.
@Before
public void setup() {
Config config = smallInstanceConfig().setProperty("hazelcast.diagnostics.enabled", "true").setProperty("hazelcast.diagnostics.storeLatency.period.seconds", "1");
config.getQueueConfig("default").setPriorityComparatorClassName(comparatorClassName);
QueueConfig queueConfig = addQueueConfig(config);
hz = createHazelcastInstance(config);
queue = hz.getQueue(queueConfig.getName());
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class ConfigUtilsTest method getExistingConfig.
@Test
public void getExistingConfig() {
QueueConfig aDefault = new QueueConfig("newConfig");
aDefault.setBackupCount(5);
queueConfigs.put(aDefault.getName(), aDefault);
QueueConfig newConfig = ConfigUtils.getConfig(configPatternMatcher, queueConfigs, "newConfig", QueueConfig.class);
assertEquals("newConfig", newConfig.getName());
assertEquals(5, newConfig.getBackupCount());
assertEquals(1, queueConfigs.size());
assertTrue(queueConfigs.containsKey("newConfig"));
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class ConfigUtilsTest method getNonExistingConfig_createNewWithCloningDefault.
@Test
public void getNonExistingConfig_createNewWithCloningDefault() {
QueueConfig aDefault = new QueueConfig("default");
aDefault.setBackupCount(5);
queueConfigs.put(aDefault.getName(), aDefault);
QueueConfig newConfig = ConfigUtils.getConfig(configPatternMatcher, queueConfigs, "newConfig", QueueConfig.class);
assertEquals("newConfig", newConfig.getName());
assertEquals(5, newConfig.getBackupCount());
assertEquals(2, queueConfigs.size());
assertTrue(queueConfigs.containsKey("newConfig"));
assertTrue(queueConfigs.containsKey("default"));
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class MergePolicyValidatorQueueIntegrationTest method addConfig.
@Override
void addConfig(Config config, String name, MergePolicyConfig mergePolicyConfig) {
QueueConfig queueConfig = new QueueConfig(name).setMergePolicyConfig(mergePolicyConfig);
config.addQueueConfig(queueConfig);
}
Aggregations