MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / serializeInto

Method serializeInto

src/AppendRequest.java:609–631  ·  view source on GitHub ↗

Serialize the raw underlying `Append' into the given buffer.

(final ChannelBuffer buf)

Source from the content-addressed store, hash-verified

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) {

Callers 1

serializeOldMethod · 0.95

Calls 3

payloadSizeMethod · 0.95
serializePayloadMethod · 0.95
writeByteArrayMethod · 0.80

Tested by

no test coverage detected