AbstractProtocol.RecycledProcessors (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.coyote, class: AbstractProtocol, class: RecycledProcessors

# Class AbstractProtocol.RecycledProcessors

java.lang.Object
org.apache.tomcat.util.collections.SynchronizedStack<Processor>
org.apache.coyote.AbstractProtocol.RecycledProcessors

Enclosing class:
  `AbstractProtocol<S>`

protected static class AbstractProtocol.RecycledProcessors extends SynchronizedStack<Processor>
Pool of recycled processors.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final AtomicInteger`
  `size`
  The current size of the pool.

  ### Fields inherited from class SynchronizedStack

  `DEFAULT_SIZE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RecycledProcessors(AbstractProtocol.ConnectionHandler<?> handler)`
  Creates a new recycled processors pool.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Clears the recycled processors pool.
  `Processor`
  `pop()`
  Pops a processor from the pool.
  `boolean`
  `push(Processor processor)`
  Pushes a processor to the pool.

  ### Methods inherited from class SynchronizedStack

  `setLimit`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### size

    protected final AtomicInteger size
    The current size of the pool.

- ## Constructor Details

  - ### RecycledProcessors

    public RecycledProcessors(AbstractProtocol.ConnectionHandler<?> handler)
    Creates a new recycled processors pool.
    Parameters:
      `handler` - The connection handler

- ## Method Details

  - ### push

    public boolean push(Processor processor)
    Pushes a processor to the pool.
    Overrides:
      `push` in class `SynchronizedStack<Processor>`
    Parameters:
      `processor` - The processor
    Returns:
      `true` if the processor was pushed

  - ### pop

    public Processor pop()
    Pops a processor from the pool.
    Overrides:
      `pop` in class `SynchronizedStack<Processor>`
    Returns:
      the processor or null if empty

  - ### clear

    public void clear()
    Clears the recycled processors pool.
    Overrides:
      `clear` in class `SynchronizedStack<Processor>`