Class TokyoTyrantTranscoder
java.lang.Object
net.rubyeye.xmemcached.transcoders.TokyoTyrantTranscoder
- All Implemented Interfaces:
Transcoder<Object>
Transcoder for TokyoTyrant.Add 4-bytes flag before value.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object
decode
(CachedData d) Decode the cached object into the object it represents.final CachedData
Encode the given object for storage.final int
boolean
Returns if transcoder packs zero.boolean
Returns if client stores primitive type as string.void
setCharset
(String to) void
setCompressionMode
(CompressionMode compressMode) Set compress mode,default is ZIPvoid
setCompressionThreshold
(int to) Set compression threshold in bytesvoid
setPackZeros
(boolean packZeros) Set whether pack zerosvoid
setPrimitiveAsString
(boolean primitiveAsString) Set whether store primitive type as string.
-
Field Details
-
serializingTranscoder
-
-
Constructor Details
-
TokyoTyrantTranscoder
public TokyoTyrantTranscoder(int maxSize) -
TokyoTyrantTranscoder
public TokyoTyrantTranscoder()
-
-
Method Details
-
decode
Description copied from interface:Transcoder
Decode the cached object into the object it represents.- Specified by:
decode
in interfaceTranscoder<Object>
- Parameters:
d
- the data- Returns:
- the return value
-
setCompressionMode
Description copied from interface:Transcoder
Set compress mode,default is ZIP- Specified by:
setCompressionMode
in interfaceTranscoder<Object>
- Parameters:
compressMode
-- See Also:
-
encode
Description copied from interface:Transcoder
Encode the given object for storage.- Specified by:
encode
in interfaceTranscoder<Object>
- Parameters:
o
- the object- Returns:
- the CachedData representing what should be sent
-
getMaxSize
public final int getMaxSize() -
isPackZeros
public boolean isPackZeros()Description copied from interface:Transcoder
Returns if transcoder packs zero.- Specified by:
isPackZeros
in interfaceTranscoder<Object>
- Returns:
-
isPrimitiveAsString
public boolean isPrimitiveAsString()Description copied from interface:Transcoder
Returns if client stores primitive type as string.- Specified by:
isPrimitiveAsString
in interfaceTranscoder<Object>
- Returns:
-
setCharset
-
setCompressionThreshold
public void setCompressionThreshold(int to) Description copied from interface:Transcoder
Set compression threshold in bytes- Specified by:
setCompressionThreshold
in interfaceTranscoder<Object>
- Parameters:
to
-
-
setPackZeros
public void setPackZeros(boolean packZeros) Description copied from interface:Transcoder
Set whether pack zeros- Specified by:
setPackZeros
in interfaceTranscoder<Object>
-
setPrimitiveAsString
public void setPrimitiveAsString(boolean primitiveAsString) Description copied from interface:Transcoder
Set whether store primitive type as string.- Specified by:
setPrimitiveAsString
in interfaceTranscoder<Object>
- Parameters:
primitiveAsString
-
-