Examples of TTupleProtocol


Examples of org.apache.thrift.protocol.TTupleProtocol

  private static class LogEntryTupleScheme extends TupleScheme<LogEntry> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, LogEntry struct) throws org.apache.thrift.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);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, LogEntry struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(2);
      if (incoming.get(0)) {
        struct.category = iprot.readString();
        struct.setCategoryIsSet(true);
      }
      if (incoming.get(1)) {
        struct.message = iprot.readString();
        struct.setMessageIsSet(true);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

  private static class AdjustableRateExceptionTupleScheme extends TupleScheme<AdjustableRateException> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, AdjustableRateException struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetMsg()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetMsg()) {
        oprot.writeString(struct.msg);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, AdjustableRateException struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        struct.msg = iprot.readString();
        struct.setMsgIsSet(true);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

  private static class EndpointTupleScheme extends TupleScheme<Endpoint> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetIpv4()) {
        optionals.set(0);
      }
      if (struct.isSetPort()) {
        optionals.set(1);
      }
      if (struct.isSetService_name()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetIpv4()) {
        oprot.writeI32(struct.ipv4);
      }
      if (struct.isSetPort()) {
        oprot.writeI16(struct.port);
      }
      if (struct.isSetService_name()) {
        oprot.writeString(struct.service_name);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.ipv4 = iprot.readI32();
        struct.setIpv4IsSet(true);
      }
      if (incoming.get(1)) {
        struct.port = iprot.readI16();
        struct.setPortIsSet(true);
      }
      if (incoming.get(2)) {
        struct.service_name = iprot.readString();
        struct.setService_nameIsSet(true);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

    private static class storeDependencies_resultTupleScheme extends TupleScheme<storeDependencies_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeDependencies_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeDependencies_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new StoreAggregatesException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

  private static class StoreAggregatesExceptionTupleScheme extends TupleScheme<StoreAggregatesException> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, StoreAggregatesException struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetMsg()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetMsg()) {
        oprot.writeString(struct.msg);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, StoreAggregatesException struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        struct.msg = iprot.readString();
        struct.setMsgIsSet(true);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.