Class SynchronizedStack<T>
- java.lang.Object
-
- org.apache.tomcat.util.collections.SynchronizedStack<T>
-
- Type Parameters:
T- The type of object managed by this stack
- Direct Known Subclasses:
AbstractProtocol.RecycledProcessors
public class SynchronizedStack<T> extends java.lang.ObjectThis is intended as a (mostly) GC-free alternative toStackwhen the requirement is to create a pool of re-usable objects with no requirement to shrink the pool. The aim is to provide the bare minimum of required functionality as quickly as possible with minimum garbage.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SIZE
-
Constructor Summary
Constructors Constructor Description SynchronizedStack()SynchronizedStack(int size, int limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Tpop()booleanpush(T obj)
-
-
-
Field Detail
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
- See Also:
- Constant Field Values
-
-