Interface RBoundedBlockingQueueAsync<V>

Type Parameters:
V - the type of elements held in this collection
All Superinterfaces:
RBlockingQueueAsync<V>, RCollectionAsync<V>, RExpirableAsync, RObjectAsync, RQueueAsync<V>
All Known Subinterfaces:
RBoundedBlockingQueue<V>
All Known Implementing Classes:
RedissonBoundedBlockingQueue

public interface RBoundedBlockingQueueAsync<V> extends RBlockingQueueAsync<V>
Distributed async implementation of bounded BlockingQueue
Author:
Nikita Koksharov
  • Method Details

    • trySetCapacityAsync

      RFuture<Boolean> trySetCapacityAsync(int capacity)
      Sets queue capacity only if it is not set before.
      Parameters:
      capacity - - queue capacity
      Returns:
      true if capacity set successfully false if capacity already set
    • offerAsync

      RFuture<Boolean> offerAsync(V e, long timeout, TimeUnit unit)
      Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.
      Parameters:
      e - the element to add
      timeout - how long to wait before giving up, in units of unit
      unit - a TimeUnit determining how to interpret the timeout parameter
      Returns:
      true if successful, or false if the specified waiting time elapses before space is available
      Throws:
      ClassCastException - if the class of the specified element prevents it from being added to this queue
      NullPointerException - if the specified element is null