V - the type of elements held in this collectionpublic class RedissonDeque<V> extends RedissonQueue<V> implements RDeque<V>
Queuecodec, commandExecutor, name| Constructor and Description |
|---|
RedissonDeque(Codec codec,
CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson) |
RedissonDeque(CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFirst(V e) |
RFuture<Void> |
addFirstAsync(V e)
Adds element at the head of this deque.
|
int |
addFirstIfExists(V... elements)
Adds element at the head of existing deque.
|
RFuture<Integer> |
addFirstIfExistsAsync(V... elements)
Adds element at the head of existing deque.
|
void |
addLast(V e) |
RFuture<Void> |
addLastAsync(V e)
Adds element at the tail of this deque.
|
int |
addLastIfExists(V... elements)
Adds element at the tail of existing deque.
|
RFuture<Integer> |
addLastIfExistsAsync(V... elements)
Adds element at the tail of existing deque.
|
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) |
Iterator<V> |
descendingIterator() |
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) |
V |
getLast() |
RFuture<V> |
getLastAsync()
Returns element at the tail of this deque
or
null if there are no elements in deque. |
boolean |
offerFirst(V e) |
RFuture<Boolean> |
offerFirstAsync(V e)
Adds element at the head of this deque.
|
boolean |
offerLast(V e) |
RFuture<Boolean> |
offerLastAsync(V e)
Adds element at the tail of this deque.
|
V |
peekFirst() |
RFuture<V> |
peekFirstAsync()
Returns element at the head of this deque
or
null if there are no elements in deque. |
V |
peekLast() |
RFuture<V> |
peekLastAsync()
Returns element at the tail of this deque
or
null if there are no elements in deque. |
V |
pollFirst() |
List<V> |
pollFirst(int limit)
Retrieves and removes the head elements of this queue.
|
RFuture<V> |
pollFirstAsync()
Retrieves and removes element at the head of this deque.
|
RFuture<List<V>> |
pollFirstAsync(int limit)
Retrieves and removes the head elements of this queue.
|
V |
pollLast() |
List<V> |
pollLast(int limit)
Retrieves and removes the tail elements of this queue.
|
RFuture<V> |
pollLastAsync()
Retrieves and removes element at the tail of this deque.
|
RFuture<List<V>> |
pollLastAsync(int limit)
Retrieves and removes the tail elements of this queue.
|
V |
pop() |
RFuture<V> |
popAsync()
Retrieves and removes element at the head of this deque.
|
void |
push(V e) |
RFuture<Void> |
pushAsync(V e)
Adds element at the head of this deque.
|
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
|
RFuture<V> |
removeFirstAsync()
Retrieves and removes the first element of deque.
|
boolean |
removeFirstOccurrence(Object o) |
RFuture<Boolean> |
removeFirstOccurrenceAsync(Object o)
Removes first occurrence of element
o |
V |
removeLast() |
RFuture<V> |
removeLastAsync()
Retrieves and removes the last element of deque.
|
boolean |
removeLastOccurrence(Object o) |
RFuture<Boolean> |
removeLastOccurrenceAsync(Object o)
Removes last occurrence of element
o |
element, getFirst, offer, offerAsync, peek, peekAsync, poll, poll, pollAsync, pollAsync, pollLastAndOfferFirstTo, pollLastAndOfferFirstToAsync, remove, removeFirstadd, add, addAfter, addAfterAsync, addAll, addAll, addAllAsync, addAllAsync, addAsync, 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, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, contains, element, getFirst, iterator, offer, peek, poll, remove, remove, removeFirst, sizeaddListener, poll, pollLastAndOfferFirstTo, readAlladdAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, 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, unlinkaddListenerAsync, 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, unlinkAsyncreplaceAll, sort, spliteratorpublic RedissonDeque(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RedissonDeque(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public int addFirstIfExists(V... elements)
RDequeaddFirstIfExists in interface RDeque<V>elements - - elements to addpublic int addLastIfExists(V... elements)
RDequeaddLastIfExists in interface RDeque<V>elements - - elements to addpublic RFuture<Integer> addFirstIfExistsAsync(V... elements)
RDequeAsyncaddFirstIfExistsAsync in interface RDequeAsync<V>elements - - elements to addpublic RFuture<Integer> addLastIfExistsAsync(V... elements)
RDequeAsyncaddLastIfExistsAsync in interface RDequeAsync<V>elements - - elements to addpublic RFuture<Void> addFirstAsync(V e)
RDequeAsyncaddFirstAsync in interface RDequeAsync<V>e - - element to addpublic RFuture<Void> addLastAsync(V e)
RDequeAsyncaddLastAsync in interface RDequeAsync<V>e - - element to addpublic Iterator<V> descendingIterator()
descendingIterator in interface Deque<V>public RFuture<V> getLastAsync()
RDequeAsyncnull if there are no elements in deque.getLastAsync in interface RDequeAsync<V>public boolean offerFirst(V e)
offerFirst in interface Deque<V>public RFuture<Boolean> offerFirstAsync(V e)
RDequeAsyncofferFirstAsync in interface RDequeAsync<V>e - - element to addtrue if element was added to this deque otherwise falsepublic RFuture<Boolean> offerLastAsync(V e)
RDequeAsyncofferLastAsync in interface RDequeAsync<V>e - - element to addtrue if element was added to this deque otherwise falsepublic RFuture<V> peekFirstAsync()
RDequeAsyncnull if there are no elements in deque.peekFirstAsync in interface RDequeAsync<V>public RFuture<V> peekLastAsync()
RDequeAsyncnull if there are no elements in deque.peekLastAsync in interface RDequeAsync<V>public RFuture<V> pollFirstAsync()
RDequeAsyncnull if there are no elements in deque.pollFirstAsync in interface RDequeAsync<V>public RFuture<List<V>> pollFirstAsync(int limit)
RDequeAsynclimit param.pollFirstAsync in interface RDequeAsync<V>public List<V> pollFirst(int limit)
RDequelimit param.public RFuture<V> pollLastAsync()
RDequeAsyncnull if there are no elements in deque.pollLastAsync in interface RDequeAsync<V>public List<V> pollLast(int limit)
RDequelimit param.public RFuture<List<V>> pollLastAsync(int limit)
RDequeAsynclimit param.pollLastAsync in interface RDequeAsync<V>public RFuture<V> popAsync()
RDequeAsyncnull if there are no elements in deque.popAsync in interface RDequeAsync<V>public RFuture<Void> pushAsync(V e)
RDequeAsyncpushAsync in interface RDequeAsync<V>e - - element to addpublic RFuture<Boolean> removeFirstOccurrenceAsync(Object o)
RDequeAsyncoremoveFirstOccurrenceAsync in interface RDequeAsync<V>o - - element to removetrue if object has been removed otherwise falsepublic boolean removeFirstOccurrence(Object o)
removeFirstOccurrence in interface Deque<V>public RFuture<V> removeFirstAsync()
RDequeAsyncnull if there are no elements in deque.removeFirstAsync in interface RDequeAsync<V>public RFuture<V> removeLastAsync()
RDequeAsyncnull if there are no elements in deque.removeLastAsync in interface RDequeAsync<V>public V removeLast()
removeLast in interface Deque<V>public RFuture<Boolean> removeLastOccurrenceAsync(Object o)
RDequeAsyncoremoveLastOccurrenceAsync in interface RDequeAsync<V>o - - elementtrue if object has been removed otherwise falsepublic boolean removeLastOccurrence(Object o)
removeLastOccurrence in interface Deque<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)
RExpirableexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncexpireAtAsync 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–2020 Redisson. All rights reserved.