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, readAlladdAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkcapacityAsync, remainingCapacityAsync, setCapacityAsync, trySetCapacityAsyncaddListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsyncaddAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncboolean 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–2020 Redisson. All rights reserved.