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

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#readI16() . 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: Endpoint.java    From incubator-retired-htrace with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.ipv4 = iprot.readI32();
    struct.setIpv4IsSet(true);
  }
  if (incoming.get(1)) {
    struct.port = iprot.readI16();
    struct.setPortIsSet(true);
  }
  if (incoming.get(2)) {
    struct.service_name = iprot.readString();
    struct.setService_nameIsSet(true);
  }
}
 
Example 2
Source File: TestService.java    From Firefly with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getList_args struct) throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TList _list57 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I16, iprot.readI32());
      struct.ids = new ArrayList<Short>(_list57.size);
      short _elem58;
      for (int _i59 = 0; _i59 < _list57.size; ++_i59)
      {
        _elem58 = iprot.readI16();
        struct.ids.add(_elem58);
      }
    }
    struct.setIdsIsSet(true);
  }
}
 
Example 3
Source File: HelloMessage.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HelloMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.header = new AsyncMessageHeader();
  struct.header.read(iprot);
  struct.setHeaderIsSet(true);
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.nodeId = iprot.readI16();
    struct.setNodeIdIsSet(true);
  }
  if (incoming.get(1)) {
    struct.authScheme = AuthScheme.findByValue(iprot.readI32());
    struct.setAuthSchemeIsSet(true);
  }
  if (incoming.get(2)) {
    struct.authChallengeResponse = new AuthChallengeResponse();
    struct.authChallengeResponse.read(iprot);
    struct.setAuthChallengeResponseIsSet(true);
  }
}
 
Example 4
Source File: Node.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Node struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(4);
  if (incoming.get(0)) {
    struct.nodeId = iprot.readI16();
    struct.setNodeIdIsSet(true);
  }
  if (incoming.get(1)) {
    struct.domainId = iprot.readI16();
    struct.setDomainIdIsSet(true);
  }
  if (incoming.get(2)) {
    struct.hostname = iprot.readString();
    struct.setHostnameIsSet(true);
  }
  if (incoming.get(3)) {
    struct.port = iprot.readI32();
    struct.setPortIsSet(true);
  }
}
 
Example 5
Source File: ClusterJoinResponseMessage.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClusterJoinResponseMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.header = new AsyncMessageHeader();
  struct.header.read(iprot);
  struct.setHeaderIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.newNodeId = iprot.readI16();
    struct.setNewNodeIdIsSet(true);
  }
  if (incoming.get(1)) {
    {
      org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.nodeStore = new ArrayList<KeyedValues>(_list69.size);
      for (int _i70 = 0; _i70 < _list69.size; ++_i70)
      {
        KeyedValues _elem71; // required
        _elem71 = new KeyedValues();
        _elem71.read(iprot);
        struct.nodeStore.add(_elem71);
      }
    }
    struct.setNodeStoreIsSet(true);
  }
}
 
Example 6
Source File: ColumnDescriptor.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnDescriptor struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.type = GFXDType.findByValue(iprot.readI32());
  struct.setTypeIsSet(true);
  struct.descFlags = iprot.readI16();
  struct.setDescFlagsIsSet(true);
  struct.precision = iprot.readI16();
  struct.setPrecisionIsSet(true);
  BitSet incoming = iprot.readBitSet(4);
  if (incoming.get(0)) {
    struct.scale = iprot.readI16();
    struct.setScaleIsSet(true);
  }
  if (incoming.get(1)) {
    struct.name = iprot.readString();
    struct.setNameIsSet(true);
  }
  if (incoming.get(2)) {
    struct.fullTableName = iprot.readString();
    struct.setFullTableNameIsSet(true);
  }
  if (incoming.get(3)) {
    struct.udtTypeAndClassName = iprot.readString();
    struct.setUdtTypeAndClassNameIsSet(true);
  }
}
 
Example 7
Source File: ColumnDescriptor.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnDescriptor struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.type = GFXDType.findByValue(iprot.readI32());
  struct.setTypeIsSet(true);
  struct.descFlags = iprot.readI16();
  struct.setDescFlagsIsSet(true);
  struct.precision = iprot.readI16();
  struct.setPrecisionIsSet(true);
  BitSet incoming = iprot.readBitSet(4);
  if (incoming.get(0)) {
    struct.scale = iprot.readI16();
    struct.setScaleIsSet(true);
  }
  if (incoming.get(1)) {
    struct.name = iprot.readString();
    struct.setNameIsSet(true);
  }
  if (incoming.get(2)) {
    struct.fullTableName = iprot.readString();
    struct.setFullTableNameIsSet(true);
  }
  if (incoming.get(3)) {
    struct.udtTypeAndClassName = iprot.readString();
    struct.setUdtTypeAndClassNameIsSet(true);
  }
}
 
Example 8
Source File: ClockEntry.java    From floodlight_with_topoguard with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClockEntry struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.nodeId = iprot.readI16();
  struct.setNodeIdIsSet(true);
  struct.version = iprot.readI64();
  struct.setVersionIsSet(true);
}
 
Example 9
Source File: SwitchPortTuple.java    From floodlight_with_topoguard with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SwitchPortTuple struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.dpid = iprot.readI64();
    struct.setDpidIsSet(true);
  }
  if (incoming.get(1)) {
    struct.port = iprot.readI16();
    struct.setPortIsSet(true);
  }
}
 
Example 10
Source File: ColumnValue.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(19);
  if (incoming.get(0)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.byte_val = iprot.readByte();
    struct.setByte_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i16_val = iprot.readI16();
    struct.setI16_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.float_val = iprot.readI32();
    struct.setFloat_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(7)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(8)) {
    struct.decimal_val = new Decimal();
    struct.decimal_val.read(iprot);
    struct.setDecimal_valIsSet(true);
  }
  if (incoming.get(9)) {
    struct.date_val = new DateTime();
    struct.date_val.read(iprot);
    struct.setDate_valIsSet(true);
  }
  if (incoming.get(10)) {
    struct.time_val = new DateTime();
    struct.time_val.read(iprot);
    struct.setTime_valIsSet(true);
  }
  if (incoming.get(11)) {
    struct.timestamp_val = new Timestamp();
    struct.timestamp_val.read(iprot);
    struct.setTimestamp_valIsSet(true);
  }
  if (incoming.get(12)) {
    struct.binary_val = iprot.readBinary();
    struct.setBinary_valIsSet(true);
  }
  if (incoming.get(13)) {
    struct.blob_val = new BlobChunk();
    struct.blob_val.read(iprot);
    struct.setBlob_valIsSet(true);
  }
  if (incoming.get(14)) {
    struct.clob_val = new ClobChunk();
    struct.clob_val.read(iprot);
    struct.setClob_valIsSet(true);
  }
  if (incoming.get(15)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(16)) {
    struct.pdx_val = new PDXObject();
    struct.pdx_val.read(iprot);
    struct.setPdx_valIsSet(true);
  }
  if (incoming.get(17)) {
    struct.json_val = new JSONObject();
    struct.json_val.read(iprot);
    struct.setJson_valIsSet(true);
  }
  if (incoming.get(18)) {
    struct.java_val = iprot.readBinary();
    struct.setJava_valIsSet(true);
  }
}
 
Example 11
Source File: ColumnValue.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(19);
  if (incoming.get(0)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.byte_val = iprot.readByte();
    struct.setByte_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i16_val = iprot.readI16();
    struct.setI16_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.float_val = iprot.readI32();
    struct.setFloat_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(7)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(8)) {
    struct.decimal_val = new Decimal();
    struct.decimal_val.read(iprot);
    struct.setDecimal_valIsSet(true);
  }
  if (incoming.get(9)) {
    struct.date_val = new DateTime();
    struct.date_val.read(iprot);
    struct.setDate_valIsSet(true);
  }
  if (incoming.get(10)) {
    struct.time_val = new DateTime();
    struct.time_val.read(iprot);
    struct.setTime_valIsSet(true);
  }
  if (incoming.get(11)) {
    struct.timestamp_val = new Timestamp();
    struct.timestamp_val.read(iprot);
    struct.setTimestamp_valIsSet(true);
  }
  if (incoming.get(12)) {
    struct.binary_val = iprot.readBinary();
    struct.setBinary_valIsSet(true);
  }
  if (incoming.get(13)) {
    struct.blob_val = new BlobChunk();
    struct.blob_val.read(iprot);
    struct.setBlob_valIsSet(true);
  }
  if (incoming.get(14)) {
    struct.clob_val = new ClobChunk();
    struct.clob_val.read(iprot);
    struct.setClob_valIsSet(true);
  }
  if (incoming.get(15)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(16)) {
    struct.pdx_val = new PDXObject();
    struct.pdx_val.read(iprot);
    struct.setPdx_valIsSet(true);
  }
  if (incoming.get(17)) {
    struct.json_val = new JSONObject();
    struct.json_val.read(iprot);
    struct.setJson_valIsSet(true);
  }
  if (incoming.get(18)) {
    struct.java_val = iprot.readBinary();
    struct.setJava_valIsSet(true);
  }
}
 
Example 12
Source File: ThriftSampleData.java    From incubator-pinot with Apache License 2.0 4 votes vote down vote up
public void read(TProtocol prot, ThriftSampleData struct)
    throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(7);
  if (incoming.get(0)) {
    struct.id = iprot.readI32();
    struct.setIdIsSet(true);
  }

  if (incoming.get(1)) {
    struct.name = iprot.readString();
    struct.setNameIsSet(true);
  }

  if (incoming.get(2)) {
    struct.created_at = iprot.readI64();
    struct.setCreated_atIsSet(true);
  }

  if (incoming.get(3)) {
    struct.active = iprot.readBool();
    struct.setActiveIsSet(true);
  }

  int _i25;
  if (incoming.get(4)) {
    TList _list16 = new TList((byte) 6, iprot.readI32());
    struct.groups = new ArrayList(_list16.size);

    for (_i25 = 0; _i25 < _list16.size; ++_i25) {
      short _elem17 = iprot.readI16();
      struct.groups.add(_elem17);
    }

    struct.setGroupsIsSet(true);
  }

  String _elem24;
  if (incoming.get(5)) {
    TMap _map19 = new TMap((byte) 11, (byte) 10, iprot.readI32());
    struct.map_values = new HashMap(2 * _map19.size);

    for (int _i22 = 0; _i22 < _map19.size; ++_i22) {
      _elem24 = iprot.readString();
      long _val21 = iprot.readI64();
      struct.map_values.put(_elem24, _val21);
    }

    struct.setMap_valuesIsSet(true);
  }

  if (incoming.get(6)) {
    TSet _set23 = new TSet((byte) 11, iprot.readI32());
    struct.set_values = new HashSet(2 * _set23.size);

    for (_i25 = 0; _i25 < _set23.size; ++_i25) {
      _elem24 = iprot.readString();
      struct.set_values.add(_elem24);
    }

    struct.setSet_valuesIsSet(true);
  }
}