public interface RCountDownLatchReactive extends RObjectRx
CountDownLatch
It has an advantage over CountDownLatch
--
count can be set via trySetCount(long)
method.Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
await()
Waits until counter reach zero.
|
reactor.core.publisher.Mono<Boolean> |
await(long waitTime,
TimeUnit unit)
Waits until counter reach zero or up to defined
timeout . |
reactor.core.publisher.Mono<Void> |
countDown()
Decrements the counter of the latch.
|
reactor.core.publisher.Mono<Long> |
getCount()
Returns value of current count.
|
reactor.core.publisher.Mono<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, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
reactor.core.publisher.Mono<Void> await()
reactor.core.publisher.Mono<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 zeroreactor.core.publisher.Mono<Void> countDown()
reactor.core.publisher.Mono<Long> getCount()
reactor.core.publisher.Mono<Boolean> trySetCount(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–2020 Redisson. All rights reserved.