Class RedisDecoder

    • Constructor Detail

      • RedisDecoder

        public RedisDecoder()
        Creates a new instance with default maxInlineMessageLength and messagePool and inline command decoding disabled.
      • RedisDecoder

        public RedisDecoder​(boolean decodeInlineCommands)
        Creates a new instance with default maxInlineMessageLength and messagePool.
        Parameters:
        decodeInlineCommands - if true, inline commands will be decoded.
      • RedisDecoder

        public RedisDecoder​(int maxInlineMessageLength,
                            RedisMessagePool messagePool)
        Creates a new instance with inline command decoding disabled.
        Parameters:
        maxInlineMessageLength - the maximum length of inline message.
        messagePool - the predefined message pool.
      • RedisDecoder

        public RedisDecoder​(int maxInlineMessageLength,
                            RedisMessagePool messagePool,
                            boolean decodeInlineCommands)
        Creates a new instance.
        Parameters:
        maxInlineMessageLength - the maximum length of inline message.
        messagePool - the predefined message pool.
        decodeInlineCommands - if true, inline commands will be decoded.
    • Method Detail

      • resetDecoder

        private void resetDecoder()
      • decodeType

        private boolean decodeType​(ByteBuf in)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • decodeInline

        private boolean decodeInline​(ByteBuf in,
                                     java.util.List<java.lang.Object> out)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • decodeLength

        private boolean decodeLength​(ByteBuf in,
                                     java.util.List<java.lang.Object> out)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • decodeBulkString

        private boolean decodeBulkString​(ByteBuf in,
                                         java.util.List<java.lang.Object> out)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • decodeBulkStringEndOfLine

        private boolean decodeBulkStringEndOfLine​(ByteBuf in,
                                                  java.util.List<java.lang.Object> out)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • decodeBulkStringContent

        private boolean decodeBulkStringContent​(ByteBuf in,
                                                java.util.List<java.lang.Object> out)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readEndOfLine

        private static void readEndOfLine​(ByteBuf in)
      • parseRedisNumber

        private long parseRedisNumber​(ByteBuf byteBuf)
      • parsePositiveNumber

        private long parsePositiveNumber​(ByteBuf byteBuf)