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