Class TokyoTyrantTranscoder

  • All Implemented Interfaces:
    Transcoder<java.lang.Object>

    public class TokyoTyrantTranscoder
    extends java.lang.Object
    implements Transcoder<java.lang.Object>
    Transcoder for TokyoTyrant.Add 4-bytes flag before value.
    • Constructor Detail

      • TokyoTyrantTranscoder

        public TokyoTyrantTranscoder​(int maxSize)
      • TokyoTyrantTranscoder

        public TokyoTyrantTranscoder()
    • Method Detail

      • decode

        public final java.lang.Object decode​(CachedData d)
        Description copied from interface: Transcoder
        Decode the cached object into the object it represents.
        Specified by:
        decode in interface Transcoder<java.lang.Object>
        Parameters:
        d - the data
        Returns:
        the return value
      • encode

        public final CachedData encode​(java.lang.Object o)
        Description copied from interface: Transcoder
        Encode the given object for storage.
        Specified by:
        encode in interface Transcoder<java.lang.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 interface Transcoder<java.lang.Object>
        Returns:
      • isPrimitiveAsString

        public boolean isPrimitiveAsString()
        Description copied from interface: Transcoder
        Returns if client stores primitive type as string.
        Specified by:
        isPrimitiveAsString in interface Transcoder<java.lang.Object>
        Returns:
      • setCharset

        public void setCharset​(java.lang.String to)
      • setCompressionThreshold

        public void setCompressionThreshold​(int to)
        Description copied from interface: Transcoder
        Set compression threshold in bytes
        Specified by:
        setCompressionThreshold in interface Transcoder<java.lang.Object>
      • setPackZeros

        public void setPackZeros​(boolean packZeros)
        Description copied from interface: Transcoder
        Set whether pack zeros
        Specified by:
        setPackZeros in interface Transcoder<java.lang.Object>
      • setPrimitiveAsString

        public void setPrimitiveAsString​(boolean primitiveAsString)
        Description copied from interface: Transcoder
        Set whether store primitive type as string.
        Specified by:
        setPrimitiveAsString in interface Transcoder<java.lang.Object>