V - value typepublic class RedissonRingBuffer<V> extends RedissonQueue<V> implements RRingBuffer<V>
codec, commandExecutor, name| Constructor and Description |
|---|
RedissonRingBuffer(Codec codec,
CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson) |
RedissonRingBuffer(CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson) |
| Modifier and Type | Method and Description |
|---|---|
RFuture<Boolean> |
addAllAsync(Collection<? extends V> c)
Adds all elements contained in the specified collection
|
RFuture<Boolean> |
addAsync(V e)
Adds element into this collection.
|
int |
capacity()
Returns capacity of this queue
|
RFuture<Integer> |
capacityAsync()
Returns capacity of this queue
|
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
RFuture<Boolean> |
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.
|
protected RFuture<Boolean> |
clearExpireAsync(String... keys) |
boolean |
expire(Instant instant)
Set an expire date for object.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(Instant instant)
Set an expire date for object.
|
RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in async mode.
|
protected RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit,
String... keys) |
boolean |
expireAt(Date timestamp)
Use
RExpirable.expire(Instant) instead |
boolean |
expireAt(long timestamp)
Use
RExpirable.expire(Instant) instead |
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
RFuture<Boolean> |
expireAtAsync(long timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
protected RFuture<Boolean> |
expireAtAsync(long timestamp,
String... keys) |
int |
remainingCapacity()
Returns remaining capacity of this queue
|
RFuture<Integer> |
remainingCapacityAsync()
Returns remaining capacity of this queue
|
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeout
|
void |
setCapacity(int capacity)
Sets capacity of the queue and overrides current value.
|
RFuture<Void> |
setCapacityAsync(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.
|
RFuture<Boolean> |
trySetCapacityAsync(int capacity)
Sets capacity of the queue only if it wasn't set before.
|
element, getFirst, offer, offerAsync, peek, peekAsync, poll, poll, pollAsync, pollAsync, pollLastAndOfferFirstTo, pollLastAndOfferFirstToAsync, remove, removeFirstadd, add, addAfter, addAfterAsync, addAll, addAll, addAllAsync, addAsync, addAsync, addBefore, addBeforeAsync, addListener, addListenerAsync, clear, contains, containsAll, containsAllAsync, containsAsync, equals, fastRemove, fastRemoveAsync, fastSet, fastSetAsync, get, get, getAsync, getAsync, hashCode, indexOf, indexOfAsync, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, lastIndexOfAsync, listIterator, listIterator, mapReduce, range, range, rangeAsync, rangeAsync, readAll, readAllAsync, readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, remove, remove, remove, removeAll, removeAllAsync, removeAsync, removeAsync, removeAsync, removeIf, removeListener, removeListenerAsync, retainAll, retainAllAsync, set, setAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, subList, toArray, toArray, toString, trim, trimAsyncaddListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddListener, poll, pollLastAndOfferFirstTo, readAlladdAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayclearExpire, expire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkaddListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsynccontainsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncclearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncreplaceAll, sort, spliteratorpublic RedissonRingBuffer(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RedissonRingBuffer(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RFuture<Boolean> trySetCapacityAsync(int capacity)
RRingBufferAsynctrySetCapacityAsync in interface RRingBufferAsync<V>capacity - - queue capacitytrue if capacity set successfully
false if capacity already setpublic boolean trySetCapacity(int capacity)
RRingBuffertrySetCapacity in interface RRingBuffer<V>capacity - - queue capacitytrue if capacity set successfully
false if capacity already setpublic RFuture<Void> setCapacityAsync(int capacity)
RRingBufferAsyncsetCapacityAsync in interface RRingBufferAsync<V>capacity - - queue capacitypublic void setCapacity(int capacity)
RRingBuffersetCapacity in interface RRingBuffer<V>capacity - - queue capacitypublic RFuture<Boolean> addAsync(V e)
RCollectionAsyncaddAsync in interface RCollectionAsync<V>addAsync in class RedissonList<V>e - - element to addtrue if an element was added
and false if it is already presentpublic RFuture<Boolean> addAllAsync(Collection<? extends V> c)
RCollectionAsyncaddAllAsync in interface RCollectionAsync<V>addAllAsync in class RedissonList<V>c - - collection of elements to addtrue if at least one element was added
and false if all elements are already presentpublic int remainingCapacity()
RRingBufferremainingCapacity in interface RRingBuffer<V>public RFuture<Integer> remainingCapacityAsync()
RRingBufferAsyncremainingCapacityAsync in interface RRingBufferAsync<V>public RFuture<Integer> capacityAsync()
RRingBufferAsynccapacityAsync in interface RRingBufferAsync<V>public int capacity()
RRingBuffercapacity in interface RRingBuffer<V>public boolean expire(long timeToLive,
TimeUnit timeUnit)
RExpirableexpire in interface RExpirabletimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsyncexpireAsync in interface RExpirableAsynctimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic boolean expireAt(long timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expire(Instant instant)
RExpirableexpire in interface RExpirableinstant - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(Instant instant)
RExpirableAsyncexpireAsync in interface RExpirableAsyncinstant - - expire datetrue if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire datetrue if the timeout was set and false if notpublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsyncprotected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
Copyright © 2014–2021 Redisson. All rights reserved.