V - value typepublic class RedissonPriorityQueue<V> extends RedissonList<V> implements RPriorityQueue<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
RedissonPriorityQueue.BinarySearchResult<V> |
codec, name| Constructor and Description |
|---|
RedissonPriorityQueue(Codec codec,
CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson) |
RedissonPriorityQueue(CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(V value) |
boolean |
addAll(Collection<? extends V> c) |
RFuture<Boolean> |
addAsync(V e)
Adds element into this collection.
|
RedissonPriorityQueue.BinarySearchResult<V> |
binarySearch(V value) |
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.
|
protected RFuture<Boolean> |
clearExpireAsync(String... keys) |
Comparator<? super V> |
comparator()
Returns comparator used by this queue
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
RFuture<Boolean> |
deleteAsync()
Delete object in async mode
|
V |
element() |
boolean |
expire(Instant instant)
Set an expire date for object.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(Instant instant)
Set an expire date 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)
Use
RExpirable.expire(Instant) instead |
boolean |
expireAt(long timestamp)
Use
RExpirable.expire(Instant) instead |
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
RFuture<Boolean> |
expireAtAsync(long timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
protected RFuture<Boolean> |
expireAtAsync(long timestamp,
String... keys) |
V |
getFirst() |
boolean |
offer(V e) |
RFuture<Boolean> |
offerAsync(V e)
Inserts the specified element into this queue.
|
V |
peek() |
RFuture<V> |
peekAsync()
Retrieves the head of this queue in async mode.
|
V |
poll() |
List<V> |
poll(int limit)
Retrieves and removes the head elements of this queue.
|
RFuture<V> |
pollAsync()
Retrieves and removes the head of this queue in async mode.
|
RFuture<List<V>> |
pollAsync(int limit)
Retrieves and removes the head elements of this queue.
|
V |
pollLastAndOfferFirstTo(String queueName)
Retrieves and removes last available tail element of this queue queue and adds it at the head of
queueName. |
RFuture<V> |
pollLastAndOfferFirstToAsync(String queueName)
Retrieves and removes last available tail element of this queue queue and adds it at the head of
queueName. |
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
|
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
|
protected <T> RFuture<V> |
wrapLockedAsync(RedisCommand<T> command,
Object... params) |
protected <T,R> RFuture<R> |
wrapLockedAsync(Supplier<RFuture<R>> callable) |
add, addAfter, addAfterAsync, addAll, addAllAsync, addAllAsync, addAsync, addAsync, addBefore, addBeforeAsync, addListener, addListenerAsync, 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, removeAllAsync, removeAsync, removeAsync, removeAsync, removeIf, removeListener, removeListenerAsync, retainAllAsync, set, setAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, subList, toArray, toArray, trim, trimAsyncaddListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncclone, finalize, getClass, notify, notifyAll, wait, wait, waitreadAlladdListenerequals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArrayclearExpire, expire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkaddListenerAsync, readAllAsyncaddAllAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncexpireAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncreplaceAll, sort, spliteratorpublic RedissonPriorityQueue(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
public RedissonPriorityQueue(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
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()
RPriorityQueuecomparator in interface RPriorityQueue<V>public RFuture<V> pollAsync()
RQueueAsyncpollAsync in interface RQueueAsync<V>nullprotected <T> RFuture<V> wrapLockedAsync(RedisCommand<T> command, Object... params)
public V getFirst()
public RFuture<V> peekAsync()
RQueueAsyncpeekAsync in interface RQueueAsync<V>nullpublic 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)
public String toString()
toString in class RedissonList<V>public V pollLastAndOfferFirstTo(String queueName)
RPriorityQueuequeueName.pollLastAndOfferFirstTo in interface RPriorityQueue<V>pollLastAndOfferFirstTo in interface RQueue<V>queueName - - names of destination queuenull if the
specified waiting time elapses before an element is availablepublic RFuture<V> pollLastAndOfferFirstToAsync(String queueName)
RQueueAsyncqueueName.pollLastAndOfferFirstToAsync in interface RQueueAsync<V>queueName - - names of destination queuenull if the
specified waiting time elapses before an element is availablepublic RFuture<Boolean> deleteAsync()
RObjectAsyncdeleteAsync in interface RObjectAsyncdeleteAsync in class RedissonObjecttrue if object was deleted 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 RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic List<V> poll(int limit)
RQueuelimit param.public RFuture<Boolean> offerAsync(V e)
RQueueAsyncofferAsync in interface RQueueAsync<V>e - the element to addtrue if successful, or falsepublic RFuture<Boolean> addAsync(V e)
RCollectionAsyncaddAsync 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<List<V>> pollAsync(int limit)
RQueueAsynclimit param.pollAsync in interface RQueueAsync<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 boolean expireAt(long timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expire(Instant instant)
RExpirableexpire in interface RExpirableinstant - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(Instant instant)
RExpirableAsyncexpireAsync in interface RExpirableAsyncinstant - - expire datetrue if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync 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 long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsyncprotected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
Copyright © 2014–2021 Redisson. All rights reserved.