V - value typepublic class RedissonPriorityQueue<V> extends RedissonList<V> implements RPriorityQueue<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
RedissonPriorityQueue.BinarySearchResult<V> |
EVAL_BOOLEAN_ARGS2codec| Modifier | Constructor and Description |
|---|---|
|
RedissonPriorityQueue(Codec codec,
CommandExecutor commandExecutor,
String name,
Redisson redisson) |
protected |
RedissonPriorityQueue(CommandExecutor commandExecutor,
String name,
Redisson redisson) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(V value) |
boolean |
addAll(Collection<? extends V> c) |
RedissonPriorityQueue.BinarySearchResult<V> |
binarySearch(V value,
Codec codec) |
void |
clear() |
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.
|
Comparator<? super V> |
comparator() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
V |
element() |
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 |
getFirst() |
boolean |
offer(V e) |
RFuture<Boolean> |
offerAsync(V e) |
V |
peek() |
RFuture<V> |
peekAsync() |
V |
poll() |
RFuture<V> |
pollAsync() |
List<V> |
readAll()
Read all elements at once
|
RFuture<List<V>> |
readAllAsync()
Read all elements at once
|
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.
|
V |
remove() |
boolean |
remove(Object value) |
boolean |
removeAll(Collection<?> c) |
V |
removeFirst() |
boolean |
retainAll(Collection<?> c) |
String |
toString() |
boolean |
trySetComparator(Comparator<? super V> comparator)
Sets new comparator only if current set is empty
|
add, addAfter, addAfterAsync, addAll, addAllAsync, addAllAsync, addAsync, addAsync, addBefore, addBeforeAsync, containsAllAsync, containsAsync, equals, fastRemove, fastRemoveAsync, fastSet, fastSetAsync, get, get, getAsync, getAsync, hashCode, indexOf, indexOfAsync, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, lastIndexOfAsync, listIterator, listIterator, mapReduce, readSort, readSort, readSort, readSort, readSort, readSort, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, remove, remove, remove, removeAllAsync, removeAsync, removeAsync, removeAsync, retainAllAsync, set, setAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, subList, toArray, toArray, trim, trimAsyncawait, delete, deleteAsync, encode, encodeMapKey, encodeMapValue, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, newPromise, newSucceededFuture, prefixName, rename, renameAsync, renamenx, renamenxAsync, suffixName, touch, touchAsync, unlink, unlinkAsyncclone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArraydelete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkdeleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncreplaceAll, sort, spliteratorclearExpire, expire, expireAt, expireAt, remainTimeToLiveclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsyncprotected RedissonPriorityQueue(CommandExecutor commandExecutor, String name, Redisson redisson)
public RedissonPriorityQueue(Codec codec, CommandExecutor commandExecutor, String name, Redisson redisson)
public List<V> readAll()
RListreadAll in interface RList<V>readAll in interface RPriorityQueue<V>readAll in class RedissonList<V>public RFuture<List<V>> readAllAsync()
RListAsyncreadAllAsync in interface RListAsync<V>readAllAsync in class RedissonList<V>public boolean contains(Object o)
contains in interface Collection<V>contains in interface List<V>contains in class RedissonList<V>public boolean add(V value)
public boolean remove(Object value)
remove in interface Collection<V>remove in interface List<V>remove in class RedissonList<V>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<V>containsAll in interface List<V>containsAll in class RedissonList<V>public boolean addAll(Collection<? extends V> c)
addAll in interface Collection<V>addAll in interface List<V>addAll in class RedissonList<V>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<V>retainAll in interface List<V>retainAll in class RedissonList<V>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<V>removeAll in interface List<V>removeAll in class RedissonList<V>public void clear()
clear in interface Collection<V>clear in interface List<V>clear in class RedissonList<V>public Comparator<? super V> comparator()
comparator in interface RPriorityQueue<V>public V getFirst()
public boolean trySetComparator(Comparator<? super V> comparator)
RPriorityQueuetrySetComparator in interface RPriorityQueue<V>comparator - for valuestrue if new comparator setted
false otherwisepublic V removeFirst()
public RedissonPriorityQueue.BinarySearchResult<V> binarySearch(V value, Codec codec)
public String toString()
toString in class RedissonList<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 seconds (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 RExpirableAsync-1 if object does not exist or time in secondsCopyright © 2014–2017 The Redisson Project. All rights reserved.