Interface IBlockingQueue<T>

    • Method Detail

      • dequeue

        T dequeue​(long timeout)
           throws IBlockingQueue.ClosedException,
                  java.util.concurrent.TimeoutException
        Dequeue an element.
        Parameters:
        timeout - the time to wait (in millis) or -1 for no timeout.
        Returns:
        The element. When queue is empty the methods blocks until an element is added or the timeout occurs.
        Throws:
        IBlockingQueue.ClosedException
        java.util.concurrent.TimeoutException
      • setClosed

        java.util.List<T> setClosed​(boolean closed)
        Open/close the queue.
        Parameters:
        closed - The closed state.
        Returns:
        The remaining elements after the queue has been closed.
      • isClosed

        boolean isClosed()
        Check if the queue is closed.
      • size

        int size()
        Get the size.
        Returns:
        The size.