public interface RCountDownLatchRx extends RObjectRx
CountDownLatch
It has an advantage over CountDownLatch --
count can be set via trySetCount(long) method.| Modifier and Type | Method and Description |
|---|---|
io.reactivex.rxjava3.core.Completable |
await()
Waits until counter reach zero.
|
io.reactivex.rxjava3.core.Single<Boolean> |
await(long waitTime,
TimeUnit unit)
Waits until counter reach zero or up to defined
timeout. |
io.reactivex.rxjava3.core.Completable |
countDown()
Decrements the counter of the latch.
|
io.reactivex.rxjava3.core.Single<Long> |
getCount()
Returns value of current count.
|
io.reactivex.rxjava3.core.Single<Boolean> |
trySetCount(long count)
Sets new count value only if previous count already has reached zero
or is not set at all.
|
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkio.reactivex.rxjava3.core.Completable await()
io.reactivex.rxjava3.core.Single<Boolean> await(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 zeroio.reactivex.rxjava3.core.Completable countDown()
io.reactivex.rxjava3.core.Single<Long> getCount()
io.reactivex.rxjava3.core.Single<Boolean> trySetCount(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–2021 Redisson. All rights reserved.