private static <T> void payback(Map<Class<T>, List<T>> pool, T codec) {
    if (codec != null) {
      Class<T> codecClass = (Class<T>) codec.getClass();
      synchronized (pool) {
        if (!pool.containsKey(codecClass)) {
          pool.put(codecClass, new ArrayList<T>());
        }

        List<T> codecList = pool.get(codecClass);
        synchronized (codecList) {
          codecList.add(codec);
        }
      }
    }
  }
A global decompressor pool used to save the expensive
construction/destruction of (possibly native) decompression codecs.
ql/src/java/org/apache/hadoop/hive/ql/io/CodecPool.java