當前位置: 首頁>>代碼示例>>Java>>正文


Java TTupleProtocol.readI16方法代碼示例

本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.readI16方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.readI16方法的具體用法?Java TTupleProtocol.readI16怎麽用?Java TTupleProtocol.readI16使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.thrift.protocol.TTupleProtocol的用法示例。


在下文中一共展示了TTupleProtocol.readI16方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@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);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:22,代碼來源:HelloMessage.java

示例2: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@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);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:22,代碼來源:Node.java

示例3: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@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);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:27,代碼來源:ClusterJoinResponseMessage.java

示例4: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@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);
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:9,代碼來源:ClockEntry.java

示例5: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@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);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:14,代碼來源:SwitchPortTuple.java


注:本文中的org.apache.thrift.protocol.TTupleProtocol.readI16方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。