Package org.redisson.api
Interface RQueue<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
<V>
,<V>
,<V>
,RCollectionAsync<V>
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
,RQueueAsync<V>
- All Known Subinterfaces:
RBlockingDeque<V>
,RBlockingQueue<V>
,RBoundedBlockingQueue<V>
,RDelayedQueue<V>
,RDeque<V>
,RPriorityBlockingDeque<V>
,RPriorityBlockingQueue<V>
,RPriorityDeque<V>
,RPriorityQueue<V>
,RRingBuffer<V>
,RTransferQueue<V>
- All Known Implementing Classes:
RedissonBlockingDeque
,RedissonBlockingQueue
,RedissonBoundedBlockingQueue
,RedissonDelayedQueue
,RedissonDeque
,RedissonPriorityBlockingDeque
,RedissonPriorityBlockingQueue
,RedissonPriorityDeque
,RedissonPriorityQueue
,RedissonQueue
,RedissonRingBuffer
,RedissonTransferQueue
public interface RQueue<V> extends <V>, RExpirable, RQueueAsync<V>
backed by Redis- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addListener(ObjectListener listener)
Adds object event listener<V>
poll(int limit)
Retrieves and removes the head elements of this queue.V
queueName)
Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName
.<V>
readAll()
Returns all queue elements at once-
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Methods inherited from interface org.redisson.api.RQueueAsync
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
-
-
-
Method Detail
-
pollLastAndOfferFirstTo
queueName)
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
-
readAll
<V> readAll()
Returns all queue elements at once- Returns:
- elements
-
poll
<V> poll(int limit)
Retrieves and removes the head elements of this queue. Elements amount limited bylimit
param.- Returns:
- list of head elements
-
addListener
int addListener(ObjectListener listener)
Adds object event listener- Specified by:
addListener
in interfaceRObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
ExpiredObjectListener
,DeletedObjectListener
,ListAddListener
,ListInsertListener
,ListSetListener
,ListRemoveListener
,ListTrimListener
-
-