Package org.apache.coyote
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>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.atomic.AtomicIntegersize-
Fields inherited from class org.apache.tomcat.util.collections.SynchronizedStack
DEFAULT_SIZE
-
-
Constructor Summary
Constructors Constructor Description RecycledProcessors(AbstractProtocol.ConnectionHandler<?> handler)Creates a new recycled processors pool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the recycled processors pool.Processorpop()Pops a processor from the pool.booleanpush(Processor processor)Pushes a processor to the pool.-
Methods inherited from class org.apache.tomcat.util.collections.SynchronizedStack
setLimit
-
-
-
-
Constructor Detail
-
RecycledProcessors
public RecycledProcessors(AbstractProtocol.ConnectionHandler<?> handler)
Creates a new recycled processors pool.- Parameters:
handler- The connection handler
-
-
Method Detail
-
push
public boolean push(Processor processor)
Pushes a processor to the pool.- Overrides:
pushin classSynchronizedStack<Processor>- Parameters:
processor- The processor- Returns:
trueif the processor was pushed
-
pop
public Processor pop()
Pops a processor from the pool.- Overrides:
popin classSynchronizedStack<Processor>- Returns:
- the processor or null if empty
-
clear
public void clear()
Clears the recycled processors pool.- Overrides:
clearin classSynchronizedStack<Processor>
-
-