use of com.hazelcast.config.cp.SemaphoreConfig in project hazelcast by hazelcast.
the class UnsafeSemaphoreAdvancedTest method createConfig.
private Config createConfig() {
Config config = new Config();
CPSubsystemConfig cpSubsystemConfig = config.getCPSubsystemConfig();
cpSubsystemConfig.setSessionTimeToLiveSeconds(10);
cpSubsystemConfig.setSessionHeartbeatIntervalSeconds(1);
SemaphoreConfig semaphoreConfig = new SemaphoreConfig();
semaphoreConfig.setName(objectName);
cpSubsystemConfig.addSemaphoreConfig(semaphoreConfig);
return config;
}
use of com.hazelcast.config.cp.SemaphoreConfig in project hazelcast by hazelcast.
the class UnsafeSessionAwareSemaphoreBasicTest method createInstances.
@Override
protected HazelcastInstance[] createInstances() {
Config config = new Config();
SemaphoreConfig semaphoreConfig = new SemaphoreConfig(objectName);
semaphoreConfig.setName(objectName);
config.getCPSubsystemConfig().addSemaphoreConfig(semaphoreConfig);
return factory.newInstances(config, 2);
}
use of com.hazelcast.config.cp.SemaphoreConfig in project hazelcast by hazelcast.
the class SessionAwareSemaphoreBasicTest method createConfig.
@Override
protected Config createConfig(int cpNodeCount, int groupSize) {
Config config = super.createConfig(cpNodeCount, groupSize);
SemaphoreConfig semaphoreConfig = new SemaphoreConfig();
semaphoreConfig.setName(objectName);
config.getCPSubsystemConfig().addSemaphoreConfig(semaphoreConfig);
return config;
}
use of com.hazelcast.config.cp.SemaphoreConfig in project hazelcast by hazelcast.
the class UnsafeSemaphoreFailureTest method createInstances.
@Override
protected HazelcastInstance[] createInstances() {
Config config = new Config();
SemaphoreConfig semaphoreConfig = new SemaphoreConfig(objectName, isJDKCompatible(), 0);
config.getCPSubsystemConfig().addSemaphoreConfig(semaphoreConfig);
return factory.newInstances(config, 2);
}
Aggregations