use of com.hazelcast.config.CRDTReplicationConfig in project hazelcast by hazelcast.
the class TestFullApplicationContext method testCRDTReplicationConfig.
@Test
public void testCRDTReplicationConfig() {
CRDTReplicationConfig replicationConfig = config.getCRDTReplicationConfig();
assertEquals(10, replicationConfig.getMaxConcurrentReplicationTargets());
assertEquals(2000, replicationConfig.getReplicationPeriodMillis());
}
use of com.hazelcast.config.CRDTReplicationConfig in project hazelcast by hazelcast.
the class PNCounterConsistencyLostTest method setup.
@Before
public void setup() {
final Config dataConfig = new Config().setProperty(ClusterProperty.PARTITION_COUNT.getName(), "5").setCRDTReplicationConfig(new CRDTReplicationConfig().setReplicationPeriodMillis(Integer.MAX_VALUE).setMaxConcurrentReplicationTargets(Integer.MAX_VALUE));
final Config liteConfig = new Config().setProperty(ClusterProperty.PARTITION_COUNT.getName(), "5").setLiteMember(true);
TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);
members = factory.newInstances(dataConfig, 2);
liteMember = factory.newHazelcastInstance(liteConfig);
}
use of com.hazelcast.config.CRDTReplicationConfig in project hazelcast by hazelcast.
the class ClientPNCounterBasicIntegrationTest method setup.
@Before
public void setup() {
final PNCounterConfig counterConfig = new PNCounterConfig().setName("default").setReplicaCount(replicaCount).setStatisticsEnabled(true);
final Config config = new Config().setProperty(ClusterProperty.PARTITION_COUNT.getName(), "5").setCRDTReplicationConfig(new CRDTReplicationConfig().setReplicationPeriodMillis(200).setMaxConcurrentReplicationTargets(Integer.MAX_VALUE)).addPNCounterConfig(counterConfig);
members = hazelcastFactory.newInstances(config, 2);
clients = new HazelcastInstance[] { hazelcastFactory.newHazelcastClient(), hazelcastFactory.newHazelcastClient() };
}
use of com.hazelcast.config.CRDTReplicationConfig in project hazelcast by hazelcast.
the class ClientPNCounterConsistencyLostTest method setup.
@Before
public void setup() {
final Config config = new Config().setProperty(ClusterProperty.PARTITION_COUNT.getName(), "5").setCRDTReplicationConfig(new CRDTReplicationConfig().setReplicationPeriodMillis(Integer.MAX_VALUE).setMaxConcurrentReplicationTargets(Integer.MAX_VALUE));
members = hazelcastFactory.newInstances(config, 2);
client = hazelcastFactory.newHazelcastClient();
}
use of com.hazelcast.config.CRDTReplicationConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleCRDTReplication.
private void handleCRDTReplication(Node root) {
final CRDTReplicationConfig replicationConfig = new CRDTReplicationConfig();
final String replicationPeriodMillisName = "replication-period-millis";
final String maxConcurrentReplicationTargetsName = "max-concurrent-replication-targets";
for (Node n : childElements(root)) {
final String name = cleanNodeName(n);
if (matches(replicationPeriodMillisName, name)) {
replicationConfig.setReplicationPeriodMillis(getIntegerValue(replicationPeriodMillisName, getTextContent(n)));
} else if (matches(maxConcurrentReplicationTargetsName, name)) {
replicationConfig.setMaxConcurrentReplicationTargets(getIntegerValue(maxConcurrentReplicationTargetsName, getTextContent(n)));
}
}
this.config.setCRDTReplicationConfig(replicationConfig);
}
Aggregations