本文整理匯總了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);
}
}
示例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);
}
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}