public class SerializingTranscoder extends BaseSerializingTranscoder implements Transcoder<Object>
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESSED |
static int |
SERIALIZED |
static int |
SPECIAL_BOOLEAN |
static int |
SPECIAL_BYTE |
static int |
SPECIAL_BYTEARRAY |
static int |
SPECIAL_DATE |
static int |
SPECIAL_DOUBLE |
static int |
SPECIAL_FLOAT |
static int |
SPECIAL_INT |
static int |
SPECIAL_LONG |
static int |
SPECIAL_MASK |
charset, compressionThreshold, compressMode, DEFAULT_CHARSET, DEFAULT_COMPRESSION_THRESHOLD, log
Constructor and Description |
---|
SerializingTranscoder()
Get a serializing transcoder with the default max data size.
|
SerializingTranscoder(int max)
Get a serializing transcoder that specifies the max data size.
|
Modifier and Type | Method and Description |
---|---|
Object |
decode(CachedData d)
Decode the cached object into the object it represents.
|
protected Object |
decode0(CachedData cachedData,
byte[] data,
int flags) |
CachedData |
encode(Object o)
Encode the given object for storage.
|
int |
getMaxSize() |
TranscoderUtils |
getTranscoderUtils() |
boolean |
isPackZeros()
Returns if transcoder packs zero.
|
boolean |
isPrimitiveAsString()
Returns if client stores primitive type as string.
|
void |
setPackZeros(boolean packZeros)
Set whether pack zeros
|
void |
setPrimitiveAsString(boolean primitiveAsString)
Set whether store primitive type as string.
|
compress, decodeString, decompress, deserialize, encodeString, getCompressMode, serialize, setCharset, setCompressionMode, setCompressionThreshold
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setCompressionMode, setCompressionThreshold
public static final int SERIALIZED
public static final int COMPRESSED
public static final int SPECIAL_MASK
public static final int SPECIAL_BOOLEAN
public static final int SPECIAL_INT
public static final int SPECIAL_LONG
public static final int SPECIAL_DATE
public static final int SPECIAL_BYTE
public static final int SPECIAL_FLOAT
public static final int SPECIAL_DOUBLE
public static final int SPECIAL_BYTEARRAY
public SerializingTranscoder()
public SerializingTranscoder(int max)
public void setPackZeros(boolean packZeros)
Transcoder
setPackZeros
in interface Transcoder<Object>
public void setPrimitiveAsString(boolean primitiveAsString)
Transcoder
setPrimitiveAsString
in interface Transcoder<Object>
public final int getMaxSize()
public TranscoderUtils getTranscoderUtils()
public boolean isPackZeros()
Transcoder
isPackZeros
in interface Transcoder<Object>
public boolean isPrimitiveAsString()
Transcoder
isPrimitiveAsString
in interface Transcoder<Object>
public final Object decode(CachedData d)
Transcoder
decode
in interface Transcoder<Object>
d
- the dataprotected final Object decode0(CachedData cachedData, byte[] data, int flags)
public final CachedData encode(Object o)
Transcoder
encode
in interface Transcoder<Object>
o
- the objectCopyright © 2021. All rights reserved.