Enum RedisMessageType

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

@UnstableApi public enum RedisMessageType extends java.lang.Enum<RedisMessageType>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
     
     
     
     
     
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
     
    private final java.lang.Byte
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    RedisMessageType(java.lang.Byte value, boolean inline)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this type is inline type, or returns false.
    int
    Returns length of this type.
    readFrom(ByteBuf in, boolean decodeInlineCommands)
    Determine RedisMessageType based on the type prefix byte read from given the buffer.
    private static RedisMessageType
    valueOf(byte value)
    Returns the enum constant of this type with the specified name.
    valueOf(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.
    void
    Write the message type's prefix to the given buffer.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Field Details

    • value

      private final java.lang.Byte value
    • inline

      private final boolean inline
  • Constructor Details

    • RedisMessageType

      private RedisMessageType(java.lang.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(java.lang.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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null