public void add(RecordKey key, RecordUpdate data) { byte[] keybytes = key.encode(); byte[] databytes = data.encode(); RecordInfo ri; ri.record_start_pos = _curPos(); ri.key_len = keybytes.Length; ri.data_len = databytes.Length; output.Write(keybytes, 0, keybytes.Length); output.Write(databytes, 0, databytes.Length); record_offsets.Add(ri); }
public void setValue(RecordKey key, RecordUpdate update) { if (this.is_frozen) { throw new Exception("snapshot not writable! " + this.frozen_at_snapshotnumber); } // add our snapshot_number to the end of the keyspace key.appendKeyPart(new RecordKeyType_AttributeTimestamp(this.current_snapshot)); // wrap the update into a sub-update, mostly because tombstones need to be "real" records // to us var sub_update = RecordUpdate.WithPayload(update.encode()); next_stage.setValue(key, sub_update); }
public void add(RecordKey key, RecordUpdate data) { byte[] keybytes = key.encode(); byte[] databytes = data.encode(); writeEncoded(output,keybytes); output.WriteByte(KEY_VAL_SEP); writeEncoded(output,databytes); output.WriteByte(END_OF_LINE); }