public final class MongoCompressor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LEVEL
The property key for defining the compression level.
|
Modifier and Type | Method and Description |
---|---|
static MongoCompressor |
createSnappyCompressor()
Create an instance for snappy compression.
|
static MongoCompressor |
createZlibCompressor()
Create an instance for zlib compression.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName()
Gets the name of the compressor.
|
<T> T |
getProperty(java.lang.String key,
T defaultValue)
Gets the property with the given key.
|
int |
hashCode() |
java.lang.String |
toString() |
<T> MongoCompressor |
withProperty(java.lang.String key,
T value)
Creates a new compressor from this compressor with the given property added to it.
|
public static final java.lang.String LEVEL
public static MongoCompressor createSnappyCompressor()
public static MongoCompressor createZlibCompressor()
public java.lang.String getName()
public <T> T getProperty(java.lang.String key, T defaultValue)
T
- the property value typekey
- the keydefaultValue
- the default valuepublic <T> MongoCompressor withProperty(java.lang.String key, T value)
T
- the property value typekey
- the property keyvalue
- the property valuepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object