public static enum RPCMessage.Type extends Enum<RPCMessage.Type> implements EncodedMessage
Modifier and Type | Method and Description |
---|---|
static RPCMessage.Type |
decode(io.netty.buffer.ByteBuf in)
Returns the type represented by the id from the input ByteBuf.
|
void |
encode(io.netty.buffer.ByteBuf out)
Encodes the message to the output
ByteBuf . |
int |
getEncodedLength()
Returns the number bytes for the message when it is encoded.
|
int |
getId()
Returns the int identifier of the type.
|
static RPCMessage.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RPCMessage.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RPCMessage.Type RPC_READ_REQUEST
public static final RPCMessage.Type RPC_WRITE_REQUEST
public static final RPCMessage.Type RPC_RESPONSE
public static final RPCMessage.Type RPC_HEARTBEAT
public static final RPCMessage.Type RPC_LOCAL_BLOCK_OPEN_REQUEST
public static final RPCMessage.Type RPC_LOCAL_BLOCK_OPEN_RESPONSE
public static final RPCMessage.Type RPC_LOCAL_BLOCK_CLOSE_REQUEST
public static final RPCMessage.Type RPC_LOCAL_BLOCK_CREATE_REQUEST
public static final RPCMessage.Type RPC_LOCAL_BLOCK_CREATE_RESPONSE
public static final RPCMessage.Type RPC_LOCAL_BLOCK_COMPLETE_REQUEST
public static final RPCMessage.Type RPC_READ_RESPONSE
public static final RPCMessage.Type RPC_ASYNC_CACHE_REQUEST
public static final RPCMessage.Type RPC_UNKNOWN
public static RPCMessage.Type[] values()
for (RPCMessage.Type c : RPCMessage.Type.values()) System.out.println(c);
public static RPCMessage.Type 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 getEncodedLength()
EncodedMessage
getEncodedLength
in interface EncodedMessage
public void encode(io.netty.buffer.ByteBuf out)
EncodedMessage
ByteBuf
.encode
in interface EncodedMessage
out
- the output ByteBuf where the message should be encodedpublic int getId()
alluxio.worker.DataServerMessage
, since that class needs to manually encode all
messages. alluxio.worker.DataServerMessage
and this method should no longer be needed
when the client is converted to use Netty.public static RPCMessage.Type decode(io.netty.buffer.ByteBuf in)
in
- The input ByteBuf
to decode into a typeCopyright © 2023. All Rights Reserved.