Package net.spy.memcached.transcoders
Class SerializingTranscoder
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.transcoders.BaseSerializingTranscoder
net.spy.memcached.transcoders.SerializingTranscoder
- All Implemented Interfaces:
Transcoder<Object>
Transcoder that serializes and compresses objects.
-
Field Summary
Fields inherited from class net.spy.memcached.transcoders.BaseSerializingTranscoder
charset, compressionThreshold, DEFAULT_COMPRESSION_THRESHOLD -
Constructor Summary
ConstructorsConstructorDescriptionGet a serializing transcoder with the default max data size.SerializingTranscoder(int max) Get a serializing transcoder that specifies the max data size. -
Method Summary
Modifier and TypeMethodDescriptionbooleanShould the transcoder be run asyncronously.decode(CachedData d) Decode the cached object into the object it represents.Encode the given object for storage.Methods inherited from class net.spy.memcached.transcoders.BaseSerializingTranscoder
compress, decodeString, decompress, deserialize, encodeString, getMaxSize, serialize, setCharset, setCompressionThresholdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.spy.memcached.transcoders.Transcoder
getMaxSize
-
Constructor Details
-
SerializingTranscoder
public SerializingTranscoder()Get a serializing transcoder with the default max data size. -
SerializingTranscoder
public SerializingTranscoder(int max) Get a serializing transcoder that specifies the max data size.
-
-
Method Details
-
asyncDecode
Description copied from interface:TranscoderShould the transcoder be run asyncronously.- Specified by:
asyncDecodein interfaceTranscoder<Object>- Overrides:
asyncDecodein classBaseSerializingTranscoder- Returns:
- True if the CachedData should be decoded Asyncronously
-
decode
Description copied from interface:TranscoderDecode the cached object into the object it represents.- Specified by:
decodein interfaceTranscoder<Object>- Parameters:
d- the data- Returns:
- the return value
-
encode
Description copied from interface:TranscoderEncode the given object for storage.- Specified by:
encodein interfaceTranscoder<Object>- Parameters:
o- the object- Returns:
- the CachedData representing what should be sent
-