public interface RCountDownLatchAsync extends RObjectAsync
CountDownLatch
It has an advantage over CountDownLatch
--
count can be set via #trySetCount
method.Modifier and Type | Method and Description |
---|---|
RFuture<Void> |
countDownAsync()
Decrements the count of the latch, releasing all waiting threads if
the count reaches zero.
|
RFuture<Long> |
getCountAsync()
Returns the current count.
|
RFuture<Boolean> |
trySetCountAsync(long count)
Sets new count value only if previous count already has reached zero
or is not set at all.
|
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync
RFuture<Void> countDownAsync()
If the current count is greater than zero then it is decremented. If the new count is zero then all waiting threads are re-enabled for thread scheduling purposes.
If the current count equals zero then nothing happens.
RFuture<Long> getCountAsync()
This method is typically used for debugging and testing purposes.
RFuture<Boolean> trySetCountAsync(long count)
count
- - number of times #countDown
must be invoked
before threads can pass through #await
true
if new count setted
false
if previous count has not reached zeroCopyright © 2014–2016 The Redisson Project. All rights reserved.