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 Details

    • pollLastAndOfferFirstTo

      V pollLastAndOfferFirstTo(String queueName)
      Retrieves and removes last available tail element of this queue queue and adds it at the head of queueName.
      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

      List<V> readAll()
      Returns all queue elements at once
      Returns:
      elements
    • poll

      List<V> poll(int limit)
      Retrieves and removes the head elements of this queue. Elements amount limited by limit param.
      Returns:
      list of head elements
    • addListener

      int addListener(ObjectListener listener)
      Adds object event listener
      Specified by:
      addListener in interface RObject
      Parameters:
      listener - - object event listener
      Returns:
      listener id
      See Also: