Package com.ning.compress.gzip
Class GZIPRecycler
- java.lang.Object
-
- com.ning.compress.gzip.GZIPRecycler
-
public final class GZIPRecycler extends Object
GZIP-codec-specific "extension" toBufferRecycler, used for recycling expensive objects.- Author:
- Tatu Saloranta (tatu.saloranta@iki.fi)
-
-
Field Summary
Fields Modifier and Type Field Description protected Deflater_deflaterprotected Inflater_inflaterprotected static ThreadLocal<SoftReference<GZIPRecycler>>_recyclerRef
-
Constructor Summary
Constructors Constructor Description GZIPRecycler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DeflaterallocDeflater()InflaterallocInflater()static GZIPRecyclerinstance()Accessor to get thread-local recycler instancevoidreleaseDeflater(Deflater d)voidreleaseInflater(Inflater i)
-
-
-
Field Detail
-
_recyclerRef
protected static final ThreadLocal<SoftReference<GZIPRecycler>> _recyclerRef
-
_inflater
protected Inflater _inflater
-
_deflater
protected Deflater _deflater
-
-
Method Detail
-
instance
public static GZIPRecycler instance()
Accessor to get thread-local recycler instance
-
allocDeflater
public Deflater allocDeflater()
-
releaseDeflater
public void releaseDeflater(Deflater d)
-
allocInflater
public Inflater allocInflater()
-
releaseInflater
public void releaseInflater(Inflater i)
-
-