Package net.spy.memcached.transcoders
Class WhalinTranscoder
- java.lang.Object
-
- net.spy.memcached.compat.SpyObject
-
- net.spy.memcached.transcoders.BaseSerializingTranscoder
-
- net.spy.memcached.transcoders.WhalinTranscoder
-
- All Implemented Interfaces:
Transcoder<java.lang.Object>
public class WhalinTranscoder extends BaseSerializingTranscoder implements Transcoder<java.lang.Object>
Transcoder that provides compatibility with Greg Whalin's memcached client.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intCOMPRESSED(package private) static intSERIALIZED(package private) static intSPECIAL_BOOLEAN(package private) static intSPECIAL_BYTE(package private) static intSPECIAL_BYTEARRAY(package private) static intSPECIAL_CHARACTER(package private) static intSPECIAL_DATE(package private) static intSPECIAL_DOUBLE(package private) static intSPECIAL_FLOAT(package private) static intSPECIAL_INT(package private) static intSPECIAL_LONG(package private) static intSPECIAL_SHORT(package private) static intSPECIAL_STRING(package private) static intSPECIAL_STRINGBUFFER(package private) static intSPECIAL_STRINGBUILDERprivate TranscoderUtilstu-
Fields inherited from class net.spy.memcached.transcoders.BaseSerializingTranscoder
charset, compressionThreshold, DEFAULT_COMPRESSION_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description WhalinTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectdecode(CachedData d)Decode the cached object into the object it represents.booleandecodeBoolean(byte[] in)protected java.lang.CharacterdecodeCharacter(byte[] b)CachedDataencode(java.lang.Object o)Encode the given object for storage.byte[]encodeBoolean(boolean b)-
Methods inherited from class net.spy.memcached.transcoders.BaseSerializingTranscoder
asyncDecode, compress, decodeString, decompress, deserialize, encodeString, getMaxSize, serialize, setCharset, setCompressionThreshold
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.spy.memcached.transcoders.Transcoder
asyncDecode, getMaxSize
-
-
-
-
Field Detail
-
SPECIAL_BYTE
static final int SPECIAL_BYTE
- See Also:
- Constant Field Values
-
SPECIAL_BOOLEAN
static final int SPECIAL_BOOLEAN
- See Also:
- Constant Field Values
-
SPECIAL_INT
static final int SPECIAL_INT
- See Also:
- Constant Field Values
-
SPECIAL_LONG
static final int SPECIAL_LONG
- See Also:
- Constant Field Values
-
SPECIAL_CHARACTER
static final int SPECIAL_CHARACTER
- See Also:
- Constant Field Values
-
SPECIAL_STRING
static final int SPECIAL_STRING
- See Also:
- Constant Field Values
-
SPECIAL_STRINGBUFFER
static final int SPECIAL_STRINGBUFFER
- See Also:
- Constant Field Values
-
SPECIAL_FLOAT
static final int SPECIAL_FLOAT
- See Also:
- Constant Field Values
-
SPECIAL_SHORT
static final int SPECIAL_SHORT
- See Also:
- Constant Field Values
-
SPECIAL_DOUBLE
static final int SPECIAL_DOUBLE
- See Also:
- Constant Field Values
-
SPECIAL_DATE
static final int SPECIAL_DATE
- See Also:
- Constant Field Values
-
SPECIAL_STRINGBUILDER
static final int SPECIAL_STRINGBUILDER
- See Also:
- Constant Field Values
-
SPECIAL_BYTEARRAY
static final int SPECIAL_BYTEARRAY
- See Also:
- Constant Field Values
-
COMPRESSED
static final int COMPRESSED
- See Also:
- Constant Field Values
-
SERIALIZED
static final int SERIALIZED
- See Also:
- Constant Field Values
-
tu
private final TranscoderUtils tu
-
-
Method Detail
-
decode
public java.lang.Object decode(CachedData d)
Description copied from interface:TranscoderDecode the cached object into the object it represents.- Specified by:
decodein interfaceTranscoder<java.lang.Object>- Parameters:
d- the data- Returns:
- the return value
-
encode
public CachedData encode(java.lang.Object o)
Description copied from interface:TranscoderEncode the given object for storage.- Specified by:
encodein interfaceTranscoder<java.lang.Object>- Parameters:
o- the object- Returns:
- the CachedData representing what should be sent
-
decodeCharacter
protected java.lang.Character decodeCharacter(byte[] b)
-
encodeBoolean
public byte[] encodeBoolean(boolean b)
-
decodeBoolean
public boolean decodeBoolean(byte[] in)
-
-