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

public interface RQueueAsync<V> extends RCollectionAsync<V>
Queue backed by Redis
Author:
Nikita Koksharov
  • Method Details

    • peekAsync

      RFuture<V> peekAsync()
      Retrieves the head of this queue in async mode.
      Returns:
      the head of this queue, or null
    • pollAsync

      RFuture<V> pollAsync()
      Retrieves and removes the head of this queue in async mode.
      Returns:
      the head of this queue, or null
    • offerAsync

      RFuture<Boolean> offerAsync(V e)
      Inserts the specified element into this queue.
      Parameters:
      e - the element to add
      Returns:
      true if successful, or false
      Throws:
      ClassCastException - if the class of the specified element prevents it from being added to this queue
      NullPointerException - if the specified element is null
    • pollLastAndOfferFirstToAsync

      RFuture<V> pollLastAndOfferFirstToAsync(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
    • readAllAsync

      RFuture<List<V>> readAllAsync()
      Returns all queue elements at once
      Returns:
      elements
    • pollAsync

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

      RFuture<Integer> addListenerAsync(ObjectListener listener)
      Adds object event listener
      Specified by:
      addListenerAsync in interface RObjectAsync
      Parameters:
      listener - - object event listener
      Returns:
      listener id
      See Also: