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


Java TTupleProtocol.writeString方法代碼示例

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


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

示例1: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LogEntry struct)
        throws TException
{
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetCategory()) {
        optionals.set(0);
    }
    if (struct.isSetMessage()) {
        optionals.set(1);
    }
    oprot.writeBitSet(optionals, 2);
    if (struct.isSetCategory()) {
        oprot.writeString(struct.category);
    }
    if (struct.isSetMessage()) {
        oprot.writeString(struct.message);
    }
}
 
開發者ID:airlift,項目名稱:drift,代碼行數:21,代碼來源:LogEntry.java

示例2: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getNewTask_result struct) throws TException {
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetSuccess()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetSuccess()) {
        {
            oprot.writeI32(struct.success.size());
            for (String _iter4 : struct.success) {
                oprot.writeString(_iter4);
            }
        }
    }
}
 
開發者ID:xiongbeer,項目名稱:Cobweb,代碼行數:18,代碼來源:LocalWorkerCrawlerServiceBase.java

示例3: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PutRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
  BitSet optionals = new BitSet();
  if (struct.isSetVersionedValue()) {
    optionals.set(0);
  }
  if (struct.isSetValue()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetVersionedValue()) {
    struct.versionedValue.write(oprot);
  }
  if (struct.isSetValue()) {
    oprot.writeBinary(struct.value);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:22,代碼來源:PutRequestMessage.java

示例4: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, giveUpTask_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTaskId()) {
    optionals.set(0);
  }
  if (struct.isSetReason()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetTaskId()) {
    oprot.writeString(struct.taskId);
  }
  if (struct.isSetReason()) {
    oprot.writeString(struct.reason);
  }
}
 
開發者ID:xiongbeer,項目名稱:Cobweb,代碼行數:19,代碼來源:LocalWorkerCrawlerService.java

示例5: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HelloResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetMessage()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetMessage()) {
    oprot.writeString(struct.message);
  }
}
 
開發者ID:grpc-ecosystem,項目名稱:grift,代碼行數:13,代碼來源:HelloResponse.java

示例6: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, test_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetName()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetName()) {
    oprot.writeString(struct.name);
  }
}
 
開發者ID:tiaoling,項目名稱:high,代碼行數:13,代碼來源:ThriftTestService.java

示例7: write

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

示例8: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sayHello_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeString(struct.success);
  }
}
 
開發者ID:xiongbeer,項目名稱:Cobweb,代碼行數:13,代碼來源:HelloWorldService.java

示例9: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DeleteRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
  BitSet optionals = new BitSet();
  if (struct.isSetVersion()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetVersion()) {
    struct.version.write(oprot);
  }
}
 
開發者ID:nsg-ethz,項目名稱:iTAP-controller,代碼行數:16,代碼來源:DeleteRequestMessage.java

示例10: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.status.write(oprot);
  oprot.writeString(struct.timeZone);
}
 
開發者ID:thulab,項目名稱:iotdb-jdbc,代碼行數:7,代碼來源:TSGetTimeZoneResp.java

示例11: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementReq struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.sessionHandle.write(oprot);
  oprot.writeString(struct.statement);
}
 
開發者ID:thulab,項目名稱:iotdb-jdbc,代碼行數:7,代碼來源:TSExecuteStatementReq.java


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