Enum RedisMessageType

java.lang.Object
java.lang.Enum<RedisMessageType>
io.netty.handler.codec.redis.RedisMessageType
All Implemented Interfaces:
Serializable, Comparable<RedisMessageType>, java.lang.constant.Constable

@UnstableApi public enum RedisMessageType extends Enum<RedisMessageType>
  • Enum Constant Details

  • Field Details

    • value

      private final Byte value
    • inline

      private final boolean inline
  • Constructor Details

    • RedisMessageType

      private RedisMessageType(Byte value, boolean inline)
  • Method Details

    • values

      public static RedisMessageType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RedisMessageType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • length

      public int length()
      Returns length of this type.
    • isInline

      public boolean isInline()
      Returns true if this type is inline type, or returns false. If this is true, this type doesn't have length field.
    • readFrom

      public static RedisMessageType readFrom(ByteBuf in, boolean decodeInlineCommands)
      Determine RedisMessageType based on the type prefix byte read from given the buffer.
    • writeTo

      public void writeTo(ByteBuf out)
      Write the message type's prefix to the given buffer.
    • valueOf

      private static RedisMessageType valueOf(byte value)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null