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> |
awaitAsync()
Waits until counter reach zero.
|
RFuture<Boolean> |
awaitAsync(long waitTime,
TimeUnit unit)
Waits until counter reach zero or up to defined
timeout. |
RFuture<Void> |
countDownAsync()
Decrements the counter of the latch.
|
RFuture<Long> |
getCountAsync()
Returns value of 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.
|
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncRFuture<Boolean> awaitAsync(long waitTime, TimeUnit unit)
timeout.waitTime - the maximum time to waitunit - the time unittrue if the count reached zero and false
if timeout reached before the count reached zeroRFuture<Void> countDownAsync()
RFuture<Long> getCountAsync()
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–2020 Redisson. All rights reserved.