Package org.redisson.api
Interface RQueueAsync<V>
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
RCollectionAsync<V>
,RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RBlockingDeque<V>
,RBlockingDequeAsync<V>
,RBlockingQueue<V>
,RBlockingQueueAsync<V>
,RBoundedBlockingQueue<V>
,RBoundedBlockingQueueAsync<V>
,RDelayedQueue<V>
,RDeque<V>
,RDequeAsync<V>
,RPriorityBlockingDeque<V>
,RPriorityBlockingQueue<V>
,RPriorityDeque<V>
,RPriorityQueue<V>
,RQueue<V>
,RRingBuffer<V>
,RRingBufferAsync<V>
,RTransferQueue<V>
,RTransferQueueAsync<V>
- All Known Implementing Classes:
RedissonBlockingDeque
,RedissonBlockingQueue
,RedissonBoundedBlockingQueue
,RedissonDelayedQueue
,RedissonDeque
,RedissonPriorityBlockingDeque
,RedissonPriorityBlockingQueue
,RedissonPriorityDeque
,RedissonPriorityQueue
,RedissonQueue
,RedissonRingBuffer
,RedissonTransferQueue
Queue
backed by Redis- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionaddListenerAsync
(ObjectListener listener) Adds object event listenerofferAsync
(V e) Inserts the specified element into this queue.Retrieves the head of this queue in async mode.Retrieves and removes the head of this queue in async mode.pollAsync
(int limit) Retrieves and removes the head elements of this queue.pollLastAndOfferFirstToAsync
(String queueName) Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName
.Returns all queue elements at onceMethods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods 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, unlinkAsync
-
Method Details
-
peekAsync
Retrieves the head of this queue in async mode.- Returns:
- the head of this queue, or
null
-
pollAsync
Retrieves and removes the head of this queue in async mode.- Returns:
- the head of this queue, or
null
-
offerAsync
Inserts the specified element into this queue.- Parameters:
e
- the element to add- Returns:
true
if successful, orfalse
- Throws:
ClassCastException
- if the class of the specified element prevents it from being added to this queueNullPointerException
- if the specified element is null
-
pollLastAndOfferFirstToAsync
Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName
.- Parameters:
queueName
- - names of destination queue- Returns:
- the tail of this queue, or
null
if the specified waiting time elapses before an element is available
-
readAllAsync
Returns all queue elements at once- Returns:
- elements
-
pollAsync
Retrieves and removes the head elements of this queue. Elements amount limited bylimit
param.- Returns:
- list of head elements
-
addListenerAsync
Adds object event listener- Specified by:
addListenerAsync
in interfaceRObjectAsync
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
-