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

Method serializeInto

src/PutRequest.java:591–608  ·  view source on GitHub ↗

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

(final ChannelBuffer buf)

Source from the content-addressed store, hash-verified

589
590 /** Serialize the raw underlying `Put' into the given buffer. */
591 void serializeInto(final ChannelBuffer buf) {
592 buf.writeByte(CODE); // Code for a `Put' parameter.
593 buf.writeByte(CODE); // Code again (see HBASE-2877).
594 buf.writeByte(1); // Put#PUT_VERSION. Stick to v1 here for now.
595 writeByteArray(buf, key); // The row key.
596
597 buf.writeLong(timestamp); // Timestamp.
598
599 buf.writeLong(lockid); // Lock ID.
600 buf.writeByte(durable ? 0x01 : 0x00); // Whether or not to use the WAL.
601
602 buf.writeInt(1); // Number of families that follow.
603 writeByteArray(buf, family); // The column family.
604
605 buf.writeInt(qualifiers.length); // Number of "KeyValues" that follow.
606 buf.writeInt(payloadSize()); // Size of the KV that follows.
607 serializePayload(buf);
608 }
609
610}

Callers 2

serializeOldMethod · 0.95
serializeOldMethod · 0.45

Calls 3

payloadSizeMethod · 0.95
serializePayloadMethod · 0.95
writeByteArrayMethod · 0.80

Tested by

no test coverage detected