Package org.redisson.api
Interface RQueue<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
Collection<V>
,Iterable<V>
,Queue<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 Queue<V>, RExpirable, RQueueAsync<V>
Queue
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 listenerList<V>
poll(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 ofqueueName
.List<V>
readAll()
Returns all queue elements at once-
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
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
V pollLastAndOfferFirstTo(String 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
-
poll
List<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
-
-