V
- the type of elements held in this collectionpublic class RedissonDeque<V> extends RedissonQueue<V> implements RDeque<V>
Queue
EVAL_BOOLEAN_ARGS2
Modifier | Constructor and Description |
---|---|
|
RedissonDeque(Codec codec,
CommandAsyncExecutor commandExecutor,
String name) |
protected |
RedissonDeque(CommandAsyncExecutor commandExecutor,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addFirst(V e) |
RFuture<Void> |
addFirstAsync(V e) |
void |
addLast(V e) |
RFuture<Void> |
addLastAsync(V e) |
protected boolean |
await(RFuture<?> future,
long timeout,
TimeUnit timeoutUnit) |
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.
|
boolean |
delete()
Deletes the object
|
RFuture<Boolean> |
deleteAsync()
Delete object in async mode
|
Iterator<V> |
descendingIterator() |
protected byte[] |
encode(Object value) |
protected byte[] |
encodeMapKey(Object value) |
protected byte[] |
encodeMapValue(Object value) |
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.
|
protected <V> V |
get(RFuture<V> future) |
Codec |
getCodec()
Returns the underlying Codec used by this RObject
|
V |
getLast() |
RFuture<V> |
getLastAsync() |
String |
getName()
Returns name of object
|
boolean |
isExists()
Check object existence
|
RFuture<Boolean> |
isExistsAsync()
Check object existence in async mode.
|
void |
migrate(String host,
int port,
int database)
Transfer an object from source Redis instance to destination Redis instance
|
RFuture<Void> |
migrateAsync(String host,
int port,
int database)
Transfer an object from source Redis instance to destination Redis instance
in async mode
|
boolean |
move(int database)
Move object to another database
|
RFuture<Boolean> |
moveAsync(int database)
Move object to another database in async mode
|
protected <V> RPromise<V> |
newPromise() |
protected <V> RFuture<V> |
newSucceededFuture(V result) |
boolean |
offerFirst(V e) |
RFuture<Boolean> |
offerFirstAsync(V e) |
boolean |
offerLast(V e) |
RFuture<Boolean> |
offerLastAsync(V e) |
V |
peekFirst() |
RFuture<V> |
peekFirstAsync() |
V |
peekLast() |
RFuture<V> |
peekLastAsync() |
V |
pollFirst() |
RFuture<V> |
pollFirstAsync() |
V |
pollLast() |
RFuture<V> |
pollLastAsync() |
V |
pop() |
RFuture<V> |
popAsync() |
void |
push(V e) |
RFuture<Void> |
pushAsync(V e) |
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync()
Get remaining time to live of object in seconds.
|
RFuture<V> |
removeFirstAsync() |
boolean |
removeFirstOccurrence(Object o) |
RFuture<Boolean> |
removeFirstOccurrenceAsync(Object o) |
V |
removeLast() |
RFuture<V> |
removeLastAsync() |
boolean |
removeLastOccurrence(Object o) |
RFuture<Boolean> |
removeLastOccurrenceAsync(Object o) |
void |
rename(String newName)
Rename current object key to
newName |
RFuture<Void> |
renameAsync(String newName)
Rename current object key to
newName
in async mode |
boolean |
renamenx(String newName)
Rename current object key to
newName
only if new key is not exists |
RFuture<Boolean> |
renamenxAsync(String newName)
Rename current object key to
newName
in async mode only if new key is not exists |
element, getFirst, offer, offerAsync, peek, peekAsync, poll, pollAsync, pollLastAndOfferFirstTo, pollLastAndOfferFirstTo, pollLastAndOfferFirstToAsync, remove, removeFirst
add, add, addAfter, addAfterAsync, addAll, addAll, addAllAsync, addAllAsync, addAsync, addAsync, addBefore, addBeforeAsync, clear, contains, containsAll, containsAllAsync, containsAsync, equals, fastRemove, fastRemoveAsync, fastSet, fastSetAsync, get, getAsync, hashCode, indexOf, indexOfAsync, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, lastIndexOfAsync, listIterator, listIterator, readAll, readAllAsync, remove, remove, remove, remove, removeAll, removeAllAsync, removeAsync, removeAsync, removeAsync, retainAll, retainAllAsync, set, setAsync, size, sizeAsync, subList, toArray, toArray, toString, trim, trimAsync
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, contains, element, getFirst, iterator, offer, peek, poll, remove, remove, removeFirst, size
pollLastAndOfferFirstTo, pollLastAndOfferFirstTo
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
clearExpire, expire, expireAt, expireAt, remainTimeToLive
delete, getCodec, getName, isExists, migrate, move, rename, renamenx
offerAsync, peekAsync, pollAsync, pollLastAndOfferFirstToAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync
protected RedissonDeque(CommandAsyncExecutor commandExecutor, String name)
public RedissonDeque(Codec codec, CommandAsyncExecutor commandExecutor, String name)
public RFuture<Void> addFirstAsync(V e)
addFirstAsync
in interface RDequeAsync<V>
public RFuture<Void> addLastAsync(V e)
addLastAsync
in interface RDequeAsync<V>
public Iterator<V> descendingIterator()
descendingIterator
in interface Deque<V>
public RFuture<V> getLastAsync()
getLastAsync
in interface RDequeAsync<V>
public boolean offerFirst(V e)
offerFirst
in interface Deque<V>
public RFuture<Boolean> offerFirstAsync(V e)
offerFirstAsync
in interface RDequeAsync<V>
public RFuture<Boolean> offerLastAsync(V e)
offerLastAsync
in interface RDequeAsync<V>
public RFuture<V> peekFirstAsync()
peekFirstAsync
in interface RDequeAsync<V>
public RFuture<V> peekLastAsync()
peekLastAsync
in interface RDequeAsync<V>
public RFuture<V> pollFirstAsync()
pollFirstAsync
in interface RDequeAsync<V>
public RFuture<V> pollLastAsync()
pollLastAsync
in interface RDequeAsync<V>
public RFuture<V> popAsync()
popAsync
in interface RDequeAsync<V>
public RFuture<Boolean> removeFirstOccurrenceAsync(Object o)
removeFirstOccurrenceAsync
in interface RDequeAsync<V>
public boolean removeFirstOccurrence(Object o)
removeFirstOccurrence
in interface Deque<V>
public RFuture<V> removeFirstAsync()
removeFirstAsync
in interface RDequeAsync<V>
public RFuture<V> removeLastAsync()
removeLastAsync
in interface RDequeAsync<V>
public V removeLast()
removeLast
in interface Deque<V>
public RFuture<Boolean> removeLastOccurrenceAsync(Object o)
removeLastOccurrenceAsync
in interface RDequeAsync<V>
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 seconds (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
-1
if object does not exist or time in secondsprotected boolean await(RFuture<?> future, long timeout, TimeUnit timeoutUnit) throws InterruptedException
InterruptedException
protected <V> V get(RFuture<V> future)
protected <V> RPromise<V> newPromise()
protected <V> RFuture<V> newSucceededFuture(V result)
public void rename(String newName)
RObject
newName
public RFuture<Void> renameAsync(String newName)
RObjectAsync
newName
in async moderenameAsync
in interface RObjectAsync
newName
- - new name of objectpublic void migrate(String host, int port, int database)
RObject
public RFuture<Void> migrateAsync(String host, int port, int database)
RObjectAsync
migrateAsync
in interface RObjectAsync
host
- - destination hostport
- - destination portdatabase
- - destination databasepublic boolean move(int database)
RObject
public RFuture<Boolean> moveAsync(int database)
RObjectAsync
moveAsync
in interface RObjectAsync
database
- - number of Redis databasetrue
if key was moved false
if notpublic boolean renamenx(String newName)
RObject
newName
only if new key is not existspublic RFuture<Boolean> renamenxAsync(String newName)
RObjectAsync
newName
in async mode only if new key is not existsrenamenxAsync
in interface RObjectAsync
newName
- - new name of objecttrue
if object has been renamed successfully and false
otherwisepublic boolean delete()
RObject
public RFuture<Boolean> deleteAsync()
RObjectAsync
deleteAsync
in interface RObjectAsync
true
if object was deleted false
if notpublic boolean isExists()
RObject
public RFuture<Boolean> isExistsAsync()
RObjectAsync
isExistsAsync
in interface RObjectAsync
true
if object exists and false
otherwisepublic Codec getCodec()
RObject
protected byte[] encode(Object value)
protected byte[] encodeMapKey(Object value)
protected byte[] encodeMapValue(Object value)
Copyright © 2014–2016 The Redisson Project. All rights reserved.