public interface RCountDownLatchAsync extends RObjectAsync
CountDownLatch
It has an advantage over CountDownLatch --
count can be set via trySetCountAsync(long) 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.
|
copyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncRFuture<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 awaittrue if new count setted
false if previous count has not reached zeroCopyright © 2014–2018 The Redisson Project. All rights reserved.