use of com.hazelcast.quorum.PartitionedCluster in project hazelcast by hazelcast.
the class CacheWriteQuorumTest method initialize.
@BeforeClass
public static void initialize() throws Exception {
CacheSimpleConfig cacheConfig = new CacheSimpleConfig();
cacheConfig.setName(CACHE_NAME_PREFIX + "*");
cacheConfig.setQuorumName(QUORUM_ID);
QuorumConfig quorumConfig = new QuorumConfig();
quorumConfig.setName(QUORUM_ID);
quorumConfig.setType(QuorumType.WRITE);
quorumConfig.setEnabled(true);
quorumConfig.setSize(3);
PartitionedCluster cluster = new PartitionedCluster(new TestHazelcastInstanceFactory()).partitionFiveMembersThreeAndTwo(cacheConfig, quorumConfig);
cachingProvider1 = HazelcastServerCachingProvider.createCachingProvider(cluster.h1);
cachingProvider2 = HazelcastServerCachingProvider.createCachingProvider(cluster.h2);
cachingProvider3 = HazelcastServerCachingProvider.createCachingProvider(cluster.h3);
cachingProvider4 = HazelcastServerCachingProvider.createCachingProvider(cluster.h4);
cachingProvider5 = HazelcastServerCachingProvider.createCachingProvider(cluster.h5);
}
use of com.hazelcast.quorum.PartitionedCluster 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);
}
use of com.hazelcast.quorum.PartitionedCluster in project hazelcast by hazelcast.
the class MapReadQuorumTest method initialize.
@BeforeClass
public static void initialize() throws Exception {
QuorumConfig quorumConfig = new QuorumConfig();
quorumConfig.setName(QUORUM_ID);
quorumConfig.setType(QuorumType.READ);
quorumConfig.setEnabled(true);
quorumConfig.setSize(3);
MapConfig mapConfig = new MapConfig(MAP_NAME_PREFIX + "*");
mapConfig.setQuorumName(QUORUM_ID);
cluster = new PartitionedCluster(new TestHazelcastInstanceFactory()).partitionFiveMembersThreeAndTwo(mapConfig, quorumConfig);
}
use of com.hazelcast.quorum.PartitionedCluster 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.quorum.PartitionedCluster in project hazelcast by hazelcast.
the class ClientMapReadQuorumTest method initialize.
@BeforeClass
public static void initialize() throws Exception {
QuorumConfig quorumConfig = new QuorumConfig();
quorumConfig.setName(QUORUM_ID);
quorumConfig.setEnabled(true);
quorumConfig.setSize(3);
quorumConfig.setType(QuorumType.READ);
MapConfig mapConfig = new MapConfig(MAP_NAME_PREFIX + "*");
mapConfig.setQuorumName(QUORUM_ID);
factory = new TestHazelcastFactory();
cluster = new PartitionedCluster(factory).partitionFiveMembersThreeAndTwo(mapConfig, quorumConfig);
initializeClients();
verifyClients();
}
Aggregations