Package org.redisson.api
Interface RPriorityQueue<V>
- Type Parameters:
V- value type
- All Superinterfaces:
Collection<V>,Iterable<V>,Queue<V>,RCollectionAsync<V>,RExpirable,RExpirableAsync,RObject,RObjectAsync,RQueue<V>,RQueueAsync<V>
- All Known Subinterfaces:
RPriorityBlockingDeque<V>,RPriorityBlockingQueue<V>,RPriorityDeque<V>
- All Known Implementing Classes:
RedissonPriorityBlockingDeque,RedissonPriorityBlockingQueue,RedissonPriorityDeque,RedissonPriorityQueue
Redis based priority deque.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionComparator<? super V> Returns comparator used by this queuepollLastAndOfferFirstTo(String queueName) Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName.readAll()Returns all queue elements at oncebooleantrySetComparator(Comparator<? super V> comparator) Sets new comparator only if current set is emptyMethods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayMethods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncMethods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObject
copy, copy, copy, copyAndReplace, copyAndReplace, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncMethods inherited from interface org.redisson.api.RQueue
addListener, pollMethods inherited from interface org.redisson.api.RQueueAsync
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
Method Details
-
comparator
Comparator<? super V> comparator()Returns comparator used by this queue- Returns:
- comparator object
-
readAll
Returns all queue elements at once -
pollLastAndOfferFirstTo
Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName.- Specified by:
pollLastAndOfferFirstToin interfaceRQueue<V>- Parameters:
queueName- - names of destination queue- Returns:
- the tail of this queue, or
nullif the specified waiting time elapses before an element is available
-
trySetComparator
Sets new comparator only if current set is empty- Parameters:
comparator- for values- Returns:
trueif new comparator settedfalseotherwise
-