1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 /**
18 * Autogenerated by Thrift Compiler (0.9.0)
19 *
20 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
21 * @generated
22 */
23 package org.apache.accumulo.core.data.thrift;
24
25 import org.apache.thrift.scheme.IScheme;
26 import org.apache.thrift.scheme.SchemeFactory;
27 import org.apache.thrift.scheme.StandardScheme;
28
29 import org.apache.thrift.scheme.TupleScheme;
30 import org.apache.thrift.protocol.TTupleProtocol;
31 import org.apache.thrift.protocol.TProtocolException;
32 import org.apache.thrift.EncodingUtils;
33 import org.apache.thrift.TException;
34 import java.util.List;
35 import java.util.ArrayList;
36 import java.util.Map;
37 import java.util.HashMap;
38 import java.util.EnumMap;
39 import java.util.Set;
40 import java.util.HashSet;
41 import java.util.EnumSet;
42 import java.util.Collections;
43 import java.util.BitSet;
44 import java.nio.ByteBuffer;
45 import java.util.Arrays;
46 import org.slf4j.Logger;
47 import org.slf4j.LoggerFactory;
48
49 @SuppressWarnings("all") public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult, MultiScanResult._Fields>, java.io.Serializable, Cloneable {
50 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MultiScanResult");
51
52 private static final org.apache.thrift.protocol.TField RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("results", org.apache.thrift.protocol.TType.LIST, (short)1);
53 private static final org.apache.thrift.protocol.TField FAILURES_FIELD_DESC = new org.apache.thrift.protocol.TField("failures", org.apache.thrift.protocol.TType.MAP, (short)2);
54 private static final org.apache.thrift.protocol.TField FULL_SCANS_FIELD_DESC = new org.apache.thrift.protocol.TField("fullScans", org.apache.thrift.protocol.TType.LIST, (short)3);
55 private static final org.apache.thrift.protocol.TField PART_SCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("partScan", org.apache.thrift.protocol.TType.STRUCT, (short)4);
56 private static final org.apache.thrift.protocol.TField PART_NEXT_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("partNextKey", org.apache.thrift.protocol.TType.STRUCT, (short)5);
57 private static final org.apache.thrift.protocol.TField PART_NEXT_KEY_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("partNextKeyInclusive", org.apache.thrift.protocol.TType.BOOL, (short)6);
58 private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.BOOL, (short)7);
59
60 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
61 static {
62 schemes.put(StandardScheme.class, new MultiScanResultStandardSchemeFactory());
63 schemes.put(TupleScheme.class, new MultiScanResultTupleSchemeFactory());
64 }
65
66 public List<TKeyValue> results;
67 public Map<TKeyExtent,List<TRange>> failures;
68 public List<TKeyExtent> fullScans;
69 public TKeyExtent partScan;
70 public TKey partNextKey;
71 public boolean partNextKeyInclusive;
72 public boolean more;
73
74 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
75 @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
76 RESULTS((short)1, "results"),
77 FAILURES((short)2, "failures"),
78 FULL_SCANS((short)3, "fullScans"),
79 PART_SCAN((short)4, "partScan"),
80 PART_NEXT_KEY((short)5, "partNextKey"),
81 PART_NEXT_KEY_INCLUSIVE((short)6, "partNextKeyInclusive"),
82 MORE((short)7, "more");
83
84 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
85
86 static {
87 for (_Fields field : EnumSet.allOf(_Fields.class)) {
88 byName.put(field.getFieldName(), field);
89 }
90 }
91
92 /**
93 * Find the _Fields constant that matches fieldId, or null if its not found.
94 */
95 public static _Fields findByThriftId(int fieldId) {
96 switch(fieldId) {
97 case 1:
98 return RESULTS;
99 case 2:
100 return FAILURES;
101 case 3:
102 return FULL_SCANS;
103 case 4:
104 return PART_SCAN;
105 case 5:
106 return PART_NEXT_KEY;
107 case 6:
108 return PART_NEXT_KEY_INCLUSIVE;
109 case 7:
110 return MORE;
111 default:
112 return null;
113 }
114 }
115
116 /**
117 * Find the _Fields constant that matches fieldId, throwing an exception
118 * if it is not found.
119 */
120 public static _Fields findByThriftIdOrThrow(int fieldId) {
121 _Fields fields = findByThriftId(fieldId);
122 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
123 return fields;
124 }
125
126 /**
127 * Find the _Fields constant that matches name, or null if its not found.
128 */
129 public static _Fields findByName(String name) {
130 return byName.get(name);
131 }
132
133 private final short _thriftId;
134 private final String _fieldName;
135
136 _Fields(short thriftId, String fieldName) {
137 _thriftId = thriftId;
138 _fieldName = fieldName;
139 }
140
141 public short getThriftFieldId() {
142 return _thriftId;
143 }
144
145 public String getFieldName() {
146 return _fieldName;
147 }
148 }
149
150
151 private static final int __PARTNEXTKEYINCLUSIVE_ISSET_ID = 0;
152 private static final int __MORE_ISSET_ID = 1;
153 private byte __isset_bitfield = 0;
154 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
155 static {
156 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
157 tmpMap.put(_Fields.RESULTS, new org.apache.thrift.meta_data.FieldMetaData("results", org.apache.thrift.TFieldRequirementType.DEFAULT,
158 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
159 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyValue.class))));
160 tmpMap.put(_Fields.FAILURES, new org.apache.thrift.meta_data.FieldMetaData("failures", org.apache.thrift.TFieldRequirementType.DEFAULT,
161 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.MAP , "ScanBatch")));
162 tmpMap.put(_Fields.FULL_SCANS, new org.apache.thrift.meta_data.FieldMetaData("fullScans", org.apache.thrift.TFieldRequirementType.DEFAULT,
163 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
164 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyExtent.class))));
165 tmpMap.put(_Fields.PART_SCAN, new org.apache.thrift.meta_data.FieldMetaData("partScan", org.apache.thrift.TFieldRequirementType.DEFAULT,
166 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyExtent.class)));
167 tmpMap.put(_Fields.PART_NEXT_KEY, new org.apache.thrift.meta_data.FieldMetaData("partNextKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
168 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKey.class)));
169 tmpMap.put(_Fields.PART_NEXT_KEY_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("partNextKeyInclusive", org.apache.thrift.TFieldRequirementType.DEFAULT,
170 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
171 tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.DEFAULT,
172 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
173 metaDataMap = Collections.unmodifiableMap(tmpMap);
174 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MultiScanResult.class, metaDataMap);
175 }
176
177 public MultiScanResult() {
178 }
179
180 public MultiScanResult(
181 List<TKeyValue> results,
182 Map<TKeyExtent,List<TRange>> failures,
183 List<TKeyExtent> fullScans,
184 TKeyExtent partScan,
185 TKey partNextKey,
186 boolean partNextKeyInclusive,
187 boolean more)
188 {
189 this();
190 this.results = results;
191 this.failures = failures;
192 this.fullScans = fullScans;
193 this.partScan = partScan;
194 this.partNextKey = partNextKey;
195 this.partNextKeyInclusive = partNextKeyInclusive;
196 setPartNextKeyInclusiveIsSet(true);
197 this.more = more;
198 setMoreIsSet(true);
199 }
200
201 /**
202 * Performs a deep copy on <i>other</i>.
203 */
204 public MultiScanResult(MultiScanResult other) {
205 __isset_bitfield = other.__isset_bitfield;
206 if (other.isSetResults()) {
207 List<TKeyValue> __this__results = new ArrayList<TKeyValue>();
208 for (TKeyValue other_element : other.results) {
209 __this__results.add(new TKeyValue(other_element));
210 }
211 this.results = __this__results;
212 }
213 if (other.isSetFailures()) {
214 this.failures = other.failures;
215 }
216 if (other.isSetFullScans()) {
217 List<TKeyExtent> __this__fullScans = new ArrayList<TKeyExtent>();
218 for (TKeyExtent other_element : other.fullScans) {
219 __this__fullScans.add(new TKeyExtent(other_element));
220 }
221 this.fullScans = __this__fullScans;
222 }
223 if (other.isSetPartScan()) {
224 this.partScan = new TKeyExtent(other.partScan);
225 }
226 if (other.isSetPartNextKey()) {
227 this.partNextKey = new TKey(other.partNextKey);
228 }
229 this.partNextKeyInclusive = other.partNextKeyInclusive;
230 this.more = other.more;
231 }
232
233 public MultiScanResult deepCopy() {
234 return new MultiScanResult(this);
235 }
236
237 @Override
238 public void clear() {
239 this.results = null;
240 this.failures = null;
241 this.fullScans = null;
242 this.partScan = null;
243 this.partNextKey = null;
244 setPartNextKeyInclusiveIsSet(false);
245 this.partNextKeyInclusive = false;
246 setMoreIsSet(false);
247 this.more = false;
248 }
249
250 public int getResultsSize() {
251 return (this.results == null) ? 0 : this.results.size();
252 }
253
254 public java.util.Iterator<TKeyValue> getResultsIterator() {
255 return (this.results == null) ? null : this.results.iterator();
256 }
257
258 public void addToResults(TKeyValue elem) {
259 if (this.results == null) {
260 this.results = new ArrayList<TKeyValue>();
261 }
262 this.results.add(elem);
263 }
264
265 public List<TKeyValue> getResults() {
266 return this.results;
267 }
268
269 public MultiScanResult setResults(List<TKeyValue> results) {
270 this.results = results;
271 return this;
272 }
273
274 public void unsetResults() {
275 this.results = null;
276 }
277
278 /** Returns true if field results is set (has been assigned a value) and false otherwise */
279 public boolean isSetResults() {
280 return this.results != null;
281 }
282
283 public void setResultsIsSet(boolean value) {
284 if (!value) {
285 this.results = null;
286 }
287 }
288
289 public int getFailuresSize() {
290 return (this.failures == null) ? 0 : this.failures.size();
291 }
292
293 public void putToFailures(TKeyExtent key, List<TRange> val) {
294 if (this.failures == null) {
295 this.failures = new HashMap<TKeyExtent,List<TRange>>();
296 }
297 this.failures.put(key, val);
298 }
299
300 public Map<TKeyExtent,List<TRange>> getFailures() {
301 return this.failures;
302 }
303
304 public MultiScanResult setFailures(Map<TKeyExtent,List<TRange>> failures) {
305 this.failures = failures;
306 return this;
307 }
308
309 public void unsetFailures() {
310 this.failures = null;
311 }
312
313 /** Returns true if field failures is set (has been assigned a value) and false otherwise */
314 public boolean isSetFailures() {
315 return this.failures != null;
316 }
317
318 public void setFailuresIsSet(boolean value) {
319 if (!value) {
320 this.failures = null;
321 }
322 }
323
324 public int getFullScansSize() {
325 return (this.fullScans == null) ? 0 : this.fullScans.size();
326 }
327
328 public java.util.Iterator<TKeyExtent> getFullScansIterator() {
329 return (this.fullScans == null) ? null : this.fullScans.iterator();
330 }
331
332 public void addToFullScans(TKeyExtent elem) {
333 if (this.fullScans == null) {
334 this.fullScans = new ArrayList<TKeyExtent>();
335 }
336 this.fullScans.add(elem);
337 }
338
339 public List<TKeyExtent> getFullScans() {
340 return this.fullScans;
341 }
342
343 public MultiScanResult setFullScans(List<TKeyExtent> fullScans) {
344 this.fullScans = fullScans;
345 return this;
346 }
347
348 public void unsetFullScans() {
349 this.fullScans = null;
350 }
351
352 /** Returns true if field fullScans is set (has been assigned a value) and false otherwise */
353 public boolean isSetFullScans() {
354 return this.fullScans != null;
355 }
356
357 public void setFullScansIsSet(boolean value) {
358 if (!value) {
359 this.fullScans = null;
360 }
361 }
362
363 public TKeyExtent getPartScan() {
364 return this.partScan;
365 }
366
367 public MultiScanResult setPartScan(TKeyExtent partScan) {
368 this.partScan = partScan;
369 return this;
370 }
371
372 public void unsetPartScan() {
373 this.partScan = null;
374 }
375
376 /** Returns true if field partScan is set (has been assigned a value) and false otherwise */
377 public boolean isSetPartScan() {
378 return this.partScan != null;
379 }
380
381 public void setPartScanIsSet(boolean value) {
382 if (!value) {
383 this.partScan = null;
384 }
385 }
386
387 public TKey getPartNextKey() {
388 return this.partNextKey;
389 }
390
391 public MultiScanResult setPartNextKey(TKey partNextKey) {
392 this.partNextKey = partNextKey;
393 return this;
394 }
395
396 public void unsetPartNextKey() {
397 this.partNextKey = null;
398 }
399
400 /** Returns true if field partNextKey is set (has been assigned a value) and false otherwise */
401 public boolean isSetPartNextKey() {
402 return this.partNextKey != null;
403 }
404
405 public void setPartNextKeyIsSet(boolean value) {
406 if (!value) {
407 this.partNextKey = null;
408 }
409 }
410
411 public boolean isPartNextKeyInclusive() {
412 return this.partNextKeyInclusive;
413 }
414
415 public MultiScanResult setPartNextKeyInclusive(boolean partNextKeyInclusive) {
416 this.partNextKeyInclusive = partNextKeyInclusive;
417 setPartNextKeyInclusiveIsSet(true);
418 return this;
419 }
420
421 public void unsetPartNextKeyInclusive() {
422 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
423 }
424
425 /** Returns true if field partNextKeyInclusive is set (has been assigned a value) and false otherwise */
426 public boolean isSetPartNextKeyInclusive() {
427 return EncodingUtils.testBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
428 }
429
430 public void setPartNextKeyInclusiveIsSet(boolean value) {
431 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID, value);
432 }
433
434 public boolean isMore() {
435 return this.more;
436 }
437
438 public MultiScanResult setMore(boolean more) {
439 this.more = more;
440 setMoreIsSet(true);
441 return this;
442 }
443
444 public void unsetMore() {
445 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
446 }
447
448 /** Returns true if field more is set (has been assigned a value) and false otherwise */
449 public boolean isSetMore() {
450 return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
451 }
452
453 public void setMoreIsSet(boolean value) {
454 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
455 }
456
457 public void setFieldValue(_Fields field, Object value) {
458 switch (field) {
459 case RESULTS:
460 if (value == null) {
461 unsetResults();
462 } else {
463 setResults((List<TKeyValue>)value);
464 }
465 break;
466
467 case FAILURES:
468 if (value == null) {
469 unsetFailures();
470 } else {
471 setFailures((Map<TKeyExtent,List<TRange>>)value);
472 }
473 break;
474
475 case FULL_SCANS:
476 if (value == null) {
477 unsetFullScans();
478 } else {
479 setFullScans((List<TKeyExtent>)value);
480 }
481 break;
482
483 case PART_SCAN:
484 if (value == null) {
485 unsetPartScan();
486 } else {
487 setPartScan((TKeyExtent)value);
488 }
489 break;
490
491 case PART_NEXT_KEY:
492 if (value == null) {
493 unsetPartNextKey();
494 } else {
495 setPartNextKey((TKey)value);
496 }
497 break;
498
499 case PART_NEXT_KEY_INCLUSIVE:
500 if (value == null) {
501 unsetPartNextKeyInclusive();
502 } else {
503 setPartNextKeyInclusive((Boolean)value);
504 }
505 break;
506
507 case MORE:
508 if (value == null) {
509 unsetMore();
510 } else {
511 setMore((Boolean)value);
512 }
513 break;
514
515 }
516 }
517
518 public Object getFieldValue(_Fields field) {
519 switch (field) {
520 case RESULTS:
521 return getResults();
522
523 case FAILURES:
524 return getFailures();
525
526 case FULL_SCANS:
527 return getFullScans();
528
529 case PART_SCAN:
530 return getPartScan();
531
532 case PART_NEXT_KEY:
533 return getPartNextKey();
534
535 case PART_NEXT_KEY_INCLUSIVE:
536 return Boolean.valueOf(isPartNextKeyInclusive());
537
538 case MORE:
539 return Boolean.valueOf(isMore());
540
541 }
542 throw new IllegalStateException();
543 }
544
545 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
546 public boolean isSet(_Fields field) {
547 if (field == null) {
548 throw new IllegalArgumentException();
549 }
550
551 switch (field) {
552 case RESULTS:
553 return isSetResults();
554 case FAILURES:
555 return isSetFailures();
556 case FULL_SCANS:
557 return isSetFullScans();
558 case PART_SCAN:
559 return isSetPartScan();
560 case PART_NEXT_KEY:
561 return isSetPartNextKey();
562 case PART_NEXT_KEY_INCLUSIVE:
563 return isSetPartNextKeyInclusive();
564 case MORE:
565 return isSetMore();
566 }
567 throw new IllegalStateException();
568 }
569
570 @Override
571 public boolean equals(Object that) {
572 if (that == null)
573 return false;
574 if (that instanceof MultiScanResult)
575 return this.equals((MultiScanResult)that);
576 return false;
577 }
578
579 public boolean equals(MultiScanResult that) {
580 if (that == null)
581 return false;
582
583 boolean this_present_results = true && this.isSetResults();
584 boolean that_present_results = true && that.isSetResults();
585 if (this_present_results || that_present_results) {
586 if (!(this_present_results && that_present_results))
587 return false;
588 if (!this.results.equals(that.results))
589 return false;
590 }
591
592 boolean this_present_failures = true && this.isSetFailures();
593 boolean that_present_failures = true && that.isSetFailures();
594 if (this_present_failures || that_present_failures) {
595 if (!(this_present_failures && that_present_failures))
596 return false;
597 if (!this.failures.equals(that.failures))
598 return false;
599 }
600
601 boolean this_present_fullScans = true && this.isSetFullScans();
602 boolean that_present_fullScans = true && that.isSetFullScans();
603 if (this_present_fullScans || that_present_fullScans) {
604 if (!(this_present_fullScans && that_present_fullScans))
605 return false;
606 if (!this.fullScans.equals(that.fullScans))
607 return false;
608 }
609
610 boolean this_present_partScan = true && this.isSetPartScan();
611 boolean that_present_partScan = true && that.isSetPartScan();
612 if (this_present_partScan || that_present_partScan) {
613 if (!(this_present_partScan && that_present_partScan))
614 return false;
615 if (!this.partScan.equals(that.partScan))
616 return false;
617 }
618
619 boolean this_present_partNextKey = true && this.isSetPartNextKey();
620 boolean that_present_partNextKey = true && that.isSetPartNextKey();
621 if (this_present_partNextKey || that_present_partNextKey) {
622 if (!(this_present_partNextKey && that_present_partNextKey))
623 return false;
624 if (!this.partNextKey.equals(that.partNextKey))
625 return false;
626 }
627
628 boolean this_present_partNextKeyInclusive = true;
629 boolean that_present_partNextKeyInclusive = true;
630 if (this_present_partNextKeyInclusive || that_present_partNextKeyInclusive) {
631 if (!(this_present_partNextKeyInclusive && that_present_partNextKeyInclusive))
632 return false;
633 if (this.partNextKeyInclusive != that.partNextKeyInclusive)
634 return false;
635 }
636
637 boolean this_present_more = true;
638 boolean that_present_more = true;
639 if (this_present_more || that_present_more) {
640 if (!(this_present_more && that_present_more))
641 return false;
642 if (this.more != that.more)
643 return false;
644 }
645
646 return true;
647 }
648
649 @Override
650 public int hashCode() {
651 return 0;
652 }
653
654 public int compareTo(MultiScanResult other) {
655 if (!getClass().equals(other.getClass())) {
656 return getClass().getName().compareTo(other.getClass().getName());
657 }
658
659 int lastComparison = 0;
660 MultiScanResult typedOther = (MultiScanResult)other;
661
662 lastComparison = Boolean.valueOf(isSetResults()).compareTo(typedOther.isSetResults());
663 if (lastComparison != 0) {
664 return lastComparison;
665 }
666 if (isSetResults()) {
667 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.results, typedOther.results);
668 if (lastComparison != 0) {
669 return lastComparison;
670 }
671 }
672 lastComparison = Boolean.valueOf(isSetFailures()).compareTo(typedOther.isSetFailures());
673 if (lastComparison != 0) {
674 return lastComparison;
675 }
676 if (isSetFailures()) {
677 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failures, typedOther.failures);
678 if (lastComparison != 0) {
679 return lastComparison;
680 }
681 }
682 lastComparison = Boolean.valueOf(isSetFullScans()).compareTo(typedOther.isSetFullScans());
683 if (lastComparison != 0) {
684 return lastComparison;
685 }
686 if (isSetFullScans()) {
687 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullScans, typedOther.fullScans);
688 if (lastComparison != 0) {
689 return lastComparison;
690 }
691 }
692 lastComparison = Boolean.valueOf(isSetPartScan()).compareTo(typedOther.isSetPartScan());
693 if (lastComparison != 0) {
694 return lastComparison;
695 }
696 if (isSetPartScan()) {
697 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partScan, typedOther.partScan);
698 if (lastComparison != 0) {
699 return lastComparison;
700 }
701 }
702 lastComparison = Boolean.valueOf(isSetPartNextKey()).compareTo(typedOther.isSetPartNextKey());
703 if (lastComparison != 0) {
704 return lastComparison;
705 }
706 if (isSetPartNextKey()) {
707 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNextKey, typedOther.partNextKey);
708 if (lastComparison != 0) {
709 return lastComparison;
710 }
711 }
712 lastComparison = Boolean.valueOf(isSetPartNextKeyInclusive()).compareTo(typedOther.isSetPartNextKeyInclusive());
713 if (lastComparison != 0) {
714 return lastComparison;
715 }
716 if (isSetPartNextKeyInclusive()) {
717 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNextKeyInclusive, typedOther.partNextKeyInclusive);
718 if (lastComparison != 0) {
719 return lastComparison;
720 }
721 }
722 lastComparison = Boolean.valueOf(isSetMore()).compareTo(typedOther.isSetMore());
723 if (lastComparison != 0) {
724 return lastComparison;
725 }
726 if (isSetMore()) {
727 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.more, typedOther.more);
728 if (lastComparison != 0) {
729 return lastComparison;
730 }
731 }
732 return 0;
733 }
734
735 public _Fields fieldForId(int fieldId) {
736 return _Fields.findByThriftId(fieldId);
737 }
738
739 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
740 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
741 }
742
743 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
744 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
745 }
746
747 @Override
748 public String toString() {
749 StringBuilder sb = new StringBuilder("MultiScanResult(");
750 boolean first = true;
751
752 sb.append("results:");
753 if (this.results == null) {
754 sb.append("null");
755 } else {
756 sb.append(this.results);
757 }
758 first = false;
759 if (!first) sb.append(", ");
760 sb.append("failures:");
761 if (this.failures == null) {
762 sb.append("null");
763 } else {
764 sb.append(this.failures);
765 }
766 first = false;
767 if (!first) sb.append(", ");
768 sb.append("fullScans:");
769 if (this.fullScans == null) {
770 sb.append("null");
771 } else {
772 sb.append(this.fullScans);
773 }
774 first = false;
775 if (!first) sb.append(", ");
776 sb.append("partScan:");
777 if (this.partScan == null) {
778 sb.append("null");
779 } else {
780 sb.append(this.partScan);
781 }
782 first = false;
783 if (!first) sb.append(", ");
784 sb.append("partNextKey:");
785 if (this.partNextKey == null) {
786 sb.append("null");
787 } else {
788 sb.append(this.partNextKey);
789 }
790 first = false;
791 if (!first) sb.append(", ");
792 sb.append("partNextKeyInclusive:");
793 sb.append(this.partNextKeyInclusive);
794 first = false;
795 if (!first) sb.append(", ");
796 sb.append("more:");
797 sb.append(this.more);
798 first = false;
799 sb.append(")");
800 return sb.toString();
801 }
802
803 public void validate() throws org.apache.thrift.TException {
804
805
806 if (partScan != null) {
807 partScan.validate();
808 }
809 if (partNextKey != null) {
810 partNextKey.validate();
811 }
812 }
813
814 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
815 try {
816 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
817 } catch (org.apache.thrift.TException te) {
818 throw new java.io.IOException(te);
819 }
820 }
821
822 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
823 try {
824
825 __isset_bitfield = 0;
826 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
827 } catch (org.apache.thrift.TException te) {
828 throw new java.io.IOException(te);
829 }
830 }
831
832 private static class MultiScanResultStandardSchemeFactory implements SchemeFactory {
833 public MultiScanResultStandardScheme getScheme() {
834 return new MultiScanResultStandardScheme();
835 }
836 }
837
838 private static class MultiScanResultStandardScheme extends StandardScheme<MultiScanResult> {
839
840 public void read(org.apache.thrift.protocol.TProtocol iprot, MultiScanResult struct) throws org.apache.thrift.TException {
841 org.apache.thrift.protocol.TField schemeField;
842 iprot.readStructBegin();
843 while (true)
844 {
845 schemeField = iprot.readFieldBegin();
846 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
847 break;
848 }
849 switch (schemeField.id) {
850 case 1:
851 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
852 {
853 org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
854 struct.results = new ArrayList<TKeyValue>(_list16.size);
855 for (int _i17 = 0; _i17 < _list16.size; ++_i17)
856 {
857 TKeyValue _elem18;
858 _elem18 = new TKeyValue();
859 _elem18.read(iprot);
860 struct.results.add(_elem18);
861 }
862 iprot.readListEnd();
863 }
864 struct.setResultsIsSet(true);
865 } else {
866 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
867 }
868 break;
869 case 2:
870 if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
871 {
872 org.apache.thrift.protocol.TMap _map19 = iprot.readMapBegin();
873 struct.failures = new HashMap<TKeyExtent,List<TRange>>(2*_map19.size);
874 for (int _i20 = 0; _i20 < _map19.size; ++_i20)
875 {
876 TKeyExtent _key21;
877 List<TRange> _val22;
878 _key21 = new TKeyExtent();
879 _key21.read(iprot);
880 {
881 org.apache.thrift.protocol.TList _list23 = iprot.readListBegin();
882 _val22 = new ArrayList<TRange>(_list23.size);
883 for (int _i24 = 0; _i24 < _list23.size; ++_i24)
884 {
885 TRange _elem25;
886 _elem25 = new TRange();
887 _elem25.read(iprot);
888 _val22.add(_elem25);
889 }
890 iprot.readListEnd();
891 }
892 struct.failures.put(_key21, _val22);
893 }
894 iprot.readMapEnd();
895 }
896 struct.setFailuresIsSet(true);
897 } else {
898 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
899 }
900 break;
901 case 3:
902 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
903 {
904 org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
905 struct.fullScans = new ArrayList<TKeyExtent>(_list26.size);
906 for (int _i27 = 0; _i27 < _list26.size; ++_i27)
907 {
908 TKeyExtent _elem28;
909 _elem28 = new TKeyExtent();
910 _elem28.read(iprot);
911 struct.fullScans.add(_elem28);
912 }
913 iprot.readListEnd();
914 }
915 struct.setFullScansIsSet(true);
916 } else {
917 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
918 }
919 break;
920 case 4:
921 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
922 struct.partScan = new TKeyExtent();
923 struct.partScan.read(iprot);
924 struct.setPartScanIsSet(true);
925 } else {
926 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
927 }
928 break;
929 case 5:
930 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
931 struct.partNextKey = new TKey();
932 struct.partNextKey.read(iprot);
933 struct.setPartNextKeyIsSet(true);
934 } else {
935 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
936 }
937 break;
938 case 6:
939 if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
940 struct.partNextKeyInclusive = iprot.readBool();
941 struct.setPartNextKeyInclusiveIsSet(true);
942 } else {
943 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
944 }
945 break;
946 case 7:
947 if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
948 struct.more = iprot.readBool();
949 struct.setMoreIsSet(true);
950 } else {
951 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
952 }
953 break;
954 default:
955 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
956 }
957 iprot.readFieldEnd();
958 }
959 iprot.readStructEnd();
960
961
962 struct.validate();
963 }
964
965 public void write(org.apache.thrift.protocol.TProtocol oprot, MultiScanResult struct) throws org.apache.thrift.TException {
966 struct.validate();
967
968 oprot.writeStructBegin(STRUCT_DESC);
969 if (struct.results != null) {
970 oprot.writeFieldBegin(RESULTS_FIELD_DESC);
971 {
972 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.results.size()));
973 for (TKeyValue _iter29 : struct.results)
974 {
975 _iter29.write(oprot);
976 }
977 oprot.writeListEnd();
978 }
979 oprot.writeFieldEnd();
980 }
981 if (struct.failures != null) {
982 oprot.writeFieldBegin(FAILURES_FIELD_DESC);
983 {
984 oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.LIST, struct.failures.size()));
985 for (Map.Entry<TKeyExtent, List<TRange>> _iter30 : struct.failures.entrySet())
986 {
987 _iter30.getKey().write(oprot);
988 {
989 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter30.getValue().size()));
990 for (TRange _iter31 : _iter30.getValue())
991 {
992 _iter31.write(oprot);
993 }
994 oprot.writeListEnd();
995 }
996 }
997 oprot.writeMapEnd();
998 }
999 oprot.writeFieldEnd();
1000 }
1001 if (struct.fullScans != null) {
1002 oprot.writeFieldBegin(FULL_SCANS_FIELD_DESC);
1003 {
1004 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fullScans.size()));
1005 for (TKeyExtent _iter32 : struct.fullScans)
1006 {
1007 _iter32.write(oprot);
1008 }
1009 oprot.writeListEnd();
1010 }
1011 oprot.writeFieldEnd();
1012 }
1013 if (struct.partScan != null) {
1014 oprot.writeFieldBegin(PART_SCAN_FIELD_DESC);
1015 struct.partScan.write(oprot);
1016 oprot.writeFieldEnd();
1017 }
1018 if (struct.partNextKey != null) {
1019 oprot.writeFieldBegin(PART_NEXT_KEY_FIELD_DESC);
1020 struct.partNextKey.write(oprot);
1021 oprot.writeFieldEnd();
1022 }
1023 oprot.writeFieldBegin(PART_NEXT_KEY_INCLUSIVE_FIELD_DESC);
1024 oprot.writeBool(struct.partNextKeyInclusive);
1025 oprot.writeFieldEnd();
1026 oprot.writeFieldBegin(MORE_FIELD_DESC);
1027 oprot.writeBool(struct.more);
1028 oprot.writeFieldEnd();
1029 oprot.writeFieldStop();
1030 oprot.writeStructEnd();
1031 }
1032
1033 }
1034
1035 private static class MultiScanResultTupleSchemeFactory implements SchemeFactory {
1036 public MultiScanResultTupleScheme getScheme() {
1037 return new MultiScanResultTupleScheme();
1038 }
1039 }
1040
1041 private static class MultiScanResultTupleScheme extends TupleScheme<MultiScanResult> {
1042
1043 @Override
1044 public void write(org.apache.thrift.protocol.TProtocol prot, MultiScanResult struct) throws org.apache.thrift.TException {
1045 TTupleProtocol oprot = (TTupleProtocol) prot;
1046 BitSet optionals = new BitSet();
1047 if (struct.isSetResults()) {
1048 optionals.set(0);
1049 }
1050 if (struct.isSetFailures()) {
1051 optionals.set(1);
1052 }
1053 if (struct.isSetFullScans()) {
1054 optionals.set(2);
1055 }
1056 if (struct.isSetPartScan()) {
1057 optionals.set(3);
1058 }
1059 if (struct.isSetPartNextKey()) {
1060 optionals.set(4);
1061 }
1062 if (struct.isSetPartNextKeyInclusive()) {
1063 optionals.set(5);
1064 }
1065 if (struct.isSetMore()) {
1066 optionals.set(6);
1067 }
1068 oprot.writeBitSet(optionals, 7);
1069 if (struct.isSetResults()) {
1070 {
1071 oprot.writeI32(struct.results.size());
1072 for (TKeyValue _iter33 : struct.results)
1073 {
1074 _iter33.write(oprot);
1075 }
1076 }
1077 }
1078 if (struct.isSetFailures()) {
1079 {
1080 oprot.writeI32(struct.failures.size());
1081 for (Map.Entry<TKeyExtent, List<TRange>> _iter34 : struct.failures.entrySet())
1082 {
1083 _iter34.getKey().write(oprot);
1084 {
1085 oprot.writeI32(_iter34.getValue().size());
1086 for (TRange _iter35 : _iter34.getValue())
1087 {
1088 _iter35.write(oprot);
1089 }
1090 }
1091 }
1092 }
1093 }
1094 if (struct.isSetFullScans()) {
1095 {
1096 oprot.writeI32(struct.fullScans.size());
1097 for (TKeyExtent _iter36 : struct.fullScans)
1098 {
1099 _iter36.write(oprot);
1100 }
1101 }
1102 }
1103 if (struct.isSetPartScan()) {
1104 struct.partScan.write(oprot);
1105 }
1106 if (struct.isSetPartNextKey()) {
1107 struct.partNextKey.write(oprot);
1108 }
1109 if (struct.isSetPartNextKeyInclusive()) {
1110 oprot.writeBool(struct.partNextKeyInclusive);
1111 }
1112 if (struct.isSetMore()) {
1113 oprot.writeBool(struct.more);
1114 }
1115 }
1116
1117 @Override
1118 public void read(org.apache.thrift.protocol.TProtocol prot, MultiScanResult struct) throws org.apache.thrift.TException {
1119 TTupleProtocol iprot = (TTupleProtocol) prot;
1120 BitSet incoming = iprot.readBitSet(7);
1121 if (incoming.get(0)) {
1122 {
1123 org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
1124 struct.results = new ArrayList<TKeyValue>(_list37.size);
1125 for (int _i38 = 0; _i38 < _list37.size; ++_i38)
1126 {
1127 TKeyValue _elem39;
1128 _elem39 = new TKeyValue();
1129 _elem39.read(iprot);
1130 struct.results.add(_elem39);
1131 }
1132 }
1133 struct.setResultsIsSet(true);
1134 }
1135 if (incoming.get(1)) {
1136 {
1137 org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
1138 struct.failures = new HashMap<TKeyExtent,List<TRange>>(2*_map40.size);
1139 for (int _i41 = 0; _i41 < _map40.size; ++_i41)
1140 {
1141 TKeyExtent _key42;
1142 List<TRange> _val43;
1143 _key42 = new TKeyExtent();
1144 _key42.read(iprot);
1145 {
1146 org.apache.thrift.protocol.TList _list44 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
1147 _val43 = new ArrayList<TRange>(_list44.size);
1148 for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1149 {
1150 TRange _elem46;
1151 _elem46 = new TRange();
1152 _elem46.read(iprot);
1153 _val43.add(_elem46);
1154 }
1155 }
1156 struct.failures.put(_key42, _val43);
1157 }
1158 }
1159 struct.setFailuresIsSet(true);
1160 }
1161 if (incoming.get(2)) {
1162 {
1163 org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
1164 struct.fullScans = new ArrayList<TKeyExtent>(_list47.size);
1165 for (int _i48 = 0; _i48 < _list47.size; ++_i48)
1166 {
1167 TKeyExtent _elem49;
1168 _elem49 = new TKeyExtent();
1169 _elem49.read(iprot);
1170 struct.fullScans.add(_elem49);
1171 }
1172 }
1173 struct.setFullScansIsSet(true);
1174 }
1175 if (incoming.get(3)) {
1176 struct.partScan = new TKeyExtent();
1177 struct.partScan.read(iprot);
1178 struct.setPartScanIsSet(true);
1179 }
1180 if (incoming.get(4)) {
1181 struct.partNextKey = new TKey();
1182 struct.partNextKey.read(iprot);
1183 struct.setPartNextKeyIsSet(true);
1184 }
1185 if (incoming.get(5)) {
1186 struct.partNextKeyInclusive = iprot.readBool();
1187 struct.setPartNextKeyInclusiveIsSet(true);
1188 }
1189 if (incoming.get(6)) {
1190 struct.more = iprot.readBool();
1191 struct.setMoreIsSet(true);
1192 }
1193 }
1194 }
1195
1196 }
1197