public void write()

in stream/distributedlog/core/src/main/java/org/apache/distributedlog/thrift/BKDLConfigFormat.java [1129:1197]


    public void write(org.apache.thrift.protocol.TProtocol oprot, BKDLConfigFormat struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.bkZkServers != null) {
        if (struct.isSetBkZkServers()) {
          oprot.writeFieldBegin(BK_ZK_SERVERS_FIELD_DESC);
          oprot.writeString(struct.bkZkServers);
          oprot.writeFieldEnd();
        }
      }
      if (struct.bkLedgersPath != null) {
        if (struct.isSetBkLedgersPath()) {
          oprot.writeFieldBegin(BK_LEDGERS_PATH_FIELD_DESC);
          oprot.writeString(struct.bkLedgersPath);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetSanityCheckTxnID()) {
        oprot.writeFieldBegin(SANITY_CHECK_TXN_ID_FIELD_DESC);
        oprot.writeBool(struct.sanityCheckTxnID);
        oprot.writeFieldEnd();
      }
      if (struct.isSetEncodeRegionID()) {
        oprot.writeFieldBegin(ENCODE_REGION_ID_FIELD_DESC);
        oprot.writeBool(struct.encodeRegionID);
        oprot.writeFieldEnd();
      }
      if (struct.bkZkServersForReader != null) {
        if (struct.isSetBkZkServersForReader()) {
          oprot.writeFieldBegin(BK_ZK_SERVERS_FOR_READER_FIELD_DESC);
          oprot.writeString(struct.bkZkServersForReader);
          oprot.writeFieldEnd();
        }
      }
      if (struct.dlZkServersForWriter != null) {
        if (struct.isSetDlZkServersForWriter()) {
          oprot.writeFieldBegin(DL_ZK_SERVERS_FOR_WRITER_FIELD_DESC);
          oprot.writeString(struct.dlZkServersForWriter);
          oprot.writeFieldEnd();
        }
      }
      if (struct.dlZkServersForReader != null) {
        if (struct.isSetDlZkServersForReader()) {
          oprot.writeFieldBegin(DL_ZK_SERVERS_FOR_READER_FIELD_DESC);
          oprot.writeString(struct.dlZkServersForReader);
          oprot.writeFieldEnd();
        }
      }
      if (struct.aclRootPath != null) {
        if (struct.isSetAclRootPath()) {
          oprot.writeFieldBegin(ACL_ROOT_PATH_FIELD_DESC);
          oprot.writeString(struct.aclRootPath);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetFirstLogSegmentSeqNo()) {
        oprot.writeFieldBegin(FIRST_LOG_SEGMENT_SEQ_NO_FIELD_DESC);
        oprot.writeI64(struct.firstLogSegmentSeqNo);
        oprot.writeFieldEnd();
      }
      if (struct.isSetFederatedNamespace()) {
        oprot.writeFieldBegin(FEDERATED_NAMESPACE_FIELD_DESC);
        oprot.writeBool(struct.federatedNamespace);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }