use of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation in project hazelcast by hazelcast.
the class CountDownLatchProxy method await.
@Override
public boolean await(long timeout, TimeUnit unit) throws InterruptedException {
checkNotNull(unit, "unit can't be null");
Operation op = new AwaitOperation(name, unit.toMillis(timeout)).setPartitionId(partitionId);
Future<Boolean> f = invokeOnPartition(op);
try {
return f.get();
} catch (ExecutionException e) {
throw rethrowAllowInterrupted(e);
}
}
Aggregations