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
|
boolean |
trySetCapacity(int capacity)
Sets queue capacity only if it is not set before.
|
pollLastAndOfferFirstTo, readAll
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
clearExpire, expire, expireAt, expireAt, remainTimeToLive
addListener, copy, delete, dump, getCodec, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
capacityAsync, remainingCapacityAsync, trySetCapacityAsync
offerAsync, peekAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, 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 setint remainingCapacity()
int capacity()
Copyright © 2014–2019 The Redisson Project. All rights reserved.