use of com.hazelcast.concurrent.semaphore.operations.DrainOperation in project hazelcast by hazelcast.
the class SemaphoreProxy method drainPermits.
@Override
public int drainPermits() {
Operation operation = new DrainOperation(name).setPartitionId(partitionId);
InternalCompletableFuture<Integer> future = invokeOnPartition(operation);
return future.join();
}
Also used :
DrainOperation(com.hazelcast.concurrent.semaphore.operations.DrainOperation)
Operation(com.hazelcast.spi.Operation)
AvailableOperation(com.hazelcast.concurrent.semaphore.operations.AvailableOperation)
ReduceOperation(com.hazelcast.concurrent.semaphore.operations.ReduceOperation)
AcquireOperation(com.hazelcast.concurrent.semaphore.operations.AcquireOperation)
DrainOperation(com.hazelcast.concurrent.semaphore.operations.DrainOperation)
ReleaseOperation(com.hazelcast.concurrent.semaphore.operations.ReleaseOperation)
InitOperation(com.hazelcast.concurrent.semaphore.operations.InitOperation)