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.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 TMutation implements org.apache.thrift.TBase<TMutation, TMutation._Fields>, java.io.Serializable, Cloneable {
50    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMutation");
51  
52    private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
53    private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2);
54    private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)3);
55    private static final org.apache.thrift.protocol.TField ENTRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("entries", org.apache.thrift.protocol.TType.I32, (short)4);
56  
57    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
58    static {
59      schemes.put(StandardScheme.class, new TMutationStandardSchemeFactory());
60      schemes.put(TupleScheme.class, new TMutationTupleSchemeFactory());
61    }
62  
63    public ByteBuffer row; // required
64    public ByteBuffer data; // required
65    public List<ByteBuffer> values; // required
66    public int entries; // required
67  
68    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
69    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
70      ROW((short)1, "row"),
71      DATA((short)2, "data"),
72      VALUES((short)3, "values"),
73      ENTRIES((short)4, "entries");
74  
75      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
76  
77      static {
78        for (_Fields field : EnumSet.allOf(_Fields.class)) {
79          byName.put(field.getFieldName(), field);
80        }
81      }
82  
83      /**
84       * Find the _Fields constant that matches fieldId, or null if its not found.
85       */
86      public static _Fields findByThriftId(int fieldId) {
87        switch(fieldId) {
88          case 1: // ROW
89            return ROW;
90          case 2: // DATA
91            return DATA;
92          case 3: // VALUES
93            return VALUES;
94          case 4: // ENTRIES
95            return ENTRIES;
96          default:
97            return null;
98        }
99      }
100 
101     /**
102      * Find the _Fields constant that matches fieldId, throwing an exception
103      * if it is not found.
104      */
105     public static _Fields findByThriftIdOrThrow(int fieldId) {
106       _Fields fields = findByThriftId(fieldId);
107       if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
108       return fields;
109     }
110 
111     /**
112      * Find the _Fields constant that matches name, or null if its not found.
113      */
114     public static _Fields findByName(String name) {
115       return byName.get(name);
116     }
117 
118     private final short _thriftId;
119     private final String _fieldName;
120 
121     _Fields(short thriftId, String fieldName) {
122       _thriftId = thriftId;
123       _fieldName = fieldName;
124     }
125 
126     public short getThriftFieldId() {
127       return _thriftId;
128     }
129 
130     public String getFieldName() {
131       return _fieldName;
132     }
133   }
134 
135   // isset id assignments
136   private static final int __ENTRIES_ISSET_ID = 0;
137   private byte __isset_bitfield = 0;
138   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
139   static {
140     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
141     tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
143     tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
145     tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
147             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
148     tmpMap.put(_Fields.ENTRIES, new org.apache.thrift.meta_data.FieldMetaData("entries", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
150     metaDataMap = Collections.unmodifiableMap(tmpMap);
151     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMutation.class, metaDataMap);
152   }
153 
154   public TMutation() {
155   }
156 
157   public TMutation(
158     ByteBuffer row,
159     ByteBuffer data,
160     List<ByteBuffer> values,
161     int entries)
162   {
163     this();
164     this.row = row;
165     this.data = data;
166     this.values = values;
167     this.entries = entries;
168     setEntriesIsSet(true);
169   }
170 
171   /**
172    * Performs a deep copy on <i>other</i>.
173    */
174   public TMutation(TMutation other) {
175     __isset_bitfield = other.__isset_bitfield;
176     if (other.isSetRow()) {
177       this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
178 ;
179     }
180     if (other.isSetData()) {
181       this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
182 ;
183     }
184     if (other.isSetValues()) {
185       List<ByteBuffer> __this__values = new ArrayList<ByteBuffer>();
186       for (ByteBuffer other_element : other.values) {
187         ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element);
188 ;
189         __this__values.add(temp_binary_element);
190       }
191       this.values = __this__values;
192     }
193     this.entries = other.entries;
194   }
195 
196   public TMutation deepCopy() {
197     return new TMutation(this);
198   }
199 
200   @Override
201   public void clear() {
202     this.row = null;
203     this.data = null;
204     this.values = null;
205     setEntriesIsSet(false);
206     this.entries = 0;
207   }
208 
209   public byte[] getRow() {
210     setRow(org.apache.thrift.TBaseHelper.rightSize(row));
211     return row == null ? null : row.array();
212   }
213 
214   public ByteBuffer bufferForRow() {
215     return row;
216   }
217 
218   public TMutation setRow(byte[] row) {
219     setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
220     return this;
221   }
222 
223   public TMutation setRow(ByteBuffer row) {
224     this.row = row;
225     return this;
226   }
227 
228   public void unsetRow() {
229     this.row = null;
230   }
231 
232   /** Returns true if field row is set (has been assigned a value) and false otherwise */
233   public boolean isSetRow() {
234     return this.row != null;
235   }
236 
237   public void setRowIsSet(boolean value) {
238     if (!value) {
239       this.row = null;
240     }
241   }
242 
243   public byte[] getData() {
244     setData(org.apache.thrift.TBaseHelper.rightSize(data));
245     return data == null ? null : data.array();
246   }
247 
248   public ByteBuffer bufferForData() {
249     return data;
250   }
251 
252   public TMutation setData(byte[] data) {
253     setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
254     return this;
255   }
256 
257   public TMutation setData(ByteBuffer data) {
258     this.data = data;
259     return this;
260   }
261 
262   public void unsetData() {
263     this.data = null;
264   }
265 
266   /** Returns true if field data is set (has been assigned a value) and false otherwise */
267   public boolean isSetData() {
268     return this.data != null;
269   }
270 
271   public void setDataIsSet(boolean value) {
272     if (!value) {
273       this.data = null;
274     }
275   }
276 
277   public int getValuesSize() {
278     return (this.values == null) ? 0 : this.values.size();
279   }
280 
281   public java.util.Iterator<ByteBuffer> getValuesIterator() {
282     return (this.values == null) ? null : this.values.iterator();
283   }
284 
285   public void addToValues(ByteBuffer elem) {
286     if (this.values == null) {
287       this.values = new ArrayList<ByteBuffer>();
288     }
289     this.values.add(elem);
290   }
291 
292   public List<ByteBuffer> getValues() {
293     return this.values;
294   }
295 
296   public TMutation setValues(List<ByteBuffer> values) {
297     this.values = values;
298     return this;
299   }
300 
301   public void unsetValues() {
302     this.values = null;
303   }
304 
305   /** Returns true if field values is set (has been assigned a value) and false otherwise */
306   public boolean isSetValues() {
307     return this.values != null;
308   }
309 
310   public void setValuesIsSet(boolean value) {
311     if (!value) {
312       this.values = null;
313     }
314   }
315 
316   public int getEntries() {
317     return this.entries;
318   }
319 
320   public TMutation setEntries(int entries) {
321     this.entries = entries;
322     setEntriesIsSet(true);
323     return this;
324   }
325 
326   public void unsetEntries() {
327     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENTRIES_ISSET_ID);
328   }
329 
330   /** Returns true if field entries is set (has been assigned a value) and false otherwise */
331   public boolean isSetEntries() {
332     return EncodingUtils.testBit(__isset_bitfield, __ENTRIES_ISSET_ID);
333   }
334 
335   public void setEntriesIsSet(boolean value) {
336     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENTRIES_ISSET_ID, value);
337   }
338 
339   public void setFieldValue(_Fields field, Object value) {
340     switch (field) {
341     case ROW:
342       if (value == null) {
343         unsetRow();
344       } else {
345         setRow((ByteBuffer)value);
346       }
347       break;
348 
349     case DATA:
350       if (value == null) {
351         unsetData();
352       } else {
353         setData((ByteBuffer)value);
354       }
355       break;
356 
357     case VALUES:
358       if (value == null) {
359         unsetValues();
360       } else {
361         setValues((List<ByteBuffer>)value);
362       }
363       break;
364 
365     case ENTRIES:
366       if (value == null) {
367         unsetEntries();
368       } else {
369         setEntries((Integer)value);
370       }
371       break;
372 
373     }
374   }
375 
376   public Object getFieldValue(_Fields field) {
377     switch (field) {
378     case ROW:
379       return getRow();
380 
381     case DATA:
382       return getData();
383 
384     case VALUES:
385       return getValues();
386 
387     case ENTRIES:
388       return Integer.valueOf(getEntries());
389 
390     }
391     throw new IllegalStateException();
392   }
393 
394   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
395   public boolean isSet(_Fields field) {
396     if (field == null) {
397       throw new IllegalArgumentException();
398     }
399 
400     switch (field) {
401     case ROW:
402       return isSetRow();
403     case DATA:
404       return isSetData();
405     case VALUES:
406       return isSetValues();
407     case ENTRIES:
408       return isSetEntries();
409     }
410     throw new IllegalStateException();
411   }
412 
413   @Override
414   public boolean equals(Object that) {
415     if (that == null)
416       return false;
417     if (that instanceof TMutation)
418       return this.equals((TMutation)that);
419     return false;
420   }
421 
422   public boolean equals(TMutation that) {
423     if (that == null)
424       return false;
425 
426     boolean this_present_row = true && this.isSetRow();
427     boolean that_present_row = true && that.isSetRow();
428     if (this_present_row || that_present_row) {
429       if (!(this_present_row && that_present_row))
430         return false;
431       if (!this.row.equals(that.row))
432         return false;
433     }
434 
435     boolean this_present_data = true && this.isSetData();
436     boolean that_present_data = true && that.isSetData();
437     if (this_present_data || that_present_data) {
438       if (!(this_present_data && that_present_data))
439         return false;
440       if (!this.data.equals(that.data))
441         return false;
442     }
443 
444     boolean this_present_values = true && this.isSetValues();
445     boolean that_present_values = true && that.isSetValues();
446     if (this_present_values || that_present_values) {
447       if (!(this_present_values && that_present_values))
448         return false;
449       if (!this.values.equals(that.values))
450         return false;
451     }
452 
453     boolean this_present_entries = true;
454     boolean that_present_entries = true;
455     if (this_present_entries || that_present_entries) {
456       if (!(this_present_entries && that_present_entries))
457         return false;
458       if (this.entries != that.entries)
459         return false;
460     }
461 
462     return true;
463   }
464 
465   @Override
466   public int hashCode() {
467     return 0;
468   }
469 
470   public int compareTo(TMutation other) {
471     if (!getClass().equals(other.getClass())) {
472       return getClass().getName().compareTo(other.getClass().getName());
473     }
474 
475     int lastComparison = 0;
476     TMutation typedOther = (TMutation)other;
477 
478     lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
479     if (lastComparison != 0) {
480       return lastComparison;
481     }
482     if (isSetRow()) {
483       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
484       if (lastComparison != 0) {
485         return lastComparison;
486       }
487     }
488     lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
489     if (lastComparison != 0) {
490       return lastComparison;
491     }
492     if (isSetData()) {
493       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
494       if (lastComparison != 0) {
495         return lastComparison;
496       }
497     }
498     lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues());
499     if (lastComparison != 0) {
500       return lastComparison;
501     }
502     if (isSetValues()) {
503       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values);
504       if (lastComparison != 0) {
505         return lastComparison;
506       }
507     }
508     lastComparison = Boolean.valueOf(isSetEntries()).compareTo(typedOther.isSetEntries());
509     if (lastComparison != 0) {
510       return lastComparison;
511     }
512     if (isSetEntries()) {
513       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entries, typedOther.entries);
514       if (lastComparison != 0) {
515         return lastComparison;
516       }
517     }
518     return 0;
519   }
520 
521   public _Fields fieldForId(int fieldId) {
522     return _Fields.findByThriftId(fieldId);
523   }
524 
525   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
526     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
527   }
528 
529   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
530     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
531   }
532 
533   @Override
534   public String toString() {
535     StringBuilder sb = new StringBuilder("TMutation(");
536     boolean first = true;
537 
538     sb.append("row:");
539     if (this.row == null) {
540       sb.append("null");
541     } else {
542       org.apache.thrift.TBaseHelper.toString(this.row, sb);
543     }
544     first = false;
545     if (!first) sb.append(", ");
546     sb.append("data:");
547     if (this.data == null) {
548       sb.append("null");
549     } else {
550       org.apache.thrift.TBaseHelper.toString(this.data, sb);
551     }
552     first = false;
553     if (!first) sb.append(", ");
554     sb.append("values:");
555     if (this.values == null) {
556       sb.append("null");
557     } else {
558       sb.append(this.values);
559     }
560     first = false;
561     if (!first) sb.append(", ");
562     sb.append("entries:");
563     sb.append(this.entries);
564     first = false;
565     sb.append(")");
566     return sb.toString();
567   }
568 
569   public void validate() throws org.apache.thrift.TException {
570     // check for required fields
571     // check for sub-struct validity
572   }
573 
574   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
575     try {
576       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
577     } catch (org.apache.thrift.TException te) {
578       throw new java.io.IOException(te);
579     }
580   }
581 
582   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
583     try {
584       // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
585       __isset_bitfield = 0;
586       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
587     } catch (org.apache.thrift.TException te) {
588       throw new java.io.IOException(te);
589     }
590   }
591 
592   private static class TMutationStandardSchemeFactory implements SchemeFactory {
593     public TMutationStandardScheme getScheme() {
594       return new TMutationStandardScheme();
595     }
596   }
597 
598   private static class TMutationStandardScheme extends StandardScheme<TMutation> {
599 
600     public void read(org.apache.thrift.protocol.TProtocol iprot, TMutation struct) throws org.apache.thrift.TException {
601       org.apache.thrift.protocol.TField schemeField;
602       iprot.readStructBegin();
603       while (true)
604       {
605         schemeField = iprot.readFieldBegin();
606         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
607           break;
608         }
609         switch (schemeField.id) {
610           case 1: // ROW
611             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
612               struct.row = iprot.readBinary();
613               struct.setRowIsSet(true);
614             } else { 
615               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
616             }
617             break;
618           case 2: // DATA
619             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
620               struct.data = iprot.readBinary();
621               struct.setDataIsSet(true);
622             } else { 
623               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
624             }
625             break;
626           case 3: // VALUES
627             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
628               {
629                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
630                 struct.values = new ArrayList<ByteBuffer>(_list0.size);
631                 for (int _i1 = 0; _i1 < _list0.size; ++_i1)
632                 {
633                   ByteBuffer _elem2; // required
634                   _elem2 = iprot.readBinary();
635                   struct.values.add(_elem2);
636                 }
637                 iprot.readListEnd();
638               }
639               struct.setValuesIsSet(true);
640             } else { 
641               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
642             }
643             break;
644           case 4: // ENTRIES
645             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
646               struct.entries = iprot.readI32();
647               struct.setEntriesIsSet(true);
648             } else { 
649               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
650             }
651             break;
652           default:
653             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
654         }
655         iprot.readFieldEnd();
656       }
657       iprot.readStructEnd();
658 
659       // check for required fields of primitive type, which can't be checked in the validate method
660       struct.validate();
661     }
662 
663     public void write(org.apache.thrift.protocol.TProtocol oprot, TMutation struct) throws org.apache.thrift.TException {
664       struct.validate();
665 
666       oprot.writeStructBegin(STRUCT_DESC);
667       if (struct.row != null) {
668         oprot.writeFieldBegin(ROW_FIELD_DESC);
669         oprot.writeBinary(struct.row);
670         oprot.writeFieldEnd();
671       }
672       if (struct.data != null) {
673         oprot.writeFieldBegin(DATA_FIELD_DESC);
674         oprot.writeBinary(struct.data);
675         oprot.writeFieldEnd();
676       }
677       if (struct.values != null) {
678         oprot.writeFieldBegin(VALUES_FIELD_DESC);
679         {
680           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
681           for (ByteBuffer _iter3 : struct.values)
682           {
683             oprot.writeBinary(_iter3);
684           }
685           oprot.writeListEnd();
686         }
687         oprot.writeFieldEnd();
688       }
689       oprot.writeFieldBegin(ENTRIES_FIELD_DESC);
690       oprot.writeI32(struct.entries);
691       oprot.writeFieldEnd();
692       oprot.writeFieldStop();
693       oprot.writeStructEnd();
694     }
695 
696   }
697 
698   private static class TMutationTupleSchemeFactory implements SchemeFactory {
699     public TMutationTupleScheme getScheme() {
700       return new TMutationTupleScheme();
701     }
702   }
703 
704   private static class TMutationTupleScheme extends TupleScheme<TMutation> {
705 
706     @Override
707     public void write(org.apache.thrift.protocol.TProtocol prot, TMutation struct) throws org.apache.thrift.TException {
708       TTupleProtocol oprot = (TTupleProtocol) prot;
709       BitSet optionals = new BitSet();
710       if (struct.isSetRow()) {
711         optionals.set(0);
712       }
713       if (struct.isSetData()) {
714         optionals.set(1);
715       }
716       if (struct.isSetValues()) {
717         optionals.set(2);
718       }
719       if (struct.isSetEntries()) {
720         optionals.set(3);
721       }
722       oprot.writeBitSet(optionals, 4);
723       if (struct.isSetRow()) {
724         oprot.writeBinary(struct.row);
725       }
726       if (struct.isSetData()) {
727         oprot.writeBinary(struct.data);
728       }
729       if (struct.isSetValues()) {
730         {
731           oprot.writeI32(struct.values.size());
732           for (ByteBuffer _iter4 : struct.values)
733           {
734             oprot.writeBinary(_iter4);
735           }
736         }
737       }
738       if (struct.isSetEntries()) {
739         oprot.writeI32(struct.entries);
740       }
741     }
742 
743     @Override
744     public void read(org.apache.thrift.protocol.TProtocol prot, TMutation struct) throws org.apache.thrift.TException {
745       TTupleProtocol iprot = (TTupleProtocol) prot;
746       BitSet incoming = iprot.readBitSet(4);
747       if (incoming.get(0)) {
748         struct.row = iprot.readBinary();
749         struct.setRowIsSet(true);
750       }
751       if (incoming.get(1)) {
752         struct.data = iprot.readBinary();
753         struct.setDataIsSet(true);
754       }
755       if (incoming.get(2)) {
756         {
757           org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
758           struct.values = new ArrayList<ByteBuffer>(_list5.size);
759           for (int _i6 = 0; _i6 < _list5.size; ++_i6)
760           {
761             ByteBuffer _elem7; // required
762             _elem7 = iprot.readBinary();
763             struct.values.add(_elem7);
764           }
765         }
766         struct.setValuesIsSet(true);
767       }
768       if (incoming.get(3)) {
769         struct.entries = iprot.readI32();
770         struct.setEntriesIsSet(true);
771       }
772     }
773   }
774 
775 }
776