Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TTupleProtocol$Factory


    private static class storeTopKeyValueAnnotations_resultTupleScheme extends TupleScheme<storeTopKeyValueAnnotations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_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, storeTopKeyValueAnnotations_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 BinaryAnnotationTupleScheme extends TupleScheme<BinaryAnnotation> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetKey()) {
        optionals.set(0);
      }
      if (struct.isSetValue()) {
        optionals.set(1);
      }
      if (struct.isSetAnnotation_type()) {
        optionals.set(2);
      }
      if (struct.isSetHost()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetKey()) {
        oprot.writeString(struct.key);
      }
      if (struct.isSetValue()) {
        oprot.writeBinary(struct.value);
      }
      if (struct.isSetAnnotation_type()) {
        oprot.writeI32(struct.annotation_type.getValue());
      }
      if (struct.isSetHost()) {
        struct.host.write(oprot);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.key = iprot.readString();
        struct.setKeyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.value = iprot.readBinary();
        struct.setValueIsSet(true);
      }
      if (incoming.get(2)) {
        struct.annotation_type = AnnotationType.findByValue(iprot.readI32());
        struct.setAnnotation_typeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.host = new Endpoint();
        struct.host.read(iprot);
View Full Code Here

    private static class storeDependencies_argsTupleScheme extends TupleScheme<storeDependencies_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeDependencies_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetService_name()) {
          optionals.set(0);
        }
        if (struct.isSetEndpoints()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetService_name()) {
          oprot.writeString(struct.service_name);
        }
        if (struct.isSetEndpoints()) {
          {
            oprot.writeI32(struct.endpoints.size());
            for (String _iter20 : struct.endpoints)
            {
              oprot.writeString(_iter20);
            }
          }
        }
      }
View Full Code Here

        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeDependencies_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.service_name = iprot.readString();
          struct.setService_nameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.endpoints = new ArrayList<String>(_list21.size);
            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
            {
              String _elem23; // required
              _elem23 = iprot.readString();
              struct.endpoints.add(_elem23);
            }
          }
          struct.setEndpointsIsSet(true);
        }
View Full Code Here

  private static class AnnotationTupleScheme extends TupleScheme<Annotation> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTimestamp()) {
        optionals.set(0);
      }
      if (struct.isSetValue()) {
        optionals.set(1);
      }
      if (struct.isSetHost()) {
        optionals.set(2);
      }
      if (struct.isSetDuration()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetTimestamp()) {
        oprot.writeI64(struct.timestamp);
      }
      if (struct.isSetValue()) {
        oprot.writeString(struct.value);
      }
      if (struct.isSetHost()) {
        struct.host.write(oprot);
      }
      if (struct.isSetDuration()) {
        oprot.writeI32(struct.duration);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.timestamp = iprot.readI64();
        struct.setTimestampIsSet(true);
      }
      if (incoming.get(1)) {
        struct.value = iprot.readString();
        struct.setValueIsSet(true);
      }
      if (incoming.get(2)) {
        struct.host = new Endpoint();
        struct.host.read(iprot);
        struct.setHostIsSet(true);
      }
      if (incoming.get(3)) {
        struct.duration = iprot.readI32();
        struct.setDurationIsSet(true);
      }
    }
View Full Code Here

    private static class storeTopAnnotations_argsTupleScheme extends TupleScheme<storeTopAnnotations_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopAnnotations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetService_name()) {
          optionals.set(0);
        }
        if (struct.isSetAnnotations()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetService_name()) {
          oprot.writeString(struct.service_name);
        }
        if (struct.isSetAnnotations()) {
          {
            oprot.writeI32(struct.annotations.size());
            for (String _iter4 : struct.annotations)
            {
              oprot.writeString(_iter4);
            }
          }
        }
      }
View Full Code Here

        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeTopAnnotations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.service_name = iprot.readString();
          struct.setService_nameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.annotations = new ArrayList<String>(_list5.size);
            for (int _i6 = 0; _i6 < _list5.size; ++_i6)
            {
              String _elem7; // required
              _elem7 = iprot.readString();
              struct.annotations.add(_elem7);
            }
          }
          struct.setAnnotationsIsSet(true);
        }
View Full Code Here

TOP

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

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.