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


Java TTupleProtocol.writeI16方法代碼示例

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


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

示例1: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HelloMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetNodeId()) {
    optionals.set(0);
  }
  if (struct.isSetAuthScheme()) {
    optionals.set(1);
  }
  if (struct.isSetAuthChallengeResponse()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetNodeId()) {
    oprot.writeI16(struct.nodeId);
  }
  if (struct.isSetAuthScheme()) {
    oprot.writeI32(struct.authScheme.getValue());
  }
  if (struct.isSetAuthChallengeResponse()) {
    struct.authChallengeResponse.write(oprot);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:26,代碼來源:HelloMessage.java

示例2: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ClusterJoinResponseMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetNewNodeId()) {
    optionals.set(0);
  }
  if (struct.isSetNodeStore()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetNewNodeId()) {
    oprot.writeI16(struct.newNodeId);
  }
  if (struct.isSetNodeStore()) {
    {
      oprot.writeI32(struct.nodeStore.size());
      for (KeyedValues _iter68 : struct.nodeStore)
      {
        _iter68.write(oprot);
      }
    }
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:26,代碼來源:ClusterJoinResponseMessage.java

示例3: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SwitchPortTuple struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetDpid()) {
    optionals.set(0);
  }
  if (struct.isSetPort()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetDpid()) {
    oprot.writeI64(struct.dpid);
  }
  if (struct.isSetPort()) {
    oprot.writeI16(struct.port);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:19,代碼來源:SwitchPortTuple.java

示例4: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Node struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetNodeId()) {
    optionals.set(0);
  }
  if (struct.isSetDomainId()) {
    optionals.set(1);
  }
  if (struct.isSetHostname()) {
    optionals.set(2);
  }
  if (struct.isSetPort()) {
    optionals.set(3);
  }
  oprot.writeBitSet(optionals, 4);
  if (struct.isSetNodeId()) {
    oprot.writeI16(struct.nodeId);
  }
  if (struct.isSetDomainId()) {
    oprot.writeI16(struct.domainId);
  }
  if (struct.isSetHostname()) {
    oprot.writeString(struct.hostname);
  }
  if (struct.isSetPort()) {
    oprot.writeI32(struct.port);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:31,代碼來源:Node.java

示例5: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ClockEntry struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI16(struct.nodeId);
  oprot.writeI64(struct.version);
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:7,代碼來源:ClockEntry.java


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