Package org.apache.thrift.protocol

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


      }
    }

    @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

  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

      }
    }

    @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

    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

        }
      }

      @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

  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

      }
    }

    @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

  private static class SpanTupleScheme extends TupleScheme<Span> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTrace_id()) {
        optionals.set(0);
      }
      if (struct.isSetName()) {
        optionals.set(1);
      }
      if (struct.isSetId()) {
        optionals.set(2);
      }
      if (struct.isSetParent_id()) {
        optionals.set(3);
      }
      if (struct.isSetAnnotations()) {
        optionals.set(4);
      }
      if (struct.isSetBinary_annotations()) {
        optionals.set(5);
      }
      if (struct.isSetDebug()) {
        optionals.set(6);
      }
      oprot.writeBitSet(optionals, 7);
      if (struct.isSetTrace_id()) {
        oprot.writeI64(struct.trace_id);
      }
      if (struct.isSetName()) {
        oprot.writeString(struct.name);
      }
      if (struct.isSetId()) {
        oprot.writeI64(struct.id);
      }
      if (struct.isSetParent_id()) {
        oprot.writeI64(struct.parent_id);
      }
      if (struct.isSetAnnotations()) {
        {
          oprot.writeI32(struct.annotations.size());
          for (Annotation _iter8 : struct.annotations)
          {
            _iter8.write(oprot);
          }
        }
      }
      if (struct.isSetBinary_annotations()) {
        {
          oprot.writeI32(struct.binary_annotations.size());
          for (BinaryAnnotation _iter9 : struct.binary_annotations)
          {
            _iter9.write(oprot);
          }
        }
      }
      if (struct.isSetDebug()) {
        oprot.writeBool(struct.debug);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(7);
      if (incoming.get(0)) {
        struct.trace_id = iprot.readI64();
        struct.setTrace_idIsSet(true);
      }
      if (incoming.get(1)) {
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.id = iprot.readI64();
        struct.setIdIsSet(true);
      }
      if (incoming.get(3)) {
        struct.parent_id = iprot.readI64();
        struct.setParent_idIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.annotations = new ArrayList<Annotation>(_list10.size);
          for (int _i11 = 0; _i11 < _list10.size; ++_i11)
          {
            Annotation _elem12; // required
            _elem12 = new Annotation();
            _elem12.read(iprot);
            struct.annotations.add(_elem12);
          }
        }
        struct.setAnnotationsIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.binary_annotations = new ArrayList<BinaryAnnotation>(_list13.size);
          for (int _i14 = 0; _i14 < _list13.size; ++_i14)
          {
            BinaryAnnotation _elem15; // required
            _elem15 = new BinaryAnnotation();
            _elem15.read(iprot);
            struct.binary_annotations.add(_elem15);
          }
        }
        struct.setBinary_annotationsIsSet(true);
      }
      if (incoming.get(6)) {
        struct.debug = iprot.readBool();
        struct.setDebugIsSet(true);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TTupleProtocol

Copyright © 2018 www.massapicom. 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.