public final class RPCBlockReadResponse extends RPCResponse
RPCBlockReadRequest.RPCResponse.StatusRPCMessage.Type| Constructor and Description |
|---|
RPCBlockReadResponse(long blockId,
long offset,
long length,
DataBuffer data,
RPCResponse.Status status) |
| Modifier and Type | Method and Description |
|---|---|
static RPCBlockReadResponse |
createErrorResponse(RPCBlockReadRequest request,
RPCResponse.Status status)
Creates a
RPCBlockReadResponse object that indicates an error for the given
RPCBlockReadRequest. |
static RPCBlockReadResponse |
decode(io.netty.buffer.ByteBuf in)
Decodes the input
ByteBuf into a RPCBlockReadResponse object and returns it. |
void |
encode(io.netty.buffer.ByteBuf out)
Encodes the message to the output
ByteBuf. |
long |
getBlockId() |
int |
getEncodedLength()
Returns the number bytes for the message when it is encoded.
|
long |
getLength() |
long |
getOffset() |
DataBuffer |
getPayloadDataBuffer()
Returns the data buffer of the payload.
|
RPCResponse.Status |
getStatus() |
RPCMessage.Type |
getType()
Returns the type of the message.
|
String |
toString() |
createFrameDecoder, decodeMessage, hasPayload, validatepublic RPCBlockReadResponse(long blockId,
long offset,
long length,
DataBuffer data,
RPCResponse.Status status)
public RPCMessage.Type getType()
RPCMessagegetType in class RPCMessagepublic static RPCBlockReadResponse createErrorResponse(RPCBlockReadRequest request, RPCResponse.Status status)
RPCBlockReadResponse object that indicates an error for the given
RPCBlockReadRequest.request - The RPCBlockReadRequest to generated
the RPCBlockReadResponse for.status - The RPCResponse.Status for the response.RPCBlockReadResponse objectpublic static RPCBlockReadResponse decode(io.netty.buffer.ByteBuf in)
ByteBuf into a RPCBlockReadResponse object and returns it.in - the input ByteBufpublic int getEncodedLength()
EncodedMessagepublic void encode(io.netty.buffer.ByteBuf out)
EncodedMessageByteBuf.out - the output ByteBuf where the message should be encoded.public DataBuffer getPayloadDataBuffer()
RPCMessagegetPayloadDataBuffer in class RPCMessagepublic long getBlockId()
public long getLength()
public long getOffset()
public RPCResponse.Status getStatus()
Copyright © 2015. All Rights Reserved.