Serialize the raw underlying `Append' into the given buffer.
(final ChannelBuffer buf)
| 607 | |
| 608 | /** Serialize the raw underlying `Append' into the given buffer. */ |
| 609 | void serializeInto(final ChannelBuffer buf) { |
| 610 | buf.writeByte(CODE); // Code for a `Append' parameter. |
| 611 | buf.writeByte(CODE); // Code again (see HBASE-2877). |
| 612 | buf.writeByte(1); // Append#APPENDT_VERSION. Stick to v1 here for now. |
| 613 | writeByteArray(buf, key); // The row key. |
| 614 | |
| 615 | buf.writeLong(timestamp); // Timestamp. |
| 616 | |
| 617 | buf.writeLong(lockid); // Lock ID. |
| 618 | buf.writeByte(durable ? 0x01 : 0x00); // Whether or not to use the WAL. |
| 619 | |
| 620 | buf.writeInt(1); // Number of families that follow. |
| 621 | writeByteArray(buf, family); // The column family. |
| 622 | |
| 623 | buf.writeInt(qualifiers.length); // Number of "KeyValues" that follow. |
| 624 | buf.writeInt(payloadSize()); // Size of the KV that follows. |
| 625 | serializePayload(buf); |
| 626 | buf.writeInt(1); // Set one attribute |
| 627 | buf.writeInt(4); // Set attribute name length |
| 628 | buf.writeBytes(RETURN_RESULTS); |
| 629 | buf.writeByte(1); |
| 630 | buf.writeByte(this.return_result ? 1:0); |
| 631 | } |
| 632 | |
| 633 | @Override |
| 634 | Object deserialize(ChannelBuffer buf, int cell_size) { |
no test coverage detected