Search in sources :

Example 1 with SetCountOperation

use of com.hazelcast.concurrent.countdownlatch.operations.SetCountOperation in project hazelcast by hazelcast.

the class CountDownLatchProxy method trySetCount.

@Override
public boolean trySetCount(int count) {
    checkNotNegative(count, "count can't be negative");
    Operation op = new SetCountOperation(name, count).setPartitionId(partitionId);
    InternalCompletableFuture<Boolean> f = invokeOnPartition(op);
    return f.join();
}
Also used : SetCountOperation(com.hazelcast.concurrent.countdownlatch.operations.SetCountOperation) CountDownOperation(com.hazelcast.concurrent.countdownlatch.operations.CountDownOperation) Operation(com.hazelcast.spi.Operation) GetCountOperation(com.hazelcast.concurrent.countdownlatch.operations.GetCountOperation) AwaitOperation(com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation) SetCountOperation(com.hazelcast.concurrent.countdownlatch.operations.SetCountOperation)

Aggregations

AwaitOperation (com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation)1 CountDownOperation (com.hazelcast.concurrent.countdownlatch.operations.CountDownOperation)1 GetCountOperation (com.hazelcast.concurrent.countdownlatch.operations.GetCountOperation)1 SetCountOperation (com.hazelcast.concurrent.countdownlatch.operations.SetCountOperation)1 Operation (com.hazelcast.spi.Operation)1