V
- value typepublic interface RRingBufferReactive<V> extends RQueueReactive<V>
The head element removed if new element added and queue is full.
Must be initialized with capacity size trySetCapacity(int)
before usage.
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Integer> |
capacity()
Returns capacity of this queue
|
reactor.core.publisher.Mono<Integer> |
remainingCapacity()
Returns remaining capacity of this queue
|
reactor.core.publisher.Mono<Void> |
setCapacity(int capacity)
Sets capacity of the queue and overrides current value.
|
reactor.core.publisher.Mono<Boolean> |
trySetCapacity(int capacity)
Sets queue capacity only if it is not set before.
|
offer, peek, poll, poll, pollLastAndOfferFirstTo, readAll
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
reactor.core.publisher.Mono<Boolean> trySetCapacity(int capacity)
capacity
- - queue capacitytrue
if capacity set successfully
false
if capacity already setreactor.core.publisher.Mono<Void> setCapacity(int capacity)
capacity
- - queue capacityreactor.core.publisher.Mono<Integer> remainingCapacity()
reactor.core.publisher.Mono<Integer> capacity()
Copyright © 2014–2021 Redisson. All rights reserved.