V
- value typepublic interface RRingBufferRx<V> extends RQueueRx<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 |
---|---|
io.reactivex.rxjava3.core.Single<Integer> |
capacity()
Returns capacity of this queue
|
io.reactivex.rxjava3.core.Single<Integer> |
remainingCapacity()
Returns remaining capacity of this queue
|
io.reactivex.rxjava3.core.Completable |
setCapacity(int capacity)
Sets capacity of the queue and overrides current value.
|
io.reactivex.rxjava3.core.Single<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, remainTimeToLive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
io.reactivex.rxjava3.core.Single<Boolean> trySetCapacity(int capacity)
capacity
- - queue capacitytrue
if capacity set successfully
false
if capacity already setio.reactivex.rxjava3.core.Completable setCapacity(int capacity)
capacity
- - queue capacityio.reactivex.rxjava3.core.Single<Integer> remainingCapacity()
io.reactivex.rxjava3.core.Single<Integer> capacity()
Copyright © 2014–2020 Redisson. All rights reserved.