Class SynchronizedQueue<T>
java.lang.Object
org.apache.tomcat.util.collections.SynchronizedQueue<T>
- Type Parameters:
T
- The type of object managed by this queue
This is intended as a (mostly) GC-free alternative to
ConcurrentLinkedQueue
when the
requirement is to create an unbounded queue with no requirement to shrink the queue. The aim is to provide the bare
minimum of required functionality as quickly as possible with minimum garbage.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE- See Also:
-
-
Constructor Details
-
SynchronizedQueue
public SynchronizedQueue() -
SynchronizedQueue
public SynchronizedQueue(int initialSize)
-
-
Method Details
-
offer
-
poll
-
size
public int size() -
clear
public void clear()
-