public class JavaTranscoder extends Object implements CacheTranscoder
setCompressionThreshold(int)
those data are
compressed using GZIP. This transcoder is similar to SerializingTranscoder in xmemcached or spymemcached.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARSET |
static int |
DEFAULT_COMPRESSION_THRESHOLD
Default compression threshold value.
|
Constructor and Description |
---|
JavaTranscoder() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
protected void |
close(Closeable closeable) |
protected byte[] |
compress(byte[] in)
Compress the given array of bytes.
|
Object |
decode(CachedObject d)
Decodes cached object.
|
protected byte[] |
decompress(byte[] in)
Decompress the given array of bytes.
|
protected Object |
deserialize(byte[] in)
Deserialize given stream using java deserialization.
|
CachedObject |
encode(Object o)
Encodes object.
|
boolean |
equals(Object o) |
int |
getCompressionThreshold() |
int |
hashCode() |
protected byte[] |
serialize(Object o)
Serialize object using java serialization.
|
void |
setCompressionThreshold(int compressionThreshold) |
String |
toString() |
public static final int DEFAULT_COMPRESSION_THRESHOLD
public static final String DEFAULT_CHARSET
public Object decode(CachedObject d)
CacheTranscoder
decode
in interface CacheTranscoder
d
- the cached object to decodepublic CachedObject encode(Object o)
CacheTranscoder
encode
in interface CacheTranscoder
o
- the object to encodeprotected byte[] serialize(Object o)
o
- object to serializeprotected Object deserialize(byte[] in)
in
- data to deserializeprotected byte[] compress(byte[] in)
in
- data to compressprotected byte[] decompress(byte[] in)
in
- data to decompressprotected void close(Closeable closeable)
@Generated(value="lombok") public String toString()
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") protected boolean canEqual(Object other)
@Generated(value="lombok") public int hashCode()
@Generated(value="lombok") public int getCompressionThreshold()
@Generated(value="lombok") public void setCompressionThreshold(int compressionThreshold)
Copyright © 2019. All rights reserved.