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
_deflater
protected Inflater
_inflater
protected 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 Deflater
allocDeflater()
Inflater
allocInflater()
static GZIPRecycler
instance()
Accessor to get thread-local recycler instancevoid
releaseDeflater(Deflater d)
void
releaseInflater(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)
-
-