Class WhalinV1Transcoder
- java.lang.Object
-
- net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder
-
- net.rubyeye.xmemcached.transcoders.WhalinV1Transcoder
-
- All Implemented Interfaces:
Transcoder<Object>
public class WhalinV1Transcoder extends BaseSerializingTranscoder implements Transcoder<Object>
Handles old whalin (tested with v1.6) encoding: data type is in the first byte of the value.- Since:
- Oct 16, 2008
- Author:
- bpartensky
-
-
Field Summary
Fields Modifier and Type Field Description static intCOMPRESSEDstatic intSERIALIZEDstatic intSPECIAL_BOOLEANstatic intSPECIAL_BYTEstatic intSPECIAL_CHARACTERstatic intSPECIAL_DATEstatic intSPECIAL_DOUBLEstatic intSPECIAL_FLOATstatic intSPECIAL_INTEGERstatic intSPECIAL_LONGstatic intSPECIAL_SHORTstatic intSPECIAL_STRINGstatic intSPECIAL_STRINGBUFFERstatic intSPECIAL_STRINGBUILDER-
Fields inherited from class net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder
charset, compressionThreshold, compressMode, DEFAULT_CHARSET, DEFAULT_COMPRESSION_THRESHOLD, log
-
-
Constructor Summary
Constructors Constructor Description WhalinV1Transcoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectdecode(CachedData d)Decode the cached object into the object it represents.CachedDataencode(Object o)Encode the given object for storage.booleanisPackZeros()Returns if transcoder packs zero.booleanisPrimitiveAsString()Returns if client stores primitive type as string.voidsetPackZeros(boolean packZeros)Set whether pack zerosvoidsetPrimitiveAsString(boolean primitiveAsString)Set whether store primitive type as string.-
Methods inherited from class net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder
compress, decodeString, decompress, deserialize, encodeString, getCompressMode, serialize, setCharset, setCompressionMode, setCompressionThreshold
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.rubyeye.xmemcached.transcoders.Transcoder
setCompressionMode, setCompressionThreshold
-
-
-
-
Field Detail
-
SPECIAL_BYTE
public static final int SPECIAL_BYTE
- See Also:
- Constant Field Values
-
SPECIAL_BOOLEAN
public static final int SPECIAL_BOOLEAN
- See Also:
- Constant Field Values
-
SPECIAL_INTEGER
public static final int SPECIAL_INTEGER
- See Also:
- Constant Field Values
-
SPECIAL_LONG
public static final int SPECIAL_LONG
- See Also:
- Constant Field Values
-
SPECIAL_CHARACTER
public static final int SPECIAL_CHARACTER
- See Also:
- Constant Field Values
-
SPECIAL_STRING
public static final int SPECIAL_STRING
- See Also:
- Constant Field Values
-
SPECIAL_STRINGBUFFER
public static final int SPECIAL_STRINGBUFFER
- See Also:
- Constant Field Values
-
SPECIAL_FLOAT
public static final int SPECIAL_FLOAT
- See Also:
- Constant Field Values
-
SPECIAL_SHORT
public static final int SPECIAL_SHORT
- See Also:
- Constant Field Values
-
SPECIAL_DOUBLE
public static final int SPECIAL_DOUBLE
- See Also:
- Constant Field Values
-
SPECIAL_DATE
public static final int SPECIAL_DATE
- See Also:
- Constant Field Values
-
SPECIAL_STRINGBUILDER
public static final int SPECIAL_STRINGBUILDER
- See Also:
- Constant Field Values
-
COMPRESSED
public static final int COMPRESSED
- See Also:
- Constant Field Values
-
SERIALIZED
public static final int SERIALIZED
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPackZeros
public void setPackZeros(boolean packZeros)
Description copied from interface:TranscoderSet whether pack zeros- Specified by:
setPackZerosin interfaceTranscoder<Object>
-
setPrimitiveAsString
public void setPrimitiveAsString(boolean primitiveAsString)
Description copied from interface:TranscoderSet whether store primitive type as string.- Specified by:
setPrimitiveAsStringin interfaceTranscoder<Object>
-
isPackZeros
public boolean isPackZeros()
Description copied from interface:TranscoderReturns if transcoder packs zero.- Specified by:
isPackZerosin interfaceTranscoder<Object>- Returns:
-
isPrimitiveAsString
public boolean isPrimitiveAsString()
Description copied from interface:TranscoderReturns if client stores primitive type as string.- Specified by:
isPrimitiveAsStringin interfaceTranscoder<Object>- Returns:
-
encode
public CachedData encode(Object o)
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
-
decode
public Object decode(CachedData d)
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
-
-