Search in sources :

Example 1 with LockConfig

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());
}
Also used : LockConfig(com.hazelcast.config.LockConfig) Test(org.junit.Test) QuickTest(com.hazelcast.test.annotation.QuickTest)

Example 2 with LockConfig

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;
}
Also used : Config(com.hazelcast.config.Config) QueueConfig(com.hazelcast.config.QueueConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) LockConfig(com.hazelcast.config.LockConfig) MapConfig(com.hazelcast.config.MapConfig) QuorumConfig(com.hazelcast.config.QuorumConfig)

Example 3 with LockConfig

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);
}
Also used : QuorumConfig(com.hazelcast.config.QuorumConfig) LockConfig(com.hazelcast.config.LockConfig) PartitionedCluster(com.hazelcast.quorum.PartitionedCluster) TestHazelcastInstanceFactory(com.hazelcast.test.TestHazelcastInstanceFactory)

Aggregations

LockConfig (com.hazelcast.config.LockConfig)3 QuorumConfig (com.hazelcast.config.QuorumConfig)2 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)1 Config (com.hazelcast.config.Config)1 MapConfig (com.hazelcast.config.MapConfig)1 QueueConfig (com.hazelcast.config.QueueConfig)1 PartitionedCluster (com.hazelcast.quorum.PartitionedCluster)1 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1