use of com.hazelcast.config.LockConfig in project hazelcast by hazelcast.
the class TestFullApplicationContext method testLockConfig.
@Test
public void testLockConfig() {
LockConfig lockConfig = config.getLockConfig("lock");
assertNotNull(lockConfig);
assertEquals("lock", lockConfig.getName());
assertEquals("my-quorum", lockConfig.getQuorumName());
}
use of com.hazelcast.config.LockConfig in project hazelcast by hazelcast.
the class PartitionedCluster method createFiveMemberCluster.
public PartitionedCluster createFiveMemberCluster(LockConfig lockConfig, QuorumConfig quorumConfig) {
Config config = createClusterConfig().addLockConfig(lockConfig).addQuorumConfig(quorumConfig);
createInstances(config);
return this;
}
use of com.hazelcast.config.LockConfig in project hazelcast by hazelcast.
the class AbstractLockQuorumTest method initializeFiveMemberCluster.
static void initializeFiveMemberCluster(QuorumType type, int quorumSize) {
QuorumConfig quorumConfig = new QuorumConfig().setName(QUORUM_ID).setType(type).setEnabled(true).setSize(quorumSize);
LockConfig lockConfig = new LockConfig(LOCK_NAME_PREFIX + "*").setQuorumName(QUORUM_ID);
cluster = new PartitionedCluster(new TestHazelcastInstanceFactory());
cluster.createFiveMemberCluster(lockConfig, quorumConfig);
l1 = getLock(cluster.h1);
l2 = getLock(cluster.h2);
l3 = getLock(cluster.h3);
l4 = getLock(cluster.h4);
l5 = getLock(cluster.h5);
}
Aggregations