V
- value typepublic interface RRingBuffer<V> extends RQueue<V>, RRingBufferAsync<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 |
---|---|
int |
capacity()
Returns capacity of this queue
|
int |
remainingCapacity()
Returns remaining capacity of this queue
|
void |
setCapacity(int capacity)
Sets capacity of the queue and overrides current value.
|
boolean |
trySetCapacity(int capacity)
Sets capacity of the queue only if it wasn't set before.
|
addListener, poll, pollLastAndOfferFirstTo, readAll
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
capacityAsync, remainingCapacityAsync, setCapacityAsync, trySetCapacityAsync
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
boolean trySetCapacity(int capacity)
capacity
- - queue capacitytrue
if capacity set successfully
false
if capacity already setvoid setCapacity(int capacity)
capacity
- - queue capacityint remainingCapacity()
int capacity()
Copyright © 2014–2021 Redisson. All rights reserved.