V
- the type of elements held in this collectionpublic class RedissonDeque<V> extends RedissonQueue<V> implements RDeque<V>
Queue
codec, commandExecutor
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.
|
void |
addLast(V e) |
RFuture<Void> |
addLastAsync(V e)
Adds element at the tail of this 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.
|
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.
|
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.
|
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() |
RFuture<V> |
pollFirstAsync()
Retrieves and removes element at the head of this deque.
|
V |
pollLast() |
RFuture<V> |
pollLastAsync()
Retrieves and removes element at the tail of this deque.
|
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, pollAsync, pollLastAndOfferFirstTo, pollLastAndOfferFirstToAsync, remove, removeFirst
add, add, addAfter, addAfterAsync, addAll, addAll, addAllAsync, addAllAsync, addAsync, addAsync, addAsync, addBefore, addBeforeAsync, 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, 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, retainAll, retainAllAsync, set, setAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, subList, toArray, toArray, toString, trim, trimAsync
await, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, 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
add, contains, element, getFirst, iterator, offer, peek, poll, remove, remove, removeFirst, size
pollLastAndOfferFirstTo, readAll
addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
clearExpire, expire, expireAt, expireAt, remainTimeToLive
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
offerAsync, peekAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
replaceAll, sort, spliterator
public RedissonDeque(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RedissonDeque(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RFuture<Void> addFirstAsync(V e)
RDequeAsync
addFirstAsync
in interface RDequeAsync<V>
e
- - element to addpublic RFuture<Void> addLastAsync(V e)
RDequeAsync
addLastAsync
in interface RDequeAsync<V>
e
- - element to addpublic Iterator<V> descendingIterator()
descendingIterator
in interface Deque<V>
public RFuture<V> getLastAsync()
RDequeAsync
null
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)
RDequeAsync
offerFirstAsync
in interface RDequeAsync<V>
e
- - element to addtrue
if element was added to this deque otherwise false
public RFuture<Boolean> offerLastAsync(V e)
RDequeAsync
offerLastAsync
in interface RDequeAsync<V>
e
- - element to addtrue
if element was added to this deque otherwise false
public RFuture<V> peekFirstAsync()
RDequeAsync
null
if there are no elements in deque.peekFirstAsync
in interface RDequeAsync<V>
public RFuture<V> peekLastAsync()
RDequeAsync
null
if there are no elements in deque.peekLastAsync
in interface RDequeAsync<V>
public RFuture<V> pollFirstAsync()
RDequeAsync
null
if there are no elements in deque.pollFirstAsync
in interface RDequeAsync<V>
public RFuture<V> pollLastAsync()
RDequeAsync
null
if there are no elements in deque.pollLastAsync
in interface RDequeAsync<V>
public RFuture<V> popAsync()
RDequeAsync
null
if there are no elements in deque.popAsync
in interface RDequeAsync<V>
public RFuture<Void> pushAsync(V e)
RDequeAsync
pushAsync
in interface RDequeAsync<V>
e
- - element to addpublic RFuture<Boolean> removeFirstOccurrenceAsync(Object o)
RDequeAsync
o
removeFirstOccurrenceAsync
in interface RDequeAsync<V>
o
- - element to removetrue
if object has been removed otherwise false
public boolean removeFirstOccurrence(Object o)
removeFirstOccurrence
in interface Deque<V>
public RFuture<V> removeFirstAsync()
RDequeAsync
null
if there are no elements in deque.removeFirstAsync
in interface RDequeAsync<V>
public RFuture<V> removeLastAsync()
RDequeAsync
null
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)
RDequeAsync
o
removeLastOccurrenceAsync
in interface RDequeAsync<V>
o
- - elementtrue
if object has been removed otherwise false
public boolean removeLastOccurrence(Object o)
removeLastOccurrence
in interface Deque<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
Copyright © 2014–2018 The Redisson Project. All rights reserved.