Java Code Examples for org.apache.thrift.protocol.TTupleProtocol#writeByte()

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#writeByte() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TMessagePack.java    From luxun with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMessagePack struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.messageList);
  BitSet optionals = new BitSet();
  if (struct.isSetMagic()) {
    optionals.set(0);
  }
  if (struct.isSetAttribute()) {
    optionals.set(1);
  }
  if (struct.isSetCrc32()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetMagic()) {
    oprot.writeByte(struct.magic);
  }
  if (struct.isSetAttribute()) {
    oprot.writeByte(struct.attribute);
  }
  if (struct.isSetCrc32()) {
    oprot.writeI32(struct.crc32);
  }
}
 
Example 2
Source File: TMessageSet.java    From suro with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMessageSet struct) throws TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetApp()) {
    optionals.set(0);
  }
  if (struct.isSetNumMessages()) {
    optionals.set(1);
  }
  if (struct.isSetCompression()) {
    optionals.set(2);
  }
  if (struct.isSetCrc()) {
    optionals.set(3);
  }
  if (struct.isSetMessages()) {
    optionals.set(4);
  }
  oprot.writeBitSet(optionals, 5);
  if (struct.isSetApp()) {
    oprot.writeString(struct.app);
  }
  if (struct.isSetNumMessages()) {
    oprot.writeI32(struct.numMessages);
  }
  if (struct.isSetCompression()) {
    oprot.writeByte(struct.compression);
  }
  if (struct.isSetCrc()) {
    oprot.writeI64(struct.crc);
  }
  if (struct.isSetMessages()) {
    oprot.writeBinary(struct.messages);
  }
}
 
Example 3
Source File: RequestInfo.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RequestInfo struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeString(struct.serviceName);
  oprot.writeI64(struct.sequenceId);
  oprot.writeByte(struct.callType);
  oprot.writeI32(struct.timeout);
}
 
Example 4
Source File: ResponseInfo.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ResponseInfo struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI64(struct.sequenceId);
  oprot.writeByte(struct.status);
  BitSet optionals = new BitSet();
  if (struct.isSetMessage()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetMessage()) {
    oprot.writeString(struct.message);
  }
}
 
Example 5
Source File: TPathEntry.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPathEntry struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeByte(struct.type);
  oprot.writeString(struct.pathElement);
  {
    oprot.writeI32(struct.children.size());
    for (int _iter40 : struct.children)
    {
      oprot.writeI32(_iter40);
    }
  }
  BitSet optionals = new BitSet();
  if (struct.isSetAuthzObjs()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetAuthzObjs()) {
    {
      oprot.writeI32(struct.authzObjs.size());
      for (String _iter41 : struct.authzObjs)
      {
        oprot.writeString(_iter41);
      }
    }
  }
}
 
Example 6
Source File: EntityId.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, EntityId struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.id);
  oprot.writeByte(struct.type);
  oprot.writeI32(struct.connId);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
}
 
Example 7
Source File: Decimal.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeByte(struct.signum);
  oprot.writeI32(struct.scale);
  oprot.writeBinary(struct.magnitude);
}
 
Example 8
Source File: Decimal.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeByte(struct.signum);
  oprot.writeI32(struct.scale);
  oprot.writeBinary(struct.magnitude);
}
 
Example 9
Source File: EntityId.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, EntityId struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.id);
  oprot.writeByte(struct.type);
  oprot.writeI32(struct.connId);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
}
 
Example 10
Source File: RowSet.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RowSet struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  {
    oprot.writeI32(struct.rows.size());
    for (Row _iter304 : struct.rows)
    {
      _iter304.write(oprot);
    }
  }
  oprot.writeByte(struct.flags);
  oprot.writeI32(struct.cursorId);
  oprot.writeI32(struct.statementId);
  oprot.writeI32(struct.connId);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  if (struct.isSetSource()) {
    optionals.set(1);
  }
  if (struct.isSetOffset()) {
    optionals.set(2);
  }
  if (struct.isSetMetadata()) {
    optionals.set(3);
  }
  if (struct.isSetCursorName()) {
    optionals.set(4);
  }
  if (struct.isSetWarnings()) {
    optionals.set(5);
  }
  if (struct.isSetRowIdsForUpdateOrDelete()) {
    optionals.set(6);
  }
  oprot.writeBitSet(optionals, 7);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
  if (struct.isSetSource()) {
    struct.source.write(oprot);
  }
  if (struct.isSetOffset()) {
    oprot.writeI32(struct.offset);
  }
  if (struct.isSetMetadata()) {
    {
      oprot.writeI32(struct.metadata.size());
      for (ColumnDescriptor _iter305 : struct.metadata)
      {
        _iter305.write(oprot);
      }
    }
  }
  if (struct.isSetCursorName()) {
    oprot.writeString(struct.cursorName);
  }
  if (struct.isSetWarnings()) {
    struct.warnings.write(oprot);
  }
  if (struct.isSetRowIdsForUpdateOrDelete()) {
    {
      oprot.writeI32(struct.rowIdsForUpdateOrDelete.size());
      for (long _iter306 : struct.rowIdsForUpdateOrDelete)
      {
        oprot.writeI64(_iter306);
      }
    }
  }
}
 
Example 11
Source File: RowSet.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RowSet struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  {
    oprot.writeI32(struct.rows.size());
    for (Row _iter304 : struct.rows)
    {
      _iter304.write(oprot);
    }
  }
  oprot.writeByte(struct.flags);
  oprot.writeI32(struct.cursorId);
  oprot.writeI32(struct.statementId);
  oprot.writeI32(struct.connId);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  if (struct.isSetSource()) {
    optionals.set(1);
  }
  if (struct.isSetOffset()) {
    optionals.set(2);
  }
  if (struct.isSetMetadata()) {
    optionals.set(3);
  }
  if (struct.isSetCursorName()) {
    optionals.set(4);
  }
  if (struct.isSetWarnings()) {
    optionals.set(5);
  }
  if (struct.isSetRowIdsForUpdateOrDelete()) {
    optionals.set(6);
  }
  oprot.writeBitSet(optionals, 7);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
  if (struct.isSetSource()) {
    struct.source.write(oprot);
  }
  if (struct.isSetOffset()) {
    oprot.writeI32(struct.offset);
  }
  if (struct.isSetMetadata()) {
    {
      oprot.writeI32(struct.metadata.size());
      for (ColumnDescriptor _iter305 : struct.metadata)
      {
        _iter305.write(oprot);
      }
    }
  }
  if (struct.isSetCursorName()) {
    oprot.writeString(struct.cursorName);
  }
  if (struct.isSetWarnings()) {
    struct.warnings.write(oprot);
  }
  if (struct.isSetRowIdsForUpdateOrDelete()) {
    {
      oprot.writeI32(struct.rowIdsForUpdateOrDelete.size());
      for (long _iter306 : struct.rowIdsForUpdateOrDelete)
      {
        oprot.writeI64(_iter306);
      }
    }
  }
}
 
Example 12
Source File: ServiceMetaDataArgs.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ServiceMetaDataArgs struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.connId);
  oprot.writeByte(struct.driverType);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  if (struct.isSetSchema()) {
    optionals.set(1);
  }
  if (struct.isSetTable()) {
    optionals.set(2);
  }
  if (struct.isSetTableTypes()) {
    optionals.set(3);
  }
  if (struct.isSetColumnName()) {
    optionals.set(4);
  }
  if (struct.isSetForeignSchema()) {
    optionals.set(5);
  }
  if (struct.isSetForeignTable()) {
    optionals.set(6);
  }
  if (struct.isSetProcedureName()) {
    optionals.set(7);
  }
  if (struct.isSetFunctionName()) {
    optionals.set(8);
  }
  if (struct.isSetAttributeName()) {
    optionals.set(9);
  }
  if (struct.isSetTypeName()) {
    optionals.set(10);
  }
  if (struct.isSetTypeId()) {
    optionals.set(11);
  }
  oprot.writeBitSet(optionals, 12);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
  if (struct.isSetSchema()) {
    oprot.writeString(struct.schema);
  }
  if (struct.isSetTable()) {
    oprot.writeString(struct.table);
  }
  if (struct.isSetTableTypes()) {
    {
      oprot.writeI32(struct.tableTypes.size());
      for (String _iter236 : struct.tableTypes)
      {
        oprot.writeString(_iter236);
      }
    }
  }
  if (struct.isSetColumnName()) {
    oprot.writeString(struct.columnName);
  }
  if (struct.isSetForeignSchema()) {
    oprot.writeString(struct.foreignSchema);
  }
  if (struct.isSetForeignTable()) {
    oprot.writeString(struct.foreignTable);
  }
  if (struct.isSetProcedureName()) {
    oprot.writeString(struct.procedureName);
  }
  if (struct.isSetFunctionName()) {
    oprot.writeString(struct.functionName);
  }
  if (struct.isSetAttributeName()) {
    oprot.writeString(struct.attributeName);
  }
  if (struct.isSetTypeName()) {
    oprot.writeString(struct.typeName);
  }
  if (struct.isSetTypeId()) {
    oprot.writeI32(struct.typeId.getValue());
  }
}
 
Example 13
Source File: RestMessage.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetType()) {
    optionals.set(0);
  }
  if (struct.isSetMode()) {
    optionals.set(1);
  }
  if (struct.isSetUrl()) {
    optionals.set(2);
  }
  if (struct.isSetParams()) {
    optionals.set(3);
  }
  if (struct.isSetHeaders()) {
    optionals.set(4);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(5);
  }
  if (struct.isSetExpire()) {
    optionals.set(6);
  }
  if (struct.isSetTimeout()) {
    optionals.set(7);
  }
  if (struct.isSetRetryCnt()) {
    optionals.set(8);
  }
  oprot.writeBitSet(optionals, 9);
  if (struct.isSetType()) {
    oprot.writeByte(struct.type);
  }
  if (struct.isSetMode()) {
    oprot.writeByte(struct.mode);
  }
  if (struct.isSetUrl()) {
    oprot.writeString(struct.url);
  }
  if (struct.isSetParams()) {
    {
      oprot.writeI32(struct.params.size());
      for (Map.Entry<String, String> _iter10 : struct.params.entrySet())
      {
        oprot.writeString(_iter10.getKey());
        oprot.writeString(_iter10.getValue());
      }
    }
  }
  if (struct.isSetHeaders()) {
    {
      oprot.writeI32(struct.headers.size());
      for (Map.Entry<String, String> _iter11 : struct.headers.entrySet())
      {
        oprot.writeString(_iter11.getKey());
        oprot.writeString(_iter11.getValue());
      }
    }
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetExpire()) {
    oprot.writeI64(struct.expire);
  }
  if (struct.isSetTimeout()) {
    oprot.writeI64(struct.timeout);
  }
  if (struct.isSetRetryCnt()) {
    oprot.writeI32(struct.retryCnt);
  }
}
 
Example 14
Source File: ServiceMetaDataArgs.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ServiceMetaDataArgs struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.connId);
  oprot.writeByte(struct.driverType);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  if (struct.isSetSchema()) {
    optionals.set(1);
  }
  if (struct.isSetTable()) {
    optionals.set(2);
  }
  if (struct.isSetTableTypes()) {
    optionals.set(3);
  }
  if (struct.isSetColumnName()) {
    optionals.set(4);
  }
  if (struct.isSetForeignSchema()) {
    optionals.set(5);
  }
  if (struct.isSetForeignTable()) {
    optionals.set(6);
  }
  if (struct.isSetProcedureName()) {
    optionals.set(7);
  }
  if (struct.isSetFunctionName()) {
    optionals.set(8);
  }
  if (struct.isSetAttributeName()) {
    optionals.set(9);
  }
  if (struct.isSetTypeName()) {
    optionals.set(10);
  }
  if (struct.isSetTypeId()) {
    optionals.set(11);
  }
  oprot.writeBitSet(optionals, 12);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
  if (struct.isSetSchema()) {
    oprot.writeString(struct.schema);
  }
  if (struct.isSetTable()) {
    oprot.writeString(struct.table);
  }
  if (struct.isSetTableTypes()) {
    {
      oprot.writeI32(struct.tableTypes.size());
      for (String _iter236 : struct.tableTypes)
      {
        oprot.writeString(_iter236);
      }
    }
  }
  if (struct.isSetColumnName()) {
    oprot.writeString(struct.columnName);
  }
  if (struct.isSetForeignSchema()) {
    oprot.writeString(struct.foreignSchema);
  }
  if (struct.isSetForeignTable()) {
    oprot.writeString(struct.foreignTable);
  }
  if (struct.isSetProcedureName()) {
    oprot.writeString(struct.procedureName);
  }
  if (struct.isSetFunctionName()) {
    oprot.writeString(struct.functionName);
  }
  if (struct.isSetAttributeName()) {
    oprot.writeString(struct.attributeName);
  }
  if (struct.isSetTypeName()) {
    oprot.writeString(struct.typeName);
  }
  if (struct.isSetTypeId()) {
    oprot.writeI32(struct.typeId.getValue());
  }
}
 
Example 15
Source File: RestMessage.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetType()) {
    optionals.set(0);
  }
  if (struct.isSetMode()) {
    optionals.set(1);
  }
  if (struct.isSetUrl()) {
    optionals.set(2);
  }
  if (struct.isSetParams()) {
    optionals.set(3);
  }
  if (struct.isSetHeaders()) {
    optionals.set(4);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(5);
  }
  if (struct.isSetExpire()) {
    optionals.set(6);
  }
  if (struct.isSetTimeout()) {
    optionals.set(7);
  }
  if (struct.isSetRetryCnt()) {
    optionals.set(8);
  }
  oprot.writeBitSet(optionals, 9);
  if (struct.isSetType()) {
    oprot.writeByte(struct.type);
  }
  if (struct.isSetMode()) {
    oprot.writeByte(struct.mode);
  }
  if (struct.isSetUrl()) {
    oprot.writeString(struct.url);
  }
  if (struct.isSetParams()) {
    {
      oprot.writeI32(struct.params.size());
      for (Map.Entry<String, String> _iter10 : struct.params.entrySet())
      {
        oprot.writeString(_iter10.getKey());
        oprot.writeString(_iter10.getValue());
      }
    }
  }
  if (struct.isSetHeaders()) {
    {
      oprot.writeI32(struct.headers.size());
      for (Map.Entry<String, String> _iter11 : struct.headers.entrySet())
      {
        oprot.writeString(_iter11.getKey());
        oprot.writeString(_iter11.getValue());
      }
    }
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetExpire()) {
    oprot.writeI64(struct.expire);
  }
  if (struct.isSetTimeout()) {
    oprot.writeI64(struct.timeout);
  }
  if (struct.isSetRetryCnt()) {
    oprot.writeI32(struct.retryCnt);
  }
}
 
Example 16
Source File: RestMessage.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetType()) {
    optionals.set(0);
  }
  if (struct.isSetMode()) {
    optionals.set(1);
  }
  if (struct.isSetUrl()) {
    optionals.set(2);
  }
  if (struct.isSetParams()) {
    optionals.set(3);
  }
  if (struct.isSetHeaders()) {
    optionals.set(4);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(5);
  }
  if (struct.isSetExpire()) {
    optionals.set(6);
  }
  if (struct.isSetTimeout()) {
    optionals.set(7);
  }
  if (struct.isSetRetryCnt()) {
    optionals.set(8);
  }
  oprot.writeBitSet(optionals, 9);
  if (struct.isSetType()) {
    oprot.writeByte(struct.type);
  }
  if (struct.isSetMode()) {
    oprot.writeByte(struct.mode);
  }
  if (struct.isSetUrl()) {
    oprot.writeString(struct.url);
  }
  if (struct.isSetParams()) {
    {
      oprot.writeI32(struct.params.size());
      for (Map.Entry<String, String> _iter10 : struct.params.entrySet())
      {
        oprot.writeString(_iter10.getKey());
        oprot.writeString(_iter10.getValue());
      }
    }
  }
  if (struct.isSetHeaders()) {
    {
      oprot.writeI32(struct.headers.size());
      for (Map.Entry<String, String> _iter11 : struct.headers.entrySet())
      {
        oprot.writeString(_iter11.getKey());
        oprot.writeString(_iter11.getValue());
      }
    }
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetExpire()) {
    oprot.writeI64(struct.expire);
  }
  if (struct.isSetTimeout()) {
    oprot.writeI64(struct.timeout);
  }
  if (struct.isSetRetryCnt()) {
    oprot.writeI32(struct.retryCnt);
  }
}
 
Example 17
Source File: Header.java    From octo-rpc with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Header struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetMessageType()) {
    optionals.set(0);
  }
  if (struct.isSetRequestInfo()) {
    optionals.set(1);
  }
  if (struct.isSetResponseInfo()) {
    optionals.set(2);
  }
  if (struct.isSetTraceInfo()) {
    optionals.set(3);
  }
  if (struct.isSetGlobalContext()) {
    optionals.set(4);
  }
  if (struct.isSetLocalContext()) {
    optionals.set(5);
  }
  if (struct.isSetHeartbeatInfo()) {
    optionals.set(6);
  }
  oprot.writeBitSet(optionals, 7);
  if (struct.isSetMessageType()) {
    oprot.writeByte(struct.messageType);
  }
  if (struct.isSetRequestInfo()) {
    struct.requestInfo.write(oprot);
  }
  if (struct.isSetResponseInfo()) {
    struct.responseInfo.write(oprot);
  }
  if (struct.isSetTraceInfo()) {
    struct.traceInfo.write(oprot);
  }
  if (struct.isSetGlobalContext()) {
    {
      oprot.writeI32(struct.globalContext.size());
      for (Map.Entry<String, String> _iter20 : struct.globalContext.entrySet())
      {
        oprot.writeString(_iter20.getKey());
        oprot.writeString(_iter20.getValue());
      }
    }
  }
  if (struct.isSetLocalContext()) {
    {
      oprot.writeI32(struct.localContext.size());
      for (Map.Entry<String, String> _iter21 : struct.localContext.entrySet())
      {
        oprot.writeString(_iter21.getKey());
        oprot.writeString(_iter21.getValue());
      }
    }
  }
  if (struct.isSetHeartbeatInfo()) {
    struct.heartbeatInfo.write(oprot);
  }
}
 
Example 18
Source File: RestMessage.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetType()) {
    optionals.set(0);
  }
  if (struct.isSetMode()) {
    optionals.set(1);
  }
  if (struct.isSetUrl()) {
    optionals.set(2);
  }
  if (struct.isSetParams()) {
    optionals.set(3);
  }
  if (struct.isSetHeaders()) {
    optionals.set(4);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(5);
  }
  if (struct.isSetExpire()) {
    optionals.set(6);
  }
  if (struct.isSetTimeout()) {
    optionals.set(7);
  }
  if (struct.isSetRetryCnt()) {
    optionals.set(8);
  }
  oprot.writeBitSet(optionals, 9);
  if (struct.isSetType()) {
    oprot.writeByte(struct.type);
  }
  if (struct.isSetMode()) {
    oprot.writeByte(struct.mode);
  }
  if (struct.isSetUrl()) {
    oprot.writeString(struct.url);
  }
  if (struct.isSetParams()) {
    {
      oprot.writeI32(struct.params.size());
      for (Map.Entry<String, String> _iter10 : struct.params.entrySet())
      {
        oprot.writeString(_iter10.getKey());
        oprot.writeString(_iter10.getValue());
      }
    }
  }
  if (struct.isSetHeaders()) {
    {
      oprot.writeI32(struct.headers.size());
      for (Map.Entry<String, String> _iter11 : struct.headers.entrySet())
      {
        oprot.writeString(_iter11.getKey());
        oprot.writeString(_iter11.getValue());
      }
    }
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetExpire()) {
    oprot.writeI64(struct.expire);
  }
  if (struct.isSetTimeout()) {
    oprot.writeI64(struct.timeout);
  }
  if (struct.isSetRetryCnt()) {
    oprot.writeI32(struct.retryCnt);
  }
}