Class DeflaterPool
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.compression.CompressionPool<java.util.zip.Deflater>
-
- org.eclipse.jetty.util.compression.DeflaterPool
-
- All Implemented Interfaces:
LifeCycle
public class DeflaterPool extends CompressionPool<java.util.zip.Deflater>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.util.compression.CompressionPool
INFINITE_CAPACITY
-
-
Constructor Summary
Constructors Constructor Description DeflaterPool(int capacity, int compressionLevel, boolean nowrap)
Create a Pool ofDeflater
instances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
end(java.util.zip.Deflater deflater)
static DeflaterPool
ensurePool(Container container)
protected java.util.zip.Deflater
newObject()
protected void
reset(java.util.zip.Deflater deflater)
-
Methods inherited from class org.eclipse.jetty.util.compression.CompressionPool
acquire, doStop, release, toString
-
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
-
-
-
-
Constructor Detail
-
DeflaterPool
public DeflaterPool(int capacity, int compressionLevel, boolean nowrap)
Create a Pool ofDeflater
instances.If given a capacity equal to zero the Deflaters 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 DeflaterPool
- Parameters:
capacity
- maximum number of Deflaters which can be contained in the poolcompressionLevel
- the default compression level for new Deflater objectsnowrap
- if true then use GZIP compatible compression for all new Deflater objects
-
-
Method Detail
-
newObject
protected java.util.zip.Deflater newObject()
- Specified by:
newObject
in classCompressionPool<java.util.zip.Deflater>
-
end
protected void end(java.util.zip.Deflater deflater)
- Specified by:
end
in classCompressionPool<java.util.zip.Deflater>
-
reset
protected void reset(java.util.zip.Deflater deflater)
- Specified by:
reset
in classCompressionPool<java.util.zip.Deflater>
-
ensurePool
public static DeflaterPool ensurePool(Container container)
-
-