| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.compress.CodecPool
@InterfaceAudience.Public @InterfaceStability.Evolving public class CodecPool
A global compressor/decompressor pool used to save and reuse (possibly native) compression/decompression codecs.
| Constructor Summary | |
|---|---|
| CodecPool() | |
| Method Summary | |
|---|---|
| static Compressor | getCompressor(CompressionCodec codec) | 
| static Compressor | getCompressor(CompressionCodec codec,
                           Configuration conf)Get a Compressorfor the givenCompressionCodecfrom the 
 pool or a new one. | 
| static Decompressor | getDecompressor(CompressionCodec codec)Get a Decompressorfor the givenCompressionCodecfrom the
 pool or a new one. | 
| static int | getLeasedCompressorsCount(CompressionCodec codec)Return the number of leased Compressors for thisCompressionCodec | 
| static int | getLeasedDecompressorsCount(CompressionCodec codec)Return the number of leased Decompressors for thisCompressionCodec | 
| static void | returnCompressor(Compressor compressor)Return the Compressorto the pool. | 
| static void | returnDecompressor(Decompressor decompressor)Return the Decompressorto the pool. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public CodecPool()
| Method Detail | 
|---|
public static Compressor getCompressor(CompressionCodec codec,
                                       Configuration conf)
Compressor for the given CompressionCodec from the 
 pool or a new one.
codec - the CompressionCodec for which to get the 
              Compressorconf - the Configuration object which contains confs for creating or reinit the compressor
Compressor for the given 
         CompressionCodec from the pool or a new onepublic static Compressor getCompressor(CompressionCodec codec)
public static Decompressor getDecompressor(CompressionCodec codec)
Decompressor for the given CompressionCodec from the
 pool or a new one.
codec - the CompressionCodec for which to get the 
              Decompressor
Decompressor for the given 
         CompressionCodec the pool or a new onepublic static void returnCompressor(Compressor compressor)
Compressor to the pool.
compressor - the Compressor to be returned to the poolpublic static void returnDecompressor(Decompressor decompressor)
Decompressor to the pool.
decompressor - the Decompressor to be returned to the 
                     poolpublic static int getLeasedCompressorsCount(CompressionCodec codec)
Compressors for this
 CompressionCodec
public static int getLeasedDecompressorsCount(CompressionCodec codec)
Decompressors for this
 CompressionCodec
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||