View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
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.tabletserver.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 ActionStats implements org.apache.thrift.TBase<ActionStats, ActionStats._Fields>, java.io.Serializable, Cloneable {
50    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ActionStats");
51  
52    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)1);
53    private static final org.apache.thrift.protocol.TField ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsed", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
54    private static final org.apache.thrift.protocol.TField NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("num", org.apache.thrift.protocol.TType.I32, (short)3);
55    private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I64, (short)4);
56    private static final org.apache.thrift.protocol.TField SUM_DEV_FIELD_DESC = new org.apache.thrift.protocol.TField("sumDev", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
57    private static final org.apache.thrift.protocol.TField FAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("fail", org.apache.thrift.protocol.TType.I32, (short)6);
58    private static final org.apache.thrift.protocol.TField QUEUE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueTime", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
59    private static final org.apache.thrift.protocol.TField QUEUE_SUM_DEV_FIELD_DESC = new org.apache.thrift.protocol.TField("queueSumDev", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
60  
61    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
62    static {
63      schemes.put(StandardScheme.class, new ActionStatsStandardSchemeFactory());
64      schemes.put(TupleScheme.class, new ActionStatsTupleSchemeFactory());
65    }
66  
67    public int status; // required
68    public double elapsed; // required
69    public int num; // required
70    public long count; // required
71    public double sumDev; // required
72    public int fail; // required
73    public double queueTime; // required
74    public double queueSumDev; // required
75  
76    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
77    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
78      STATUS((short)1, "status"),
79      ELAPSED((short)2, "elapsed"),
80      NUM((short)3, "num"),
81      COUNT((short)4, "count"),
82      SUM_DEV((short)5, "sumDev"),
83      FAIL((short)6, "fail"),
84      QUEUE_TIME((short)7, "queueTime"),
85      QUEUE_SUM_DEV((short)8, "queueSumDev");
86  
87      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
88  
89      static {
90        for (_Fields field : EnumSet.allOf(_Fields.class)) {
91          byName.put(field.getFieldName(), field);
92        }
93      }
94  
95      /**
96       * Find the _Fields constant that matches fieldId, or null if its not found.
97       */
98      public static _Fields findByThriftId(int fieldId) {
99        switch(fieldId) {
100         case 1: // STATUS
101           return STATUS;
102         case 2: // ELAPSED
103           return ELAPSED;
104         case 3: // NUM
105           return NUM;
106         case 4: // COUNT
107           return COUNT;
108         case 5: // SUM_DEV
109           return SUM_DEV;
110         case 6: // FAIL
111           return FAIL;
112         case 7: // QUEUE_TIME
113           return QUEUE_TIME;
114         case 8: // QUEUE_SUM_DEV
115           return QUEUE_SUM_DEV;
116         default:
117           return null;
118       }
119     }
120 
121     /**
122      * Find the _Fields constant that matches fieldId, throwing an exception
123      * if it is not found.
124      */
125     public static _Fields findByThriftIdOrThrow(int fieldId) {
126       _Fields fields = findByThriftId(fieldId);
127       if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
128       return fields;
129     }
130 
131     /**
132      * Find the _Fields constant that matches name, or null if its not found.
133      */
134     public static _Fields findByName(String name) {
135       return byName.get(name);
136     }
137 
138     private final short _thriftId;
139     private final String _fieldName;
140 
141     _Fields(short thriftId, String fieldName) {
142       _thriftId = thriftId;
143       _fieldName = fieldName;
144     }
145 
146     public short getThriftFieldId() {
147       return _thriftId;
148     }
149 
150     public String getFieldName() {
151       return _fieldName;
152     }
153   }
154 
155   // isset id assignments
156   private static final int __STATUS_ISSET_ID = 0;
157   private static final int __ELAPSED_ISSET_ID = 1;
158   private static final int __NUM_ISSET_ID = 2;
159   private static final int __COUNT_ISSET_ID = 3;
160   private static final int __SUMDEV_ISSET_ID = 4;
161   private static final int __FAIL_ISSET_ID = 5;
162   private static final int __QUEUETIME_ISSET_ID = 6;
163   private static final int __QUEUESUMDEV_ISSET_ID = 7;
164   private byte __isset_bitfield = 0;
165   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
166   static {
167     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
168     tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
169         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
170     tmpMap.put(_Fields.ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("elapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
171         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
172     tmpMap.put(_Fields.NUM, new org.apache.thrift.meta_data.FieldMetaData("num", org.apache.thrift.TFieldRequirementType.DEFAULT, 
173         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
174     tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.DEFAULT, 
175         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
176     tmpMap.put(_Fields.SUM_DEV, new org.apache.thrift.meta_data.FieldMetaData("sumDev", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
178     tmpMap.put(_Fields.FAIL, new org.apache.thrift.meta_data.FieldMetaData("fail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
179         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
180     tmpMap.put(_Fields.QUEUE_TIME, new org.apache.thrift.meta_data.FieldMetaData("queueTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
182     tmpMap.put(_Fields.QUEUE_SUM_DEV, new org.apache.thrift.meta_data.FieldMetaData("queueSumDev", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
184     metaDataMap = Collections.unmodifiableMap(tmpMap);
185     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ActionStats.class, metaDataMap);
186   }
187 
188   public ActionStats() {
189   }
190 
191   public ActionStats(
192     int status,
193     double elapsed,
194     int num,
195     long count,
196     double sumDev,
197     int fail,
198     double queueTime,
199     double queueSumDev)
200   {
201     this();
202     this.status = status;
203     setStatusIsSet(true);
204     this.elapsed = elapsed;
205     setElapsedIsSet(true);
206     this.num = num;
207     setNumIsSet(true);
208     this.count = count;
209     setCountIsSet(true);
210     this.sumDev = sumDev;
211     setSumDevIsSet(true);
212     this.fail = fail;
213     setFailIsSet(true);
214     this.queueTime = queueTime;
215     setQueueTimeIsSet(true);
216     this.queueSumDev = queueSumDev;
217     setQueueSumDevIsSet(true);
218   }
219 
220   /**
221    * Performs a deep copy on <i>other</i>.
222    */
223   public ActionStats(ActionStats other) {
224     __isset_bitfield = other.__isset_bitfield;
225     this.status = other.status;
226     this.elapsed = other.elapsed;
227     this.num = other.num;
228     this.count = other.count;
229     this.sumDev = other.sumDev;
230     this.fail = other.fail;
231     this.queueTime = other.queueTime;
232     this.queueSumDev = other.queueSumDev;
233   }
234 
235   public ActionStats deepCopy() {
236     return new ActionStats(this);
237   }
238 
239   @Override
240   public void clear() {
241     setStatusIsSet(false);
242     this.status = 0;
243     setElapsedIsSet(false);
244     this.elapsed = 0.0;
245     setNumIsSet(false);
246     this.num = 0;
247     setCountIsSet(false);
248     this.count = 0;
249     setSumDevIsSet(false);
250     this.sumDev = 0.0;
251     setFailIsSet(false);
252     this.fail = 0;
253     setQueueTimeIsSet(false);
254     this.queueTime = 0.0;
255     setQueueSumDevIsSet(false);
256     this.queueSumDev = 0.0;
257   }
258 
259   public int getStatus() {
260     return this.status;
261   }
262 
263   public ActionStats setStatus(int status) {
264     this.status = status;
265     setStatusIsSet(true);
266     return this;
267   }
268 
269   public void unsetStatus() {
270     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STATUS_ISSET_ID);
271   }
272 
273   /** Returns true if field status is set (has been assigned a value) and false otherwise */
274   public boolean isSetStatus() {
275     return EncodingUtils.testBit(__isset_bitfield, __STATUS_ISSET_ID);
276   }
277 
278   public void setStatusIsSet(boolean value) {
279     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STATUS_ISSET_ID, value);
280   }
281 
282   public double getElapsed() {
283     return this.elapsed;
284   }
285 
286   public ActionStats setElapsed(double elapsed) {
287     this.elapsed = elapsed;
288     setElapsedIsSet(true);
289     return this;
290   }
291 
292   public void unsetElapsed() {
293     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_ISSET_ID);
294   }
295 
296   /** Returns true if field elapsed is set (has been assigned a value) and false otherwise */
297   public boolean isSetElapsed() {
298     return EncodingUtils.testBit(__isset_bitfield, __ELAPSED_ISSET_ID);
299   }
300 
301   public void setElapsedIsSet(boolean value) {
302     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ELAPSED_ISSET_ID, value);
303   }
304 
305   public int getNum() {
306     return this.num;
307   }
308 
309   public ActionStats setNum(int num) {
310     this.num = num;
311     setNumIsSet(true);
312     return this;
313   }
314 
315   public void unsetNum() {
316     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_ISSET_ID);
317   }
318 
319   /** Returns true if field num is set (has been assigned a value) and false otherwise */
320   public boolean isSetNum() {
321     return EncodingUtils.testBit(__isset_bitfield, __NUM_ISSET_ID);
322   }
323 
324   public void setNumIsSet(boolean value) {
325     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_ISSET_ID, value);
326   }
327 
328   public long getCount() {
329     return this.count;
330   }
331 
332   public ActionStats setCount(long count) {
333     this.count = count;
334     setCountIsSet(true);
335     return this;
336   }
337 
338   public void unsetCount() {
339     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
340   }
341 
342   /** Returns true if field count is set (has been assigned a value) and false otherwise */
343   public boolean isSetCount() {
344     return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
345   }
346 
347   public void setCountIsSet(boolean value) {
348     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
349   }
350 
351   public double getSumDev() {
352     return this.sumDev;
353   }
354 
355   public ActionStats setSumDev(double sumDev) {
356     this.sumDev = sumDev;
357     setSumDevIsSet(true);
358     return this;
359   }
360 
361   public void unsetSumDev() {
362     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUMDEV_ISSET_ID);
363   }
364 
365   /** Returns true if field sumDev is set (has been assigned a value) and false otherwise */
366   public boolean isSetSumDev() {
367     return EncodingUtils.testBit(__isset_bitfield, __SUMDEV_ISSET_ID);
368   }
369 
370   public void setSumDevIsSet(boolean value) {
371     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUMDEV_ISSET_ID, value);
372   }
373 
374   public int getFail() {
375     return this.fail;
376   }
377 
378   public ActionStats setFail(int fail) {
379     this.fail = fail;
380     setFailIsSet(true);
381     return this;
382   }
383 
384   public void unsetFail() {
385     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FAIL_ISSET_ID);
386   }
387 
388   /** Returns true if field fail is set (has been assigned a value) and false otherwise */
389   public boolean isSetFail() {
390     return EncodingUtils.testBit(__isset_bitfield, __FAIL_ISSET_ID);
391   }
392 
393   public void setFailIsSet(boolean value) {
394     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FAIL_ISSET_ID, value);
395   }
396 
397   public double getQueueTime() {
398     return this.queueTime;
399   }
400 
401   public ActionStats setQueueTime(double queueTime) {
402     this.queueTime = queueTime;
403     setQueueTimeIsSet(true);
404     return this;
405   }
406 
407   public void unsetQueueTime() {
408     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUEUETIME_ISSET_ID);
409   }
410 
411   /** Returns true if field queueTime is set (has been assigned a value) and false otherwise */
412   public boolean isSetQueueTime() {
413     return EncodingUtils.testBit(__isset_bitfield, __QUEUETIME_ISSET_ID);
414   }
415 
416   public void setQueueTimeIsSet(boolean value) {
417     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUEUETIME_ISSET_ID, value);
418   }
419 
420   public double getQueueSumDev() {
421     return this.queueSumDev;
422   }
423 
424   public ActionStats setQueueSumDev(double queueSumDev) {
425     this.queueSumDev = queueSumDev;
426     setQueueSumDevIsSet(true);
427     return this;
428   }
429 
430   public void unsetQueueSumDev() {
431     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID);
432   }
433 
434   /** Returns true if field queueSumDev is set (has been assigned a value) and false otherwise */
435   public boolean isSetQueueSumDev() {
436     return EncodingUtils.testBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID);
437   }
438 
439   public void setQueueSumDevIsSet(boolean value) {
440     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID, value);
441   }
442 
443   public void setFieldValue(_Fields field, Object value) {
444     switch (field) {
445     case STATUS:
446       if (value == null) {
447         unsetStatus();
448       } else {
449         setStatus((Integer)value);
450       }
451       break;
452 
453     case ELAPSED:
454       if (value == null) {
455         unsetElapsed();
456       } else {
457         setElapsed((Double)value);
458       }
459       break;
460 
461     case NUM:
462       if (value == null) {
463         unsetNum();
464       } else {
465         setNum((Integer)value);
466       }
467       break;
468 
469     case COUNT:
470       if (value == null) {
471         unsetCount();
472       } else {
473         setCount((Long)value);
474       }
475       break;
476 
477     case SUM_DEV:
478       if (value == null) {
479         unsetSumDev();
480       } else {
481         setSumDev((Double)value);
482       }
483       break;
484 
485     case FAIL:
486       if (value == null) {
487         unsetFail();
488       } else {
489         setFail((Integer)value);
490       }
491       break;
492 
493     case QUEUE_TIME:
494       if (value == null) {
495         unsetQueueTime();
496       } else {
497         setQueueTime((Double)value);
498       }
499       break;
500 
501     case QUEUE_SUM_DEV:
502       if (value == null) {
503         unsetQueueSumDev();
504       } else {
505         setQueueSumDev((Double)value);
506       }
507       break;
508 
509     }
510   }
511 
512   public Object getFieldValue(_Fields field) {
513     switch (field) {
514     case STATUS:
515       return Integer.valueOf(getStatus());
516 
517     case ELAPSED:
518       return Double.valueOf(getElapsed());
519 
520     case NUM:
521       return Integer.valueOf(getNum());
522 
523     case COUNT:
524       return Long.valueOf(getCount());
525 
526     case SUM_DEV:
527       return Double.valueOf(getSumDev());
528 
529     case FAIL:
530       return Integer.valueOf(getFail());
531 
532     case QUEUE_TIME:
533       return Double.valueOf(getQueueTime());
534 
535     case QUEUE_SUM_DEV:
536       return Double.valueOf(getQueueSumDev());
537 
538     }
539     throw new IllegalStateException();
540   }
541 
542   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
543   public boolean isSet(_Fields field) {
544     if (field == null) {
545       throw new IllegalArgumentException();
546     }
547 
548     switch (field) {
549     case STATUS:
550       return isSetStatus();
551     case ELAPSED:
552       return isSetElapsed();
553     case NUM:
554       return isSetNum();
555     case COUNT:
556       return isSetCount();
557     case SUM_DEV:
558       return isSetSumDev();
559     case FAIL:
560       return isSetFail();
561     case QUEUE_TIME:
562       return isSetQueueTime();
563     case QUEUE_SUM_DEV:
564       return isSetQueueSumDev();
565     }
566     throw new IllegalStateException();
567   }
568 
569   @Override
570   public boolean equals(Object that) {
571     if (that == null)
572       return false;
573     if (that instanceof ActionStats)
574       return this.equals((ActionStats)that);
575     return false;
576   }
577 
578   public boolean equals(ActionStats that) {
579     if (that == null)
580       return false;
581 
582     boolean this_present_status = true;
583     boolean that_present_status = true;
584     if (this_present_status || that_present_status) {
585       if (!(this_present_status && that_present_status))
586         return false;
587       if (this.status != that.status)
588         return false;
589     }
590 
591     boolean this_present_elapsed = true;
592     boolean that_present_elapsed = true;
593     if (this_present_elapsed || that_present_elapsed) {
594       if (!(this_present_elapsed && that_present_elapsed))
595         return false;
596       if (this.elapsed != that.elapsed)
597         return false;
598     }
599 
600     boolean this_present_num = true;
601     boolean that_present_num = true;
602     if (this_present_num || that_present_num) {
603       if (!(this_present_num && that_present_num))
604         return false;
605       if (this.num != that.num)
606         return false;
607     }
608 
609     boolean this_present_count = true;
610     boolean that_present_count = true;
611     if (this_present_count || that_present_count) {
612       if (!(this_present_count && that_present_count))
613         return false;
614       if (this.count != that.count)
615         return false;
616     }
617 
618     boolean this_present_sumDev = true;
619     boolean that_present_sumDev = true;
620     if (this_present_sumDev || that_present_sumDev) {
621       if (!(this_present_sumDev && that_present_sumDev))
622         return false;
623       if (this.sumDev != that.sumDev)
624         return false;
625     }
626 
627     boolean this_present_fail = true;
628     boolean that_present_fail = true;
629     if (this_present_fail || that_present_fail) {
630       if (!(this_present_fail && that_present_fail))
631         return false;
632       if (this.fail != that.fail)
633         return false;
634     }
635 
636     boolean this_present_queueTime = true;
637     boolean that_present_queueTime = true;
638     if (this_present_queueTime || that_present_queueTime) {
639       if (!(this_present_queueTime && that_present_queueTime))
640         return false;
641       if (this.queueTime != that.queueTime)
642         return false;
643     }
644 
645     boolean this_present_queueSumDev = true;
646     boolean that_present_queueSumDev = true;
647     if (this_present_queueSumDev || that_present_queueSumDev) {
648       if (!(this_present_queueSumDev && that_present_queueSumDev))
649         return false;
650       if (this.queueSumDev != that.queueSumDev)
651         return false;
652     }
653 
654     return true;
655   }
656 
657   @Override
658   public int hashCode() {
659     return 0;
660   }
661 
662   public int compareTo(ActionStats other) {
663     if (!getClass().equals(other.getClass())) {
664       return getClass().getName().compareTo(other.getClass().getName());
665     }
666 
667     int lastComparison = 0;
668     ActionStats typedOther = (ActionStats)other;
669 
670     lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
671     if (lastComparison != 0) {
672       return lastComparison;
673     }
674     if (isSetStatus()) {
675       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
676       if (lastComparison != 0) {
677         return lastComparison;
678       }
679     }
680     lastComparison = Boolean.valueOf(isSetElapsed()).compareTo(typedOther.isSetElapsed());
681     if (lastComparison != 0) {
682       return lastComparison;
683     }
684     if (isSetElapsed()) {
685       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsed, typedOther.elapsed);
686       if (lastComparison != 0) {
687         return lastComparison;
688       }
689     }
690     lastComparison = Boolean.valueOf(isSetNum()).compareTo(typedOther.isSetNum());
691     if (lastComparison != 0) {
692       return lastComparison;
693     }
694     if (isSetNum()) {
695       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num, typedOther.num);
696       if (lastComparison != 0) {
697         return lastComparison;
698       }
699     }
700     lastComparison = Boolean.valueOf(isSetCount()).compareTo(typedOther.isSetCount());
701     if (lastComparison != 0) {
702       return lastComparison;
703     }
704     if (isSetCount()) {
705       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, typedOther.count);
706       if (lastComparison != 0) {
707         return lastComparison;
708       }
709     }
710     lastComparison = Boolean.valueOf(isSetSumDev()).compareTo(typedOther.isSetSumDev());
711     if (lastComparison != 0) {
712       return lastComparison;
713     }
714     if (isSetSumDev()) {
715       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sumDev, typedOther.sumDev);
716       if (lastComparison != 0) {
717         return lastComparison;
718       }
719     }
720     lastComparison = Boolean.valueOf(isSetFail()).compareTo(typedOther.isSetFail());
721     if (lastComparison != 0) {
722       return lastComparison;
723     }
724     if (isSetFail()) {
725       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fail, typedOther.fail);
726       if (lastComparison != 0) {
727         return lastComparison;
728       }
729     }
730     lastComparison = Boolean.valueOf(isSetQueueTime()).compareTo(typedOther.isSetQueueTime());
731     if (lastComparison != 0) {
732       return lastComparison;
733     }
734     if (isSetQueueTime()) {
735       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueTime, typedOther.queueTime);
736       if (lastComparison != 0) {
737         return lastComparison;
738       }
739     }
740     lastComparison = Boolean.valueOf(isSetQueueSumDev()).compareTo(typedOther.isSetQueueSumDev());
741     if (lastComparison != 0) {
742       return lastComparison;
743     }
744     if (isSetQueueSumDev()) {
745       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueSumDev, typedOther.queueSumDev);
746       if (lastComparison != 0) {
747         return lastComparison;
748       }
749     }
750     return 0;
751   }
752 
753   public _Fields fieldForId(int fieldId) {
754     return _Fields.findByThriftId(fieldId);
755   }
756 
757   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
758     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
759   }
760 
761   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
762     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
763   }
764 
765   @Override
766   public String toString() {
767     StringBuilder sb = new StringBuilder("ActionStats(");
768     boolean first = true;
769 
770     sb.append("status:");
771     sb.append(this.status);
772     first = false;
773     if (!first) sb.append(", ");
774     sb.append("elapsed:");
775     sb.append(this.elapsed);
776     first = false;
777     if (!first) sb.append(", ");
778     sb.append("num:");
779     sb.append(this.num);
780     first = false;
781     if (!first) sb.append(", ");
782     sb.append("count:");
783     sb.append(this.count);
784     first = false;
785     if (!first) sb.append(", ");
786     sb.append("sumDev:");
787     sb.append(this.sumDev);
788     first = false;
789     if (!first) sb.append(", ");
790     sb.append("fail:");
791     sb.append(this.fail);
792     first = false;
793     if (!first) sb.append(", ");
794     sb.append("queueTime:");
795     sb.append(this.queueTime);
796     first = false;
797     if (!first) sb.append(", ");
798     sb.append("queueSumDev:");
799     sb.append(this.queueSumDev);
800     first = false;
801     sb.append(")");
802     return sb.toString();
803   }
804 
805   public void validate() throws org.apache.thrift.TException {
806     // check for required fields
807     // check for sub-struct validity
808   }
809 
810   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
811     try {
812       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
813     } catch (org.apache.thrift.TException te) {
814       throw new java.io.IOException(te);
815     }
816   }
817 
818   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
819     try {
820       // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
821       __isset_bitfield = 0;
822       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
823     } catch (org.apache.thrift.TException te) {
824       throw new java.io.IOException(te);
825     }
826   }
827 
828   private static class ActionStatsStandardSchemeFactory implements SchemeFactory {
829     public ActionStatsStandardScheme getScheme() {
830       return new ActionStatsStandardScheme();
831     }
832   }
833 
834   private static class ActionStatsStandardScheme extends StandardScheme<ActionStats> {
835 
836     public void read(org.apache.thrift.protocol.TProtocol iprot, ActionStats struct) throws org.apache.thrift.TException {
837       org.apache.thrift.protocol.TField schemeField;
838       iprot.readStructBegin();
839       while (true)
840       {
841         schemeField = iprot.readFieldBegin();
842         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
843           break;
844         }
845         switch (schemeField.id) {
846           case 1: // STATUS
847             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
848               struct.status = iprot.readI32();
849               struct.setStatusIsSet(true);
850             } else { 
851               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
852             }
853             break;
854           case 2: // ELAPSED
855             if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
856               struct.elapsed = iprot.readDouble();
857               struct.setElapsedIsSet(true);
858             } else { 
859               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
860             }
861             break;
862           case 3: // NUM
863             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
864               struct.num = iprot.readI32();
865               struct.setNumIsSet(true);
866             } else { 
867               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
868             }
869             break;
870           case 4: // COUNT
871             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
872               struct.count = iprot.readI64();
873               struct.setCountIsSet(true);
874             } else { 
875               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
876             }
877             break;
878           case 5: // SUM_DEV
879             if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
880               struct.sumDev = iprot.readDouble();
881               struct.setSumDevIsSet(true);
882             } else { 
883               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
884             }
885             break;
886           case 6: // FAIL
887             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
888               struct.fail = iprot.readI32();
889               struct.setFailIsSet(true);
890             } else { 
891               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
892             }
893             break;
894           case 7: // QUEUE_TIME
895             if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
896               struct.queueTime = iprot.readDouble();
897               struct.setQueueTimeIsSet(true);
898             } else { 
899               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
900             }
901             break;
902           case 8: // QUEUE_SUM_DEV
903             if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
904               struct.queueSumDev = iprot.readDouble();
905               struct.setQueueSumDevIsSet(true);
906             } else { 
907               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
908             }
909             break;
910           default:
911             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
912         }
913         iprot.readFieldEnd();
914       }
915       iprot.readStructEnd();
916 
917       // check for required fields of primitive type, which can't be checked in the validate method
918       struct.validate();
919     }
920 
921     public void write(org.apache.thrift.protocol.TProtocol oprot, ActionStats struct) throws org.apache.thrift.TException {
922       struct.validate();
923 
924       oprot.writeStructBegin(STRUCT_DESC);
925       oprot.writeFieldBegin(STATUS_FIELD_DESC);
926       oprot.writeI32(struct.status);
927       oprot.writeFieldEnd();
928       oprot.writeFieldBegin(ELAPSED_FIELD_DESC);
929       oprot.writeDouble(struct.elapsed);
930       oprot.writeFieldEnd();
931       oprot.writeFieldBegin(NUM_FIELD_DESC);
932       oprot.writeI32(struct.num);
933       oprot.writeFieldEnd();
934       oprot.writeFieldBegin(COUNT_FIELD_DESC);
935       oprot.writeI64(struct.count);
936       oprot.writeFieldEnd();
937       oprot.writeFieldBegin(SUM_DEV_FIELD_DESC);
938       oprot.writeDouble(struct.sumDev);
939       oprot.writeFieldEnd();
940       oprot.writeFieldBegin(FAIL_FIELD_DESC);
941       oprot.writeI32(struct.fail);
942       oprot.writeFieldEnd();
943       oprot.writeFieldBegin(QUEUE_TIME_FIELD_DESC);
944       oprot.writeDouble(struct.queueTime);
945       oprot.writeFieldEnd();
946       oprot.writeFieldBegin(QUEUE_SUM_DEV_FIELD_DESC);
947       oprot.writeDouble(struct.queueSumDev);
948       oprot.writeFieldEnd();
949       oprot.writeFieldStop();
950       oprot.writeStructEnd();
951     }
952 
953   }
954 
955   private static class ActionStatsTupleSchemeFactory implements SchemeFactory {
956     public ActionStatsTupleScheme getScheme() {
957       return new ActionStatsTupleScheme();
958     }
959   }
960 
961   private static class ActionStatsTupleScheme extends TupleScheme<ActionStats> {
962 
963     @Override
964     public void write(org.apache.thrift.protocol.TProtocol prot, ActionStats struct) throws org.apache.thrift.TException {
965       TTupleProtocol oprot = (TTupleProtocol) prot;
966       BitSet optionals = new BitSet();
967       if (struct.isSetStatus()) {
968         optionals.set(0);
969       }
970       if (struct.isSetElapsed()) {
971         optionals.set(1);
972       }
973       if (struct.isSetNum()) {
974         optionals.set(2);
975       }
976       if (struct.isSetCount()) {
977         optionals.set(3);
978       }
979       if (struct.isSetSumDev()) {
980         optionals.set(4);
981       }
982       if (struct.isSetFail()) {
983         optionals.set(5);
984       }
985       if (struct.isSetQueueTime()) {
986         optionals.set(6);
987       }
988       if (struct.isSetQueueSumDev()) {
989         optionals.set(7);
990       }
991       oprot.writeBitSet(optionals, 8);
992       if (struct.isSetStatus()) {
993         oprot.writeI32(struct.status);
994       }
995       if (struct.isSetElapsed()) {
996         oprot.writeDouble(struct.elapsed);
997       }
998       if (struct.isSetNum()) {
999         oprot.writeI32(struct.num);
1000       }
1001       if (struct.isSetCount()) {
1002         oprot.writeI64(struct.count);
1003       }
1004       if (struct.isSetSumDev()) {
1005         oprot.writeDouble(struct.sumDev);
1006       }
1007       if (struct.isSetFail()) {
1008         oprot.writeI32(struct.fail);
1009       }
1010       if (struct.isSetQueueTime()) {
1011         oprot.writeDouble(struct.queueTime);
1012       }
1013       if (struct.isSetQueueSumDev()) {
1014         oprot.writeDouble(struct.queueSumDev);
1015       }
1016     }
1017 
1018     @Override
1019     public void read(org.apache.thrift.protocol.TProtocol prot, ActionStats struct) throws org.apache.thrift.TException {
1020       TTupleProtocol iprot = (TTupleProtocol) prot;
1021       BitSet incoming = iprot.readBitSet(8);
1022       if (incoming.get(0)) {
1023         struct.status = iprot.readI32();
1024         struct.setStatusIsSet(true);
1025       }
1026       if (incoming.get(1)) {
1027         struct.elapsed = iprot.readDouble();
1028         struct.setElapsedIsSet(true);
1029       }
1030       if (incoming.get(2)) {
1031         struct.num = iprot.readI32();
1032         struct.setNumIsSet(true);
1033       }
1034       if (incoming.get(3)) {
1035         struct.count = iprot.readI64();
1036         struct.setCountIsSet(true);
1037       }
1038       if (incoming.get(4)) {
1039         struct.sumDev = iprot.readDouble();
1040         struct.setSumDevIsSet(true);
1041       }
1042       if (incoming.get(5)) {
1043         struct.fail = iprot.readI32();
1044         struct.setFailIsSet(true);
1045       }
1046       if (incoming.get(6)) {
1047         struct.queueTime = iprot.readDouble();
1048         struct.setQueueTimeIsSet(true);
1049       }
1050       if (incoming.get(7)) {
1051         struct.queueSumDev = iprot.readDouble();
1052         struct.setQueueSumDevIsSet(true);
1053       }
1054     }
1055   }
1056 
1057 }
1058