Package org.apache.blur.thirdparty.thrift_0_9_0.protocol

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol


      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Row struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(2);
      if (incoming.get(0)) {
        struct.id = iprot.readString();
        struct.setIdIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list23 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.records = new ArrayList<Record>(_list23.size);
          for (int _i24 = 0; _i24 < _list23.size; ++_i24)
          {
            Record _elem25; // required
            _elem25 = new Record();
View Full Code Here


  private static class BlurResultsTupleScheme extends TupleScheme<BlurResults> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurResults struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTotalResults()) {
        optionals.set(0);
      }
      if (struct.isSetShardInfo()) {
        optionals.set(1);
      }
      if (struct.isSetResults()) {
        optionals.set(2);
      }
      if (struct.isSetFacetCounts()) {
        optionals.set(3);
      }
      if (struct.isSetExceptions()) {
        optionals.set(4);
      }
      if (struct.isSetQuery()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetTotalResults()) {
        oprot.writeI64(struct.totalResults);
      }
      if (struct.isSetShardInfo()) {
        {
          oprot.writeI32(struct.shardInfo.size());
          for (Map.Entry<String, Long> _iter101 : struct.shardInfo.entrySet())
          {
            oprot.writeString(_iter101.getKey());
            oprot.writeI64(_iter101.getValue());
          }
        }
      }
      if (struct.isSetResults()) {
        {
          oprot.writeI32(struct.results.size());
          for (BlurResult _iter102 : struct.results)
          {
            _iter102.write(oprot);
          }
        }
      }
      if (struct.isSetFacetCounts()) {
        {
          oprot.writeI32(struct.facetCounts.size());
          for (long _iter103 : struct.facetCounts)
          {
            oprot.writeI64(_iter103);
          }
        }
      }
      if (struct.isSetExceptions()) {
        {
          oprot.writeI32(struct.exceptions.size());
          for (BlurException _iter104 : struct.exceptions)
          {
            _iter104.write(oprot);
          }
        }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurResults struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.totalResults = iprot.readI64();
        struct.setTotalResultsIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map105 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, iprot.readI32());
          struct.shardInfo = new HashMap<String,Long>(2*_map105.size);
          for (int _i106 = 0; _i106 < _map105.size; ++_i106)
          {
            String _key107; // optional
            long _val108; // required
            _key107 = iprot.readString();
            _val108 = iprot.readI64();
            struct.shardInfo.put(_key107, _val108);
          }
        }
        struct.setShardInfoIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list109 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.results = new ArrayList<BlurResult>(_list109.size);
          for (int _i110 = 0; _i110 < _list109.size; ++_i110)
          {
            BlurResult _elem111; // required
            _elem111 = new BlurResult();
            _elem111.read(iprot);
            struct.results.add(_elem111);
          }
        }
        struct.setResultsIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list112 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, iprot.readI32());
          struct.facetCounts = new ArrayList<Long>(_list112.size);
          for (int _i113 = 0; _i113 < _list112.size; ++_i113)
          {
            long _elem114; // required
            _elem114 = iprot.readI64();
            struct.facetCounts.add(_elem114);
          }
        }
        struct.setFacetCountsIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list115 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.exceptions = new ArrayList<BlurException>(_list115.size);
          for (int _i116 = 0; _i116 < _list115.size; ++_i116)
          {
            BlurException _elem117; // required
            _elem117 = new BlurException();
View Full Code Here

  private static class SortFieldTupleScheme extends TupleScheme<SortField> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, SortField struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetFamily()) {
        optionals.set(0);
      }
      if (struct.isSetColumn()) {
        optionals.set(1);
      }
      if (struct.isSetReverse()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetFamily()) {
        oprot.writeString(struct.family);
      }
      if (struct.isSetColumn()) {
        oprot.writeString(struct.column);
      }
      if (struct.isSetReverse()) {
        oprot.writeBool(struct.reverse);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, SortField struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.family = iprot.readString();
        struct.setFamilyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.column = iprot.readString();
        struct.setColumnIsSet(true);
      }
      if (incoming.get(2)) {
        struct.reverse = iprot.readBool();
        struct.setReverseIsSet(true);
      }
    }
View Full Code Here

  private static class BlurQueryStatusTupleScheme extends TupleScheme<BlurQueryStatus> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurQueryStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetQuery()) {
        optionals.set(0);
      }
      if (struct.isSetCpuTimes()) {
        optionals.set(1);
      }
      if (struct.isSetCompleteShards()) {
        optionals.set(2);
      }
      if (struct.isSetTotalShards()) {
        optionals.set(3);
      }
      if (struct.isSetState()) {
        optionals.set(4);
      }
      if (struct.isSetUuid()) {
        optionals.set(5);
      }
      if (struct.isSetStatus()) {
        optionals.set(6);
      }
      if (struct.isSetUser()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetQuery()) {
        struct.query.write(oprot);
      }
      if (struct.isSetCpuTimes()) {
        {
          oprot.writeI32(struct.cpuTimes.size());
          for (Map.Entry<String, CpuTime> _iter131 : struct.cpuTimes.entrySet())
          {
            oprot.writeString(_iter131.getKey());
            _iter131.getValue().write(oprot);
          }
        }
      }
      if (struct.isSetCompleteShards()) {
        oprot.writeI32(struct.completeShards);
      }
      if (struct.isSetTotalShards()) {
        oprot.writeI32(struct.totalShards);
      }
      if (struct.isSetState()) {
        oprot.writeI32(struct.state.getValue());
      }
      if (struct.isSetUuid()) {
        oprot.writeString(struct.uuid);
      }
      if (struct.isSetStatus()) {
        oprot.writeI32(struct.status.getValue());
      }
      if (struct.isSetUser()) {
        struct.user.write(oprot);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurQueryStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.query = new BlurQuery();
        struct.query.read(iprot);
        struct.setQueryIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map132 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.cpuTimes = new HashMap<String,CpuTime>(2*_map132.size);
          for (int _i133 = 0; _i133 < _map132.size; ++_i133)
          {
            String _key134; // optional
            CpuTime _val135; // required
            _key134 = iprot.readString();
            _val135 = new CpuTime();
            _val135.read(iprot);
            struct.cpuTimes.put(_key134, _val135);
          }
        }
        struct.setCpuTimesIsSet(true);
      }
      if (incoming.get(2)) {
        struct.completeShards = iprot.readI32();
        struct.setCompleteShardsIsSet(true);
      }
      if (incoming.get(3)) {
        struct.totalShards = iprot.readI32();
        struct.setTotalShardsIsSet(true);
      }
      if (incoming.get(4)) {
        struct.state = QueryState.findByValue(iprot.readI32());
        struct.setStateIsSet(true);
      }
      if (incoming.get(5)) {
        struct.uuid = iprot.readString();
        struct.setUuidIsSet(true);
      }
      if (incoming.get(6)) {
        struct.status = Status.findByValue(iprot.readI32());
        struct.setStatusIsSet(true);
      }
      if (incoming.get(7)) {
        struct.user = new User();
        struct.user.read(iprot);
View Full Code Here

  private static class BlurQueryTupleScheme extends TupleScheme<BlurQuery> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurQuery struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetQuery()) {
        optionals.set(0);
      }
      if (struct.isSetFacets()) {
        optionals.set(1);
      }
      if (struct.isSetSelector()) {
        optionals.set(2);
      }
      if (struct.isSetUseCacheIfPresent()) {
        optionals.set(3);
      }
      if (struct.isSetStart()) {
        optionals.set(4);
      }
      if (struct.isSetFetch()) {
        optionals.set(5);
      }
      if (struct.isSetMinimumNumberOfResults()) {
        optionals.set(6);
      }
      if (struct.isSetMaxQueryTime()) {
        optionals.set(7);
      }
      if (struct.isSetUuid()) {
        optionals.set(8);
      }
      if (struct.isSetUserContext()) {
        optionals.set(9);
      }
      if (struct.isSetCacheResult()) {
        optionals.set(10);
      }
      if (struct.isSetStartTime()) {
        optionals.set(11);
      }
      if (struct.isSetSortFields()) {
        optionals.set(12);
      }
      if (struct.isSetRowId()) {
        optionals.set(13);
      }
      oprot.writeBitSet(optionals, 14);
      if (struct.isSetQuery()) {
        struct.query.write(oprot);
      }
      if (struct.isSetFacets()) {
        {
          oprot.writeI32(struct.facets.size());
          for (Facet _iter68 : struct.facets)
          {
            _iter68.write(oprot);
          }
        }
      }
      if (struct.isSetSelector()) {
        struct.selector.write(oprot);
      }
      if (struct.isSetUseCacheIfPresent()) {
        oprot.writeBool(struct.useCacheIfPresent);
      }
      if (struct.isSetStart()) {
        oprot.writeI64(struct.start);
      }
      if (struct.isSetFetch()) {
        oprot.writeI32(struct.fetch);
      }
      if (struct.isSetMinimumNumberOfResults()) {
        oprot.writeI64(struct.minimumNumberOfResults);
      }
      if (struct.isSetMaxQueryTime()) {
        oprot.writeI64(struct.maxQueryTime);
      }
      if (struct.isSetUuid()) {
        oprot.writeString(struct.uuid);
      }
      if (struct.isSetUserContext()) {
        oprot.writeString(struct.userContext);
      }
      if (struct.isSetCacheResult()) {
        oprot.writeBool(struct.cacheResult);
      }
      if (struct.isSetStartTime()) {
        oprot.writeI64(struct.startTime);
      }
      if (struct.isSetSortFields()) {
        {
          oprot.writeI32(struct.sortFields.size());
          for (SortField _iter69 : struct.sortFields)
          {
            _iter69.write(oprot);
          }
        }
      }
      if (struct.isSetRowId()) {
        oprot.writeString(struct.rowId);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurQuery struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(14);
      if (incoming.get(0)) {
        struct.query = new Query();
        struct.query.read(iprot);
        struct.setQueryIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list70 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.facets = new ArrayList<Facet>(_list70.size);
          for (int _i71 = 0; _i71 < _list70.size; ++_i71)
          {
            Facet _elem72; // required
            _elem72 = new Facet();
            _elem72.read(iprot);
            struct.facets.add(_elem72);
          }
        }
        struct.setFacetsIsSet(true);
      }
      if (incoming.get(2)) {
        struct.selector = new Selector();
        struct.selector.read(iprot);
        struct.setSelectorIsSet(true);
      }
      if (incoming.get(3)) {
        struct.useCacheIfPresent = iprot.readBool();
        struct.setUseCacheIfPresentIsSet(true);
      }
      if (incoming.get(4)) {
        struct.start = iprot.readI64();
        struct.setStartIsSet(true);
      }
      if (incoming.get(5)) {
        struct.fetch = iprot.readI32();
        struct.setFetchIsSet(true);
      }
      if (incoming.get(6)) {
        struct.minimumNumberOfResults = iprot.readI64();
        struct.setMinimumNumberOfResultsIsSet(true);
      }
      if (incoming.get(7)) {
        struct.maxQueryTime = iprot.readI64();
        struct.setMaxQueryTimeIsSet(true);
      }
      if (incoming.get(8)) {
        struct.uuid = iprot.readString();
        struct.setUuidIsSet(true);
      }
      if (incoming.get(9)) {
        struct.userContext = iprot.readString();
        struct.setUserContextIsSet(true);
      }
      if (incoming.get(10)) {
        struct.cacheResult = iprot.readBool();
        struct.setCacheResultIsSet(true);
      }
      if (incoming.get(11)) {
        struct.startTime = iprot.readI64();
        struct.setStartTimeIsSet(true);
      }
      if (incoming.get(12)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list73 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.sortFields = new ArrayList<SortField>(_list73.size);
          for (int _i74 = 0; _i74 < _list73.size; ++_i74)
          {
            SortField _elem75; // required
            _elem75 = new SortField();
            _elem75.read(iprot);
            struct.sortFields.add(_elem75);
          }
        }
        struct.setSortFieldsIsSet(true);
      }
      if (incoming.get(13)) {
        struct.rowId = iprot.readString();
        struct.setRowIdIsSet(true);
      }
    }
View Full Code Here

  private static class UserTupleScheme extends TupleScheme<User> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, User struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetUsername()) {
        optionals.set(0);
      }
      if (struct.isSetAttributes()) {
        optionals.set(1);
      }
      oprot.writeBitSet(optionals, 2);
      if (struct.isSetUsername()) {
        oprot.writeString(struct.username);
      }
      if (struct.isSetAttributes()) {
        {
          oprot.writeI32(struct.attributes.size());
          for (Map.Entry<String, String> _iter5 : struct.attributes.entrySet())
          {
            oprot.writeString(_iter5.getKey());
            oprot.writeString(_iter5.getValue());
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.blur.thirdparty.thrift_0_9_0.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.