本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.writeBitSet方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.writeBitSet方法的具體用法?Java TTupleProtocol.writeBitSet怎麽用?Java TTupleProtocol.writeBitSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.thrift.protocol.TTupleProtocol
的用法示例。
在下文中一共展示了TTupleProtocol.writeBitSet方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
}
示例2: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CursorRequestMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetStoreName()) {
optionals.set(0);
}
if (struct.isSetCursorId()) {
optionals.set(1);
}
if (struct.isSetClose()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetStoreName()) {
oprot.writeString(struct.storeName);
}
if (struct.isSetCursorId()) {
oprot.writeI32(struct.cursorId);
}
if (struct.isSetClose()) {
oprot.writeBool(struct.close);
}
}
示例3: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIo()) {
optionals.set(0);
}
if (struct.isSetIa()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
if (struct.isSetIa()) {
struct.ia.write(oprot);
}
}
示例4: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SyncOfferMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
struct.store.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetVersions()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetVersions()) {
{
oprot.writeI32(struct.versions.size());
for (KeyedVersions _iter44 : struct.versions)
{
_iter44.write(oprot);
}
}
}
}
示例5: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ErrorMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetError()) {
optionals.set(0);
}
if (struct.isSetType()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetError()) {
struct.error.write(oprot);
}
if (struct.isSetType()) {
oprot.writeI32(struct.type.getValue());
}
}
示例6: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, giveUpTask_args struct) throws 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);
}
}
示例7: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, instructionInvokeAsync_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetInsList()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetInsList()) {
{
oprot.writeI32(struct.insList.size());
for (Instruct _iter4 : struct.insList)
{
_iter4.write(oprot);
}
}
}
}
示例8: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.family);
BitSet optionals = new BitSet();
if (struct.isSetQualifier()) {
optionals.set(0);
}
if (struct.isSetTimestamp()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetQualifier()) {
oprot.writeBinary(struct.qualifier);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
示例9: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, VectorClock struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetVersions()) {
optionals.set(0);
}
if (struct.isSetTimestamp()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetVersions()) {
{
oprot.writeI32(struct.versions.size());
for (ClockEntry _iter4 : struct.versions)
{
_iter4.write(oprot);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
示例10: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsResp struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.status.write(oprot);
oprot.writeBool(struct.hasResultSet);
BitSet optionals = new BitSet();
if (struct.isSetQueryDataSet()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetQueryDataSet()) {
struct.queryDataSet.write(oprot);
}
}
示例11: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetReq()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetReq()) {
struct.req.write(oprot);
}
}
示例12: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetI()) {
optionals.set(0);
}
if (struct.isSetB()) {
optionals.set(1);
}
if (struct.isSetS()) {
optionals.set(2);
}
if (struct.isSetL()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetI()) {
oprot.writeI32(struct.i);
}
if (struct.isSetB()) {
oprot.writeBool(struct.b);
}
if (struct.isSetS()) {
oprot.writeString(struct.s);
}
if (struct.isSetL()) {
{
oprot.writeI32(struct.l.size());
for (int _iter4 : struct.l)
{
oprot.writeI32(_iter4);
}
}
}
}
示例13: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AlreadyExists 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);
}
}
示例14: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, finishTask_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTaskId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTaskId()) {
oprot.writeString(struct.taskId);
}
}
示例15: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAppend struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTable()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
if (struct.isSetValues()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTable()) {
oprot.writeBinary(struct.table);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter42 : struct.columns)
{
oprot.writeBinary(_iter42);
}
}
}
if (struct.isSetValues()) {
{
oprot.writeI32(struct.values.size());
for (ByteBuffer _iter43 : struct.values)
{
oprot.writeBinary(_iter43);
}
}
}
}