Interface IQueue<E>

Type Parameters:
E - queue item type
All Superinterfaces:
BaseQueue<E>, BlockingQueue<E>, Collection<E>, DistributedObject, ICollection<E>, Iterable<E>, Queue<E>

public interface IQueue<E> extends BlockingQueue<E>, BaseQueue<E>, ICollection<E>
Concurrent, blocking, distributed, observable queue.

The IQueue is not a partitioned data-structure. All the content of an IQueue is stored in a single machine (and in the backup). The IQueue will not scale by adding more members to the cluster.

See Also:
  • Method Details

    • poll

      E poll()
      Retrieves and removes the head of this queue, or returns null if this queue is empty.
      Specified by:
      poll in interface BaseQueue<E>
      Specified by:
      poll in interface Queue<E>
      Returns:
      the head of this queue, or null if this queue is empty
    • poll

      E poll(long timeout, @Nonnull TimeUnit unit) throws InterruptedException
      Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
      Specified by:
      poll in interface BaseQueue<E>
      Specified by:
      poll in interface BlockingQueue<E>
      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 head of this queue, or null if the specified waiting time elapses before an element is available
      Throws:
      InterruptedException - if interrupted while waiting
    • take

      @Nonnull E take() throws InterruptedException
      Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
      Specified by:
      take in interface BaseQueue<E>
      Specified by:
      take in interface BlockingQueue<E>
      Returns:
      the head of this queue
      Throws:
      InterruptedException - if interrupted while waiting