Enum RedisMessageType
- All Implemented Interfaces:
Serializable, Comparable<RedisMessageType>
Type of RESP (REdis Serialization Protocol).
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanisInline()Returnstrueif this type is inline type, or returnsfalse.intlength()Returns length of this type.static RedisMessageTypeDetermineRedisMessageTypebased on the type prefixbyteread from given the buffer.static RedisMessageTypeReturns 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.voidWrite the message type's prefix to the given buffer.
-
Enum Constant Details
-
INLINE_COMMAND
-
SIMPLE_STRING
-
ERROR
-
INTEGER
-
BULK_STRING
-
ARRAY_HEADER
-
-
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()Returnstrueif this type is inline type, or returnsfalse. If this istrue, this type doesn't have length field. -
readFrom
DetermineRedisMessageTypebased on the type prefixbyteread from given the buffer. -
writeTo
Write the message type's prefix to the given buffer.
-