RetryableQueue (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.tomcat.util.threads, interface: RetryableQueue

# Interface RetryableQueue<T>

All Superinterfaces:
  `BlockingQueue<T>, Collection<T>, Iterable<T>, Queue<T>`

All Known Implementing Classes:
  `TaskQueue`

public interface RetryableQueue<T> extends BlockingQueue<T>

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `force(Runnable o, long timeout, TimeUnit unit)`
  Deprecated.
  Unused.
  `boolean`
  `force(T o)`
  Used to add a task to the queue if the task has been rejected by the Executor.

  ### Methods inherited from interface BlockingQueue

  `add, contains, drainTo, drainTo, offer, offer, poll, put, remainingCapacity, remove, take`

  ### Methods inherited from interface Collection

  `addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray`

  ### Methods inherited from interface Iterable

  `forEach`

  ### Methods inherited from interface Queue

  `element, peek, poll, remove`

- ## Method Details

  - ### force

    boolean force(T o)
    Used to add a task to the queue if the task has been rejected by the Executor.
    Parameters:
      `o` - The task to add to the queue
    Returns:
      `true` if the task was added to the queue, otherwise `false`

  - ### force

    @Deprecated boolean force(Runnable o, long timeout, TimeUnit unit) throws InterruptedException
    Deprecated.
    Unused. Will be removed in Tomcat 10.1.x.
    Used to add a task to the queue if the task has been rejected by the Executor.
    Parameters:
      `o` - The task to add to the queue
      `timeout` - The timeout to use when adding the task
      `unit` - The units in which the timeout is expressed
    Returns:
      `true` if the task was added to the queue, otherwise `false`
    Throws:
      `InterruptedException` - If the call is interrupted before the timeout expires