Package io.netty.handler.codec.redis
Enum RedisMessageType
- All Implemented Interfaces:
Serializable
,Comparable<RedisMessageType>
,java.lang.constant.Constable
Type of RESP (REdis Serialization Protocol).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isInline()
Returnstrue
if this type is inline type, or returnsfalse
.int
length()
Returns length of this type.static RedisMessageType
DetermineRedisMessageType
based on the type prefixbyte
read from given the buffer.private static RedisMessageType
valueOf
(byte value) Returns the enum constant of this type with the specified name.static RedisMessageType
Returns the enum constant of this type with the specified name.static RedisMessageType[]
values()
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.
-
Enum Constant Details
-
INLINE_COMMAND
-
SIMPLE_STRING
-
ERROR
-
INTEGER
-
BULK_STRING
-
ARRAY_HEADER
-
-
Field Details
-
value
-
inline
private final boolean inline
-
-
Constructor Details
-
RedisMessageType
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
length
public int length()Returns length of this type. -
isInline
public boolean isInline()Returnstrue
if this type is inline type, or returnsfalse
. If this istrue
, this type doesn't have length field. -
readFrom
DetermineRedisMessageType
based on the type prefixbyte
read from given the buffer. -
writeTo
Write the message type's prefix to the given buffer. -
valueOf
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 nameNullPointerException
- if the argument is null
-