in finagle-thrift/src/main/java/com/twitter/finagle/thrift/thrift/RequestHeader.java [1250:1326]
public void write(org.apache.thrift.protocol.TProtocol prot, RequestHeader struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTrace_id()) {
optionals.set(0);
}
if (struct.isSetSpan_id()) {
optionals.set(1);
}
if (struct.isSetParent_span_id()) {
optionals.set(2);
}
if (struct.isSetSampled()) {
optionals.set(3);
}
if (struct.isSetClient_id()) {
optionals.set(4);
}
if (struct.isSetFlags()) {
optionals.set(5);
}
if (struct.isSetContexts()) {
optionals.set(6);
}
if (struct.isSetDest()) {
optionals.set(7);
}
if (struct.isSetDelegations()) {
optionals.set(8);
}
if (struct.isSetTrace_id_high()) {
optionals.set(9);
}
oprot.writeBitSet(optionals, 10);
if (struct.isSetTrace_id()) {
oprot.writeI64(struct.trace_id);
}
if (struct.isSetSpan_id()) {
oprot.writeI64(struct.span_id);
}
if (struct.isSetParent_span_id()) {
oprot.writeI64(struct.parent_span_id);
}
if (struct.isSetSampled()) {
oprot.writeBool(struct.sampled);
}
if (struct.isSetClient_id()) {
struct.client_id.write(oprot);
}
if (struct.isSetFlags()) {
oprot.writeI64(struct.flags);
}
if (struct.isSetContexts()) {
{
oprot.writeI32(struct.contexts.size());
for (RequestContext _iter24 : struct.contexts)
{
_iter24.write(oprot);
}
}
}
if (struct.isSetDest()) {
oprot.writeString(struct.dest);
}
if (struct.isSetDelegations()) {
{
oprot.writeI32(struct.delegations.size());
for (Delegation _iter25 : struct.delegations)
{
_iter25.write(oprot);
}
}
}
if (struct.isSetTrace_id_high()) {
oprot.writeI64(struct.trace_id_high);
}
}