Interface RBlockingDequeAsync<V>

Type Parameters:
V - the type of elements held in this collection
All Superinterfaces:
RBlockingQueueAsync<V>, RCollectionAsync<V>, RDequeAsync<V>, RExpirableAsync, RObjectAsync, RQueueAsync<V>
All Known Subinterfaces:
RBlockingDeque<V>, RPriorityBlockingDeque<V>
All Known Implementing Classes:
RedissonBlockingDeque, RedissonPriorityBlockingDeque

public interface RBlockingDequeAsync<V> extends RDequeAsync<V>, RBlockingQueueAsync<V>
Distributed async implementation of BlockingDeque
Author:
Nikita Koksharov
  • Method Details

    • pollFirstFromAnyAsync

      RFuture<V> pollFirstFromAnyAsync(long timeout, TimeUnit unit, String... queueNames)
      Retrieves and removes first available head element of any queue in async mode, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.
      Parameters:
      timeout - how long to wait before giving up, in units of unit
      unit - a TimeUnit determining how to interpret the timeout parameter
      queueNames - - names of queue
      Returns:
      the head of this queue, or null if the specified waiting time elapses before an element is available
    • pollLastFromAnyAsync

      RFuture<V> pollLastFromAnyAsync(long timeout, TimeUnit unit, String... queueNames)
      Retrieves and removes first available tail element of any queue in async mode, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.
      Parameters:
      timeout - how long to wait before giving up, in units of unit
      unit - a TimeUnit determining how to interpret the timeout parameter
      queueNames - - names of queue
      Returns:
      the head of this queue, or null if the specified waiting time elapses before an element is available
    • putFirstAsync

      RFuture<Void> putFirstAsync(V e)
      Adds value to the head of queue.
      Parameters:
      e - value
      Returns:
      void
    • putLastAsync

      RFuture<Void> putLastAsync(V e)
      Adds value to the tail of queue.
      Parameters:
      e - value
      Returns:
      void
    • pollLastAsync

      RFuture<V> pollLastAsync(long timeout, TimeUnit unit)
      Retrieves and removes value at the tail of queue. If necessary waits up to defined timeout for an element become available.
      Parameters:
      timeout - how long to wait before giving up, in units of unit
      unit - a TimeUnit determining how to interpret the timeout parameter
      Returns:
      the element at the head of this queue, or null if the specified waiting time elapses before an element is available
    • takeLastAsync

      RFuture<V> takeLastAsync()
      Retrieves and removes value at the tail of queue. Waits for an element become available.
      Returns:
      the tail element of this queue
    • pollFirstAsync

      RFuture<V> pollFirstAsync(long timeout, TimeUnit unit)
      Retrieves and removes value at the head of queue. If necessary waits up to defined timeout for an element become available.
      Parameters:
      timeout - how long to wait before giving up, in units of unit
      unit - a TimeUnit determining how to interpret the timeout parameter
      Returns:
      the element at the tail of this queue, or null if the specified waiting time elapses before an element is available
    • takeFirstAsync

      RFuture<V> takeFirstAsync()
      Retrieves and removes value at the head of queue. Waits for an element become available.
      Returns:
      the head element of this queue
    • moveAsync

      RFuture<V> moveAsync(Duration timeout, DequeMoveArgs args)