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(long timeToLive,
TimeUnit timeUnit)
Set a timeout 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)
Set an expire date for object.
|
boolean |
expireAt(long timestamp)
Set an expire date for object.
|
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Set an expire date for object in async mode.
|
RFuture<Boolean> |
expireAtAsync(long timestamp)
Set an expire date for object in async mode.
|
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
|
boolean |
trySetCapacity(int capacity)
Sets queue capacity only if it is not set before.
|
RFuture<Boolean> |
trySetCapacityAsync(int capacity)
Sets queue capacity only if it is not set before.
|
element, getFirst, offer, offerAsync, peek, peekAsync, poll, poll, pollAsync, pollAsync, pollLastAndOfferFirstTo, pollLastAndOfferFirstToAsync, remove, removeFirst
add, 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, 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, trimAsync
addListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getLockByMapKey, getLockByValue, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListener, poll, 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
copy, delete, dump, getCodec, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
replaceAll, sort, spliterator
public RedissonRingBuffer(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RedissonRingBuffer(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RFuture<Boolean> trySetCapacityAsync(int capacity)
RRingBufferAsync
trySetCapacityAsync
in interface RRingBufferAsync<V>
capacity
- - queue capacitytrue
if capacity set successfully
false
if capacity already setpublic boolean trySetCapacity(int capacity)
RRingBuffer
trySetCapacity
in interface RRingBuffer<V>
capacity
- - queue capacitytrue
if capacity set successfully
false
if capacity already setpublic RFuture<Boolean> addAsync(V e)
RCollectionAsync
addAsync
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)
RCollectionAsync
addAllAsync
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()
RRingBuffer
remainingCapacity
in interface RRingBuffer<V>
public RFuture<Integer> remainingCapacityAsync()
RRingBufferAsync
remainingCapacityAsync
in interface RRingBufferAsync<V>
public RFuture<Integer> capacityAsync()
RRingBufferAsync
capacityAsync
in interface RRingBufferAsync<V>
public int capacity()
RRingBuffer
capacity
in interface RRingBuffer<V>
public boolean expire(long timeToLive, TimeUnit timeUnit)
RExpirable
expire
in interface RExpirable
timeToLive
- - 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)
RExpirableAsync
expireAsync
in interface RExpirableAsync
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic boolean expireAt(long timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic boolean expireAt(Date timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic boolean clearExpire()
RExpirable
clearExpire
in interface RExpirable
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsync
clearExpireAsync
in interface RExpirableAsync
true
if the timeout was cleared and false
if notpublic long remainTimeToLive()
RExpirable
remainTimeToLive
in interface RExpirable
public RFuture<Long> remainTimeToLiveAsync()
RExpirableAsync
remainTimeToLiveAsync
in interface RExpirableAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
Copyright © 2014–2020 Redisson. All rights reserved.