@UnstableApi public enum RedisMessageType extends Enum<RedisMessageType>
Enum Constant and Description |
---|
ARRAY_HEADER |
BULK_STRING |
ERROR |
INLINE_COMMAND |
INTEGER |
SIMPLE_STRING |
Modifier and Type | Method and Description |
---|---|
boolean |
isInline()
Returns
true if this type is inline type, or returns false . |
int |
length()
Returns length of this type.
|
static RedisMessageType |
readFrom(ByteBuf in,
boolean decodeInlineCommands)
Determine
RedisMessageType based on the type prefix byte read from given the buffer. |
static RedisMessageType |
valueOf(String name)
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 |
writeTo(ByteBuf out)
Write the message type's prefix to the given buffer.
|
public static final RedisMessageType INLINE_COMMAND
public static final RedisMessageType SIMPLE_STRING
public static final RedisMessageType ERROR
public static final RedisMessageType INTEGER
public static final RedisMessageType BULK_STRING
public static final RedisMessageType ARRAY_HEADER
public static RedisMessageType[] values()
for (RedisMessageType c : RedisMessageType.values()) System.out.println(c);
public static RedisMessageType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int length()
public boolean isInline()
true
if this type is inline type, or returns false
. If this is true
,
this type doesn't have length field.public static RedisMessageType readFrom(ByteBuf in, boolean decodeInlineCommands)
RedisMessageType
based on the type prefix byte
read from given the buffer.public void writeTo(ByteBuf out)
Copyright © 2008–2024 The Netty Project. All rights reserved.