org.elasticsearch.common.compress.lzf.util
Class ChunkDecoderFactory

java.lang.Object
  extended by org.elasticsearch.common.compress.lzf.util.ChunkDecoderFactory

public class ChunkDecoderFactory
extends java.lang.Object

Simple helper class used for loading ChunkDecoder implementations, based on criteria such as "fastest available".

Yes, it looks butt-ugly, but does the job. Nonetheless, if anyone has lipstick for this pig, let me know.

Since:
0.9

Method Summary
static ChunkDecoder optimalInstance()
          Method to use for getting decompressor instance that uses the most optimal available methods for underlying data access.
static ChunkDecoder safeInstance()
          Method that can be used to ensure that a "safe" decompressor instance is loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

optimalInstance

public static ChunkDecoder optimalInstance()
Method to use for getting decompressor instance that uses the most optimal available methods for underlying data access. It should be safe to call this method as implementations are dynamically loaded; however, on some non-standard platforms it may be necessary to either directly load instances, or use safeInstance().


safeInstance

public static ChunkDecoder safeInstance()
Method that can be used to ensure that a "safe" decompressor instance is loaded. Safe here means that it should work on any and all Java platforms.