Interface RBlockingDeque<V>

    • Method Detail

      • pollFirstFromAny

        V pollFirstFromAny​(long timeout,
                           TimeUnit unit,
                           String... queueNames)
                    throws InterruptedException
        Retrieves and removes first available head element of any queue, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.
        Parameters:
        queueNames - - names of queue
        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
      • pollLastFromAny

        V pollLastFromAny​(long timeout,
                          TimeUnit unit,
                          String... queueNames)
                   throws InterruptedException
        Retrieves and removes first available tail element of any queue, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.
        Parameters:
        queueNames - - names of queue
        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