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.gc.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 GCMonitorService {
50  
51    public interface Iface {
52  
53      public GCStatus getStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.Credential credential) throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException;
54  
55    }
56  
57    public interface AsyncIface {
58  
59      public void getStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.Credential credential, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getStatus_call> resultHandler) throws org.apache.thrift.TException;
60  
61    }
62  
63    public static class Client extends org.apache.thrift.TServiceClient implements Iface {
64      public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
65        public Factory() {}
66        public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
67          return new Client(prot);
68        }
69        public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
70          return new Client(iprot, oprot);
71        }
72      }
73  
74      public Client(org.apache.thrift.protocol.TProtocol prot)
75      {
76        super(prot, prot);
77      }
78  
79      public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
80        super(iprot, oprot);
81      }
82  
83      public GCStatus getStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.Credential credential) throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException
84      {
85        send_getStatus(tinfo, credential);
86        return recv_getStatus();
87      }
88  
89      public void send_getStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.Credential credential) throws org.apache.thrift.TException
90      {
91        getStatus_args args = new getStatus_args();
92        args.setTinfo(tinfo);
93        args.setCredential(credential);
94        sendBase("getStatus", args);
95      }
96  
97      public GCStatus recv_getStatus() throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException
98      {
99        getStatus_result result = new getStatus_result();
100       receiveBase(result, "getStatus");
101       if (result.isSetSuccess()) {
102         return result.success;
103       }
104       if (result.sec != null) {
105         throw result.sec;
106       }
107       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
108     }
109 
110   }
111   public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
112     public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
113       private org.apache.thrift.async.TAsyncClientManager clientManager;
114       private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
115       public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
116         this.clientManager = clientManager;
117         this.protocolFactory = protocolFactory;
118       }
119       public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
120         return new AsyncClient(protocolFactory, clientManager, transport);
121       }
122     }
123 
124     public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
125       super(protocolFactory, clientManager, transport);
126     }
127 
128     public void getStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.Credential credential, org.apache.thrift.async.AsyncMethodCallback<getStatus_call> resultHandler) throws org.apache.thrift.TException {
129       checkReady();
130       getStatus_call method_call = new getStatus_call(tinfo, credential, resultHandler, this, ___protocolFactory, ___transport);
131       this.___currentMethod = method_call;
132       ___manager.call(method_call);
133     }
134 
135     public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
136       private org.apache.accumulo.trace.thrift.TInfo tinfo;
137       private org.apache.accumulo.core.security.thrift.Credential credential;
138       public getStatus_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.Credential credential, org.apache.thrift.async.AsyncMethodCallback<getStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
139         super(client, protocolFactory, transport, resultHandler, false);
140         this.tinfo = tinfo;
141         this.credential = credential;
142       }
143 
144       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
145         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
146         getStatus_args args = new getStatus_args();
147         args.setTinfo(tinfo);
148         args.setCredential(credential);
149         args.write(prot);
150         prot.writeMessageEnd();
151       }
152 
153       public GCStatus getResult() throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException {
154         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
155           throw new IllegalStateException("Method call not finished!");
156         }
157         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
158         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
159         return (new Client(prot)).recv_getStatus();
160       }
161     }
162 
163   }
164 
165   public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
166     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
167     public Processor(I iface) {
168       super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
169     }
170 
171     protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
172       super(iface, getProcessMap(processMap));
173     }
174 
175     private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
176       processMap.put("getStatus", new getStatus());
177       return processMap;
178     }
179 
180     public static class getStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getStatus_args> {
181       public getStatus() {
182         super("getStatus");
183       }
184 
185       public getStatus_args getEmptyArgsInstance() {
186         return new getStatus_args();
187       }
188 
189       protected boolean isOneway() {
190         return false;
191       }
192 
193       public getStatus_result getResult(I iface, getStatus_args args) throws org.apache.thrift.TException {
194         getStatus_result result = new getStatus_result();
195         try {
196           result.success = iface.getStatus(args.tinfo, args.credential);
197         } catch (org.apache.accumulo.core.security.thrift.ThriftSecurityException sec) {
198           result.sec = sec;
199         }
200         return result;
201       }
202     }
203 
204   }
205 
206   public static class getStatus_args implements org.apache.thrift.TBase<getStatus_args, getStatus_args._Fields>, java.io.Serializable, Cloneable   {
207     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStatus_args");
208 
209     private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
210     private static final org.apache.thrift.protocol.TField CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("credential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
211 
212     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
213     static {
214       schemes.put(StandardScheme.class, new getStatus_argsStandardSchemeFactory());
215       schemes.put(TupleScheme.class, new getStatus_argsTupleSchemeFactory());
216     }
217 
218     public org.apache.accumulo.trace.thrift.TInfo tinfo; // required
219     public org.apache.accumulo.core.security.thrift.Credential credential; // required
220 
221     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
222     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
223       TINFO((short)2, "tinfo"),
224       CREDENTIAL((short)1, "credential");
225 
226       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
227 
228       static {
229         for (_Fields field : EnumSet.allOf(_Fields.class)) {
230           byName.put(field.getFieldName(), field);
231         }
232       }
233 
234       /**
235        * Find the _Fields constant that matches fieldId, or null if its not found.
236        */
237       public static _Fields findByThriftId(int fieldId) {
238         switch(fieldId) {
239           case 2: // TINFO
240             return TINFO;
241           case 1: // CREDENTIAL
242             return CREDENTIAL;
243           default:
244             return null;
245         }
246       }
247 
248       /**
249        * Find the _Fields constant that matches fieldId, throwing an exception
250        * if it is not found.
251        */
252       public static _Fields findByThriftIdOrThrow(int fieldId) {
253         _Fields fields = findByThriftId(fieldId);
254         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
255         return fields;
256       }
257 
258       /**
259        * Find the _Fields constant that matches name, or null if its not found.
260        */
261       public static _Fields findByName(String name) {
262         return byName.get(name);
263       }
264 
265       private final short _thriftId;
266       private final String _fieldName;
267 
268       _Fields(short thriftId, String fieldName) {
269         _thriftId = thriftId;
270         _fieldName = fieldName;
271       }
272 
273       public short getThriftFieldId() {
274         return _thriftId;
275       }
276 
277       public String getFieldName() {
278         return _fieldName;
279       }
280     }
281 
282     // isset id assignments
283     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
284     static {
285       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
286       tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
287           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.trace.thrift.TInfo.class)));
288       tmpMap.put(_Fields.CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("credential", org.apache.thrift.TFieldRequirementType.DEFAULT, 
289           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.Credential.class)));
290       metaDataMap = Collections.unmodifiableMap(tmpMap);
291       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_args.class, metaDataMap);
292     }
293 
294     public getStatus_args() {
295     }
296 
297     public getStatus_args(
298       org.apache.accumulo.trace.thrift.TInfo tinfo,
299       org.apache.accumulo.core.security.thrift.Credential credential)
300     {
301       this();
302       this.tinfo = tinfo;
303       this.credential = credential;
304     }
305 
306     /**
307      * Performs a deep copy on <i>other</i>.
308      */
309     public getStatus_args(getStatus_args other) {
310       if (other.isSetTinfo()) {
311         this.tinfo = new org.apache.accumulo.trace.thrift.TInfo(other.tinfo);
312       }
313       if (other.isSetCredential()) {
314         this.credential = new org.apache.accumulo.core.security.thrift.Credential(other.credential);
315       }
316     }
317 
318     public getStatus_args deepCopy() {
319       return new getStatus_args(this);
320     }
321 
322     @Override
323     public void clear() {
324       this.tinfo = null;
325       this.credential = null;
326     }
327 
328     public org.apache.accumulo.trace.thrift.TInfo getTinfo() {
329       return this.tinfo;
330     }
331 
332     public getStatus_args setTinfo(org.apache.accumulo.trace.thrift.TInfo tinfo) {
333       this.tinfo = tinfo;
334       return this;
335     }
336 
337     public void unsetTinfo() {
338       this.tinfo = null;
339     }
340 
341     /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
342     public boolean isSetTinfo() {
343       return this.tinfo != null;
344     }
345 
346     public void setTinfoIsSet(boolean value) {
347       if (!value) {
348         this.tinfo = null;
349       }
350     }
351 
352     public org.apache.accumulo.core.security.thrift.Credential getCredential() {
353       return this.credential;
354     }
355 
356     public getStatus_args setCredential(org.apache.accumulo.core.security.thrift.Credential credential) {
357       this.credential = credential;
358       return this;
359     }
360 
361     public void unsetCredential() {
362       this.credential = null;
363     }
364 
365     /** Returns true if field credential is set (has been assigned a value) and false otherwise */
366     public boolean isSetCredential() {
367       return this.credential != null;
368     }
369 
370     public void setCredentialIsSet(boolean value) {
371       if (!value) {
372         this.credential = null;
373       }
374     }
375 
376     public void setFieldValue(_Fields field, Object value) {
377       switch (field) {
378       case TINFO:
379         if (value == null) {
380           unsetTinfo();
381         } else {
382           setTinfo((org.apache.accumulo.trace.thrift.TInfo)value);
383         }
384         break;
385 
386       case CREDENTIAL:
387         if (value == null) {
388           unsetCredential();
389         } else {
390           setCredential((org.apache.accumulo.core.security.thrift.Credential)value);
391         }
392         break;
393 
394       }
395     }
396 
397     public Object getFieldValue(_Fields field) {
398       switch (field) {
399       case TINFO:
400         return getTinfo();
401 
402       case CREDENTIAL:
403         return getCredential();
404 
405       }
406       throw new IllegalStateException();
407     }
408 
409     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
410     public boolean isSet(_Fields field) {
411       if (field == null) {
412         throw new IllegalArgumentException();
413       }
414 
415       switch (field) {
416       case TINFO:
417         return isSetTinfo();
418       case CREDENTIAL:
419         return isSetCredential();
420       }
421       throw new IllegalStateException();
422     }
423 
424     @Override
425     public boolean equals(Object that) {
426       if (that == null)
427         return false;
428       if (that instanceof getStatus_args)
429         return this.equals((getStatus_args)that);
430       return false;
431     }
432 
433     public boolean equals(getStatus_args that) {
434       if (that == null)
435         return false;
436 
437       boolean this_present_tinfo = true && this.isSetTinfo();
438       boolean that_present_tinfo = true && that.isSetTinfo();
439       if (this_present_tinfo || that_present_tinfo) {
440         if (!(this_present_tinfo && that_present_tinfo))
441           return false;
442         if (!this.tinfo.equals(that.tinfo))
443           return false;
444       }
445 
446       boolean this_present_credential = true && this.isSetCredential();
447       boolean that_present_credential = true && that.isSetCredential();
448       if (this_present_credential || that_present_credential) {
449         if (!(this_present_credential && that_present_credential))
450           return false;
451         if (!this.credential.equals(that.credential))
452           return false;
453       }
454 
455       return true;
456     }
457 
458     @Override
459     public int hashCode() {
460       return 0;
461     }
462 
463     public int compareTo(getStatus_args other) {
464       if (!getClass().equals(other.getClass())) {
465         return getClass().getName().compareTo(other.getClass().getName());
466       }
467 
468       int lastComparison = 0;
469       getStatus_args typedOther = (getStatus_args)other;
470 
471       lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(typedOther.isSetTinfo());
472       if (lastComparison != 0) {
473         return lastComparison;
474       }
475       if (isSetTinfo()) {
476         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, typedOther.tinfo);
477         if (lastComparison != 0) {
478           return lastComparison;
479         }
480       }
481       lastComparison = Boolean.valueOf(isSetCredential()).compareTo(typedOther.isSetCredential());
482       if (lastComparison != 0) {
483         return lastComparison;
484       }
485       if (isSetCredential()) {
486         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credential, typedOther.credential);
487         if (lastComparison != 0) {
488           return lastComparison;
489         }
490       }
491       return 0;
492     }
493 
494     public _Fields fieldForId(int fieldId) {
495       return _Fields.findByThriftId(fieldId);
496     }
497 
498     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
499       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
500     }
501 
502     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
503       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
504     }
505 
506     @Override
507     public String toString() {
508       StringBuilder sb = new StringBuilder("getStatus_args(");
509       boolean first = true;
510 
511       sb.append("tinfo:");
512       if (this.tinfo == null) {
513         sb.append("null");
514       } else {
515         sb.append(this.tinfo);
516       }
517       first = false;
518       if (!first) sb.append(", ");
519       sb.append("credential:");
520       if (this.credential == null) {
521         sb.append("null");
522       } else {
523         sb.append(this.credential);
524       }
525       first = false;
526       sb.append(")");
527       return sb.toString();
528     }
529 
530     public void validate() throws org.apache.thrift.TException {
531       // check for required fields
532       // check for sub-struct validity
533       if (tinfo != null) {
534         tinfo.validate();
535       }
536       if (credential != null) {
537         credential.validate();
538       }
539     }
540 
541     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
542       try {
543         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
544       } catch (org.apache.thrift.TException te) {
545         throw new java.io.IOException(te);
546       }
547     }
548 
549     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
550       try {
551         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
552       } catch (org.apache.thrift.TException te) {
553         throw new java.io.IOException(te);
554       }
555     }
556 
557     private static class getStatus_argsStandardSchemeFactory implements SchemeFactory {
558       public getStatus_argsStandardScheme getScheme() {
559         return new getStatus_argsStandardScheme();
560       }
561     }
562 
563     private static class getStatus_argsStandardScheme extends StandardScheme<getStatus_args> {
564 
565       public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args struct) throws org.apache.thrift.TException {
566         org.apache.thrift.protocol.TField schemeField;
567         iprot.readStructBegin();
568         while (true)
569         {
570           schemeField = iprot.readFieldBegin();
571           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
572             break;
573           }
574           switch (schemeField.id) {
575             case 2: // TINFO
576               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
577                 struct.tinfo = new org.apache.accumulo.trace.thrift.TInfo();
578                 struct.tinfo.read(iprot);
579                 struct.setTinfoIsSet(true);
580               } else { 
581                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
582               }
583               break;
584             case 1: // CREDENTIAL
585               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
586                 struct.credential = new org.apache.accumulo.core.security.thrift.Credential();
587                 struct.credential.read(iprot);
588                 struct.setCredentialIsSet(true);
589               } else { 
590                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
591               }
592               break;
593             default:
594               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
595           }
596           iprot.readFieldEnd();
597         }
598         iprot.readStructEnd();
599 
600         // check for required fields of primitive type, which can't be checked in the validate method
601         struct.validate();
602       }
603 
604       public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_args struct) throws org.apache.thrift.TException {
605         struct.validate();
606 
607         oprot.writeStructBegin(STRUCT_DESC);
608         if (struct.credential != null) {
609           oprot.writeFieldBegin(CREDENTIAL_FIELD_DESC);
610           struct.credential.write(oprot);
611           oprot.writeFieldEnd();
612         }
613         if (struct.tinfo != null) {
614           oprot.writeFieldBegin(TINFO_FIELD_DESC);
615           struct.tinfo.write(oprot);
616           oprot.writeFieldEnd();
617         }
618         oprot.writeFieldStop();
619         oprot.writeStructEnd();
620       }
621 
622     }
623 
624     private static class getStatus_argsTupleSchemeFactory implements SchemeFactory {
625       public getStatus_argsTupleScheme getScheme() {
626         return new getStatus_argsTupleScheme();
627       }
628     }
629 
630     private static class getStatus_argsTupleScheme extends TupleScheme<getStatus_args> {
631 
632       @Override
633       public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
634         TTupleProtocol oprot = (TTupleProtocol) prot;
635         BitSet optionals = new BitSet();
636         if (struct.isSetTinfo()) {
637           optionals.set(0);
638         }
639         if (struct.isSetCredential()) {
640           optionals.set(1);
641         }
642         oprot.writeBitSet(optionals, 2);
643         if (struct.isSetTinfo()) {
644           struct.tinfo.write(oprot);
645         }
646         if (struct.isSetCredential()) {
647           struct.credential.write(oprot);
648         }
649       }
650 
651       @Override
652       public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
653         TTupleProtocol iprot = (TTupleProtocol) prot;
654         BitSet incoming = iprot.readBitSet(2);
655         if (incoming.get(0)) {
656           struct.tinfo = new org.apache.accumulo.trace.thrift.TInfo();
657           struct.tinfo.read(iprot);
658           struct.setTinfoIsSet(true);
659         }
660         if (incoming.get(1)) {
661           struct.credential = new org.apache.accumulo.core.security.thrift.Credential();
662           struct.credential.read(iprot);
663           struct.setCredentialIsSet(true);
664         }
665       }
666     }
667 
668   }
669 
670   public static class getStatus_result implements org.apache.thrift.TBase<getStatus_result, getStatus_result._Fields>, java.io.Serializable, Cloneable   {
671     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStatus_result");
672 
673     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
674     private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
675 
676     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
677     static {
678       schemes.put(StandardScheme.class, new getStatus_resultStandardSchemeFactory());
679       schemes.put(TupleScheme.class, new getStatus_resultTupleSchemeFactory());
680     }
681 
682     public GCStatus success; // required
683     public org.apache.accumulo.core.security.thrift.ThriftSecurityException sec; // required
684 
685     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
686     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
687       SUCCESS((short)0, "success"),
688       SEC((short)1, "sec");
689 
690       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
691 
692       static {
693         for (_Fields field : EnumSet.allOf(_Fields.class)) {
694           byName.put(field.getFieldName(), field);
695         }
696       }
697 
698       /**
699        * Find the _Fields constant that matches fieldId, or null if its not found.
700        */
701       public static _Fields findByThriftId(int fieldId) {
702         switch(fieldId) {
703           case 0: // SUCCESS
704             return SUCCESS;
705           case 1: // SEC
706             return SEC;
707           default:
708             return null;
709         }
710       }
711 
712       /**
713        * Find the _Fields constant that matches fieldId, throwing an exception
714        * if it is not found.
715        */
716       public static _Fields findByThriftIdOrThrow(int fieldId) {
717         _Fields fields = findByThriftId(fieldId);
718         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
719         return fields;
720       }
721 
722       /**
723        * Find the _Fields constant that matches name, or null if its not found.
724        */
725       public static _Fields findByName(String name) {
726         return byName.get(name);
727       }
728 
729       private final short _thriftId;
730       private final String _fieldName;
731 
732       _Fields(short thriftId, String fieldName) {
733         _thriftId = thriftId;
734         _fieldName = fieldName;
735       }
736 
737       public short getThriftFieldId() {
738         return _thriftId;
739       }
740 
741       public String getFieldName() {
742         return _fieldName;
743       }
744     }
745 
746     // isset id assignments
747     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
748     static {
749       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
750       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
751           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GCStatus.class)));
752       tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
753           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
754       metaDataMap = Collections.unmodifiableMap(tmpMap);
755       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_result.class, metaDataMap);
756     }
757 
758     public getStatus_result() {
759     }
760 
761     public getStatus_result(
762       GCStatus success,
763       org.apache.accumulo.core.security.thrift.ThriftSecurityException sec)
764     {
765       this();
766       this.success = success;
767       this.sec = sec;
768     }
769 
770     /**
771      * Performs a deep copy on <i>other</i>.
772      */
773     public getStatus_result(getStatus_result other) {
774       if (other.isSetSuccess()) {
775         this.success = new GCStatus(other.success);
776       }
777       if (other.isSetSec()) {
778         this.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException(other.sec);
779       }
780     }
781 
782     public getStatus_result deepCopy() {
783       return new getStatus_result(this);
784     }
785 
786     @Override
787     public void clear() {
788       this.success = null;
789       this.sec = null;
790     }
791 
792     public GCStatus getSuccess() {
793       return this.success;
794     }
795 
796     public getStatus_result setSuccess(GCStatus success) {
797       this.success = success;
798       return this;
799     }
800 
801     public void unsetSuccess() {
802       this.success = null;
803     }
804 
805     /** Returns true if field success is set (has been assigned a value) and false otherwise */
806     public boolean isSetSuccess() {
807       return this.success != null;
808     }
809 
810     public void setSuccessIsSet(boolean value) {
811       if (!value) {
812         this.success = null;
813       }
814     }
815 
816     public org.apache.accumulo.core.security.thrift.ThriftSecurityException getSec() {
817       return this.sec;
818     }
819 
820     public getStatus_result setSec(org.apache.accumulo.core.security.thrift.ThriftSecurityException sec) {
821       this.sec = sec;
822       return this;
823     }
824 
825     public void unsetSec() {
826       this.sec = null;
827     }
828 
829     /** Returns true if field sec is set (has been assigned a value) and false otherwise */
830     public boolean isSetSec() {
831       return this.sec != null;
832     }
833 
834     public void setSecIsSet(boolean value) {
835       if (!value) {
836         this.sec = null;
837       }
838     }
839 
840     public void setFieldValue(_Fields field, Object value) {
841       switch (field) {
842       case SUCCESS:
843         if (value == null) {
844           unsetSuccess();
845         } else {
846           setSuccess((GCStatus)value);
847         }
848         break;
849 
850       case SEC:
851         if (value == null) {
852           unsetSec();
853         } else {
854           setSec((org.apache.accumulo.core.security.thrift.ThriftSecurityException)value);
855         }
856         break;
857 
858       }
859     }
860 
861     public Object getFieldValue(_Fields field) {
862       switch (field) {
863       case SUCCESS:
864         return getSuccess();
865 
866       case SEC:
867         return getSec();
868 
869       }
870       throw new IllegalStateException();
871     }
872 
873     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
874     public boolean isSet(_Fields field) {
875       if (field == null) {
876         throw new IllegalArgumentException();
877       }
878 
879       switch (field) {
880       case SUCCESS:
881         return isSetSuccess();
882       case SEC:
883         return isSetSec();
884       }
885       throw new IllegalStateException();
886     }
887 
888     @Override
889     public boolean equals(Object that) {
890       if (that == null)
891         return false;
892       if (that instanceof getStatus_result)
893         return this.equals((getStatus_result)that);
894       return false;
895     }
896 
897     public boolean equals(getStatus_result that) {
898       if (that == null)
899         return false;
900 
901       boolean this_present_success = true && this.isSetSuccess();
902       boolean that_present_success = true && that.isSetSuccess();
903       if (this_present_success || that_present_success) {
904         if (!(this_present_success && that_present_success))
905           return false;
906         if (!this.success.equals(that.success))
907           return false;
908       }
909 
910       boolean this_present_sec = true && this.isSetSec();
911       boolean that_present_sec = true && that.isSetSec();
912       if (this_present_sec || that_present_sec) {
913         if (!(this_present_sec && that_present_sec))
914           return false;
915         if (!this.sec.equals(that.sec))
916           return false;
917       }
918 
919       return true;
920     }
921 
922     @Override
923     public int hashCode() {
924       return 0;
925     }
926 
927     public int compareTo(getStatus_result other) {
928       if (!getClass().equals(other.getClass())) {
929         return getClass().getName().compareTo(other.getClass().getName());
930       }
931 
932       int lastComparison = 0;
933       getStatus_result typedOther = (getStatus_result)other;
934 
935       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
936       if (lastComparison != 0) {
937         return lastComparison;
938       }
939       if (isSetSuccess()) {
940         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
941         if (lastComparison != 0) {
942           return lastComparison;
943         }
944       }
945       lastComparison = Boolean.valueOf(isSetSec()).compareTo(typedOther.isSetSec());
946       if (lastComparison != 0) {
947         return lastComparison;
948       }
949       if (isSetSec()) {
950         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, typedOther.sec);
951         if (lastComparison != 0) {
952           return lastComparison;
953         }
954       }
955       return 0;
956     }
957 
958     public _Fields fieldForId(int fieldId) {
959       return _Fields.findByThriftId(fieldId);
960     }
961 
962     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
963       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
964     }
965 
966     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
967       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
968       }
969 
970     @Override
971     public String toString() {
972       StringBuilder sb = new StringBuilder("getStatus_result(");
973       boolean first = true;
974 
975       sb.append("success:");
976       if (this.success == null) {
977         sb.append("null");
978       } else {
979         sb.append(this.success);
980       }
981       first = false;
982       if (!first) sb.append(", ");
983       sb.append("sec:");
984       if (this.sec == null) {
985         sb.append("null");
986       } else {
987         sb.append(this.sec);
988       }
989       first = false;
990       sb.append(")");
991       return sb.toString();
992     }
993 
994     public void validate() throws org.apache.thrift.TException {
995       // check for required fields
996       // check for sub-struct validity
997       if (success != null) {
998         success.validate();
999       }
1000     }
1001 
1002     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1003       try {
1004         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1005       } catch (org.apache.thrift.TException te) {
1006         throw new java.io.IOException(te);
1007       }
1008     }
1009 
1010     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1011       try {
1012         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1013       } catch (org.apache.thrift.TException te) {
1014         throw new java.io.IOException(te);
1015       }
1016     }
1017 
1018     private static class getStatus_resultStandardSchemeFactory implements SchemeFactory {
1019       public getStatus_resultStandardScheme getScheme() {
1020         return new getStatus_resultStandardScheme();
1021       }
1022     }
1023 
1024     private static class getStatus_resultStandardScheme extends StandardScheme<getStatus_result> {
1025 
1026       public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result struct) throws org.apache.thrift.TException {
1027         org.apache.thrift.protocol.TField schemeField;
1028         iprot.readStructBegin();
1029         while (true)
1030         {
1031           schemeField = iprot.readFieldBegin();
1032           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
1033             break;
1034           }
1035           switch (schemeField.id) {
1036             case 0: // SUCCESS
1037               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
1038                 struct.success = new GCStatus();
1039                 struct.success.read(iprot);
1040                 struct.setSuccessIsSet(true);
1041               } else { 
1042                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1043               }
1044               break;
1045             case 1: // SEC
1046               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
1047                 struct.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException();
1048                 struct.sec.read(iprot);
1049                 struct.setSecIsSet(true);
1050               } else { 
1051                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1052               }
1053               break;
1054             default:
1055               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1056           }
1057           iprot.readFieldEnd();
1058         }
1059         iprot.readStructEnd();
1060 
1061         // check for required fields of primitive type, which can't be checked in the validate method
1062         struct.validate();
1063       }
1064 
1065       public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_result struct) throws org.apache.thrift.TException {
1066         struct.validate();
1067 
1068         oprot.writeStructBegin(STRUCT_DESC);
1069         if (struct.success != null) {
1070           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1071           struct.success.write(oprot);
1072           oprot.writeFieldEnd();
1073         }
1074         if (struct.sec != null) {
1075           oprot.writeFieldBegin(SEC_FIELD_DESC);
1076           struct.sec.write(oprot);
1077           oprot.writeFieldEnd();
1078         }
1079         oprot.writeFieldStop();
1080         oprot.writeStructEnd();
1081       }
1082 
1083     }
1084 
1085     private static class getStatus_resultTupleSchemeFactory implements SchemeFactory {
1086       public getStatus_resultTupleScheme getScheme() {
1087         return new getStatus_resultTupleScheme();
1088       }
1089     }
1090 
1091     private static class getStatus_resultTupleScheme extends TupleScheme<getStatus_result> {
1092 
1093       @Override
1094       public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
1095         TTupleProtocol oprot = (TTupleProtocol) prot;
1096         BitSet optionals = new BitSet();
1097         if (struct.isSetSuccess()) {
1098           optionals.set(0);
1099         }
1100         if (struct.isSetSec()) {
1101           optionals.set(1);
1102         }
1103         oprot.writeBitSet(optionals, 2);
1104         if (struct.isSetSuccess()) {
1105           struct.success.write(oprot);
1106         }
1107         if (struct.isSetSec()) {
1108           struct.sec.write(oprot);
1109         }
1110       }
1111 
1112       @Override
1113       public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
1114         TTupleProtocol iprot = (TTupleProtocol) prot;
1115         BitSet incoming = iprot.readBitSet(2);
1116         if (incoming.get(0)) {
1117           struct.success = new GCStatus();
1118           struct.success.read(iprot);
1119           struct.setSuccessIsSet(true);
1120         }
1121         if (incoming.get(1)) {
1122           struct.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException();
1123           struct.sec.read(iprot);
1124           struct.setSecIsSet(true);
1125         }
1126       }
1127     }
1128 
1129   }
1130 
1131 }