use of com.hazelcast.concurrent.semaphore.SemaphoreContainer in project hazelcast by hazelcast.
the class ReduceOperation method run.
@Override
public void run() throws Exception {
SemaphoreContainer semaphoreContainer = getSemaphoreContainer();
response = semaphoreContainer.reduce(permitCount);
}
use of com.hazelcast.concurrent.semaphore.SemaphoreContainer in project hazelcast by hazelcast.
the class SemaphoreDetachMemberOperation method run.
@Override
public void run() throws Exception {
SemaphoreService service = getService();
if (service.containsSemaphore(name)) {
SemaphoreContainer semaphoreContainer = service.getSemaphoreContainer(name);
response = semaphoreContainer.detachAll(detachedMemberUuid);
}
ILogger logger = getLogger();
if (logger.isFineEnabled()) {
logger.fine("Removing permits attached to " + detachedMemberUuid + ". Result: " + response);
}
}
use of com.hazelcast.concurrent.semaphore.SemaphoreContainer in project hazelcast by hazelcast.
the class SemaphoreReplicationOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
out.writeInt(migrationData.size());
for (Map.Entry<String, SemaphoreContainer> entry : migrationData.entrySet()) {
String key = entry.getKey();
SemaphoreContainer value = entry.getValue();
out.writeUTF(key);
value.writeData(out);
}
}
use of com.hazelcast.concurrent.semaphore.SemaphoreContainer in project hazelcast by hazelcast.
the class SemaphoreReplicationOperation method run.
@Override
public void run() throws Exception {
SemaphoreService service = getService();
for (SemaphoreContainer semaphoreContainer : migrationData.values()) {
semaphoreContainer.setInitialized();
}
service.insertMigrationData(migrationData);
}
use of com.hazelcast.concurrent.semaphore.SemaphoreContainer in project hazelcast by hazelcast.
the class InitBackupOperation method run.
@Override
public void run() throws Exception {
SemaphoreContainer semaphoreContainer = getSemaphoreContainer();
semaphoreContainer.init(permitCount);
response = true;
}
Aggregations