Class CompressionPool<T>
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.compression.CompressionPool<T>
- All Implemented Interfaces:
LifeCycle
- Direct Known Subclasses:
DeflaterPool,InflaterPool
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStart, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
Field Details
-
INFINITE_CAPACITY
public static final int INFINITE_CAPACITY- See Also:
-
-
Constructor Details
-
CompressionPool
public CompressionPool(int capacity) Create a Pool ofCompressionPoolinstances. If given a capacity equal to zero the Objects will not be pooled and will be created on acquire and ended on release. If given a negative capacity equal to zero there will be no size restrictions on the Pool- Parameters:
capacity- maximum number of Objects which can be contained in the pool
-
-
Method Details
-
newObject
-
end
-
reset
-
acquire
- Returns:
- Object taken from the pool if it is not empty or a newly created Object
-
release
- Parameters:
object- returns this Object to the pool or callsend(Object)if the pool is full.
-
doStop
public void doStop()- Overrides:
doStopin classAbstractLifeCycle
-
toString
- Overrides:
toStringin classAbstractLifeCycle
-