use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class QueueReplicationOperation method run.
@Override
public void run() {
QueueService service = getService();
NodeEngine nodeEngine = getNodeEngine();
Config config = nodeEngine.getConfig();
for (Map.Entry<String, QueueContainer> entry : migrationData.entrySet()) {
String name = entry.getKey();
QueueContainer container = entry.getValue();
QueueConfig conf = config.findQueueConfig(name);
container.setConfig(conf, nodeEngine, service);
service.addContainer(name, container);
}
}
use of com.hazelcast.config.QueueConfig in project spring-boot by spring-projects.
the class HazelcastAutoConfigurationTests method configInstanceWithoutName.
@Test
public void configInstanceWithoutName() {
load(HazelcastConfigNoName.class, "spring.hazelcast.config=this-is-ignored.xml");
HazelcastInstance hazelcastInstance = this.context.getBean(HazelcastInstance.class);
Map<String, QueueConfig> queueConfigs = hazelcastInstance.getConfig().getQueueConfigs();
assertThat(queueConfigs).hasSize(1).containsKey("another-queue");
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class PartitionedCluster method createFiveMemberCluster.
public PartitionedCluster createFiveMemberCluster(QueueConfig queueConfig, QuorumConfig quorumConfig) {
Config config = createClusterConfig().addQueueConfig(queueConfig).addQuorumConfig(quorumConfig);
createInstances(config);
return this;
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class AbstractQueueQuorumTest method initializeFiveMemberCluster.
protected static void initializeFiveMemberCluster(QuorumType type, int quorumSize) {
QuorumConfig quorumConfig = new QuorumConfig().setName(QUORUM_ID).setType(type).setEnabled(true).setSize(quorumSize);
QueueConfig qConfig = new QueueConfig(QUEUE_NAME_PREFIX + "*").setBackupCount(4).setQuorumName(QUORUM_ID);
cluster = new PartitionedCluster(new TestHazelcastInstanceFactory());
cluster.createFiveMemberCluster(qConfig, quorumConfig);
q1 = getQueue(cluster.h1);
q2 = getQueue(cluster.h2);
q3 = getQueue(cluster.h3);
q4 = getQueue(cluster.h4);
q5 = getQueue(cluster.h5);
}
use of com.hazelcast.config.QueueConfig in project hazelcast by hazelcast.
the class QueueAbstractTest method setup.
@Before
public void setup() {
Config config = new Config();
config.addQueueConfig(new QueueConfig("testOffer_whenFull*").setMaxSize(100));
config.addQueueConfig(new QueueConfig("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);
}
Aggregations