com.taobao.metamorphosis.network
类 DataCommand
java.lang.Object
com.taobao.metamorphosis.network.AbstractResponseCommand
com.taobao.metamorphosis.network.DataCommand
- 所有已实现的接口:
- com.taobao.gecko.core.command.Command, com.taobao.gecko.core.command.CommandHeader, com.taobao.gecko.core.command.ResponseCommand, MetaEncodeCommand
public class DataCommand
- extends AbstractResponseCommand
应答命令,协议格式如下: value total-length opaque\r\n data,其中data的结构如下:
- 4个字节的消息数据长度(可能包括属性)
- 4个字节的check sum
- 8个字节的消息id
- 4个字节的flag
- 消息数据,如果有属性,则为:
- 4个字节的属性长度+ 消息属性 + payload
否则为:
- payload
- 作者:
- boyan
从接口 com.taobao.metamorphosis.network.MetaEncodeCommand 继承的字段 |
CRLF, GET_CMD, OFFSET_CMD, PUT_CMD, QUIT_CMD, RESULT_CMD, SPACE, STATS_CMD, SYNC_CMD, TRANS_CMD, VALUE_CMD, VERSION_CMD |
DataCommand
public DataCommand(byte[] data,
Integer opaque)
DataCommand
public DataCommand(byte[] data,
Integer opaque,
boolean encodeHeader)
hashCode
public int hashCode()
- 覆盖:
- 类
AbstractResponseCommand
中的 hashCode
equals
public boolean equals(Object obj)
- 覆盖:
- 类
AbstractResponseCommand
中的 equals
getData
public byte[] getData()
isBoolean
public boolean isBoolean()
encode
public final com.taobao.gecko.core.buffer.IoBuffer encode()
- 从接口
MetaEncodeCommand
复制的描述
- 编码协议
- 返回:
- 编码后的buffer
Copyright © 2010–2013. All rights reserved.