cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r1090076 [5/7] - /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/
Date Fri, 08 Apr 2011 00:47:46 GMT
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java Fri Apr  8 00:47:44 2011
@@ -42,28 +42,22 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
 /**
  * Note that the timestamp is only optional in case of counter deletion.
  */
-public class Deletion implements TBase<Deletion, Deletion._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("Deletion");
+public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Deletion");
 
-  private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)1);
-  private static final TField SUPER_COLUMN_FIELD_DESC = new TField("super_column", TType.STRING, (short)2);
-  private static final TField PREDICATE_FIELD_DESC = new TField("predicate", TType.STRUCT, (short)3);
+  private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField SUPER_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("super_column", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
   public long timestamp;
   public ByteBuffer super_column;
   public SlicePredicate predicate;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     TIMESTAMP((short)1, "timestamp"),
     SUPER_COLUMN((short)2, "super_column"),
     PREDICATE((short)3, "predicate");
@@ -130,17 +124,17 @@ public class Deletion implements TBase<D
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.I64)));
-    tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.OPTIONAL, 
-        new StructMetaData(TType.STRUCT, SlicePredicate.class)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.SUPER_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("super_column", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.PREDICATE, new org.apache.thrift.meta_data.FieldMetaData("predicate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SlicePredicate.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(Deletion.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Deletion.class, metaDataMap);
   }
 
   public Deletion() {
@@ -154,7 +148,7 @@ public class Deletion implements TBase<D
     __isset_bit_vector.or(other.__isset_bit_vector);
     this.timestamp = other.timestamp;
     if (other.isSetSuper_column()) {
-      this.super_column = TBaseHelper.copyBinary(other.super_column);
+      this.super_column = org.apache.thrift.TBaseHelper.copyBinary(other.super_column);
 ;
     }
     if (other.isSetPredicate()) {
@@ -188,7 +182,7 @@ public class Deletion implements TBase<D
     __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
   }
 
-  /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
+  /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
   public boolean isSetTimestamp() {
     return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
   }
@@ -198,16 +192,16 @@ public class Deletion implements TBase<D
   }
 
   public byte[] getSuper_column() {
-    setSuper_column(TBaseHelper.rightSize(super_column));
-    return super_column.array();
+    setSuper_column(org.apache.thrift.TBaseHelper.rightSize(super_column));
+    return super_column == null ? null : super_column.array();
   }
 
-  public ByteBuffer BufferForSuper_column() {
+  public ByteBuffer bufferForSuper_column() {
     return super_column;
   }
 
   public Deletion setSuper_column(byte[] super_column) {
-    setSuper_column(ByteBuffer.wrap(super_column));
+    setSuper_column(super_column == null ? (ByteBuffer)null : ByteBuffer.wrap(super_column));
     return this;
   }
 
@@ -220,7 +214,7 @@ public class Deletion implements TBase<D
     this.super_column = null;
   }
 
-  /** Returns true if field super_column is set (has been asigned a value) and false otherwise */
+  /** Returns true if field super_column is set (has been assigned a value) and false otherwise */
   public boolean isSetSuper_column() {
     return this.super_column != null;
   }
@@ -244,7 +238,7 @@ public class Deletion implements TBase<D
     this.predicate = null;
   }
 
-  /** Returns true if field predicate is set (has been asigned a value) and false otherwise */
+  /** Returns true if field predicate is set (has been assigned a value) and false otherwise */
   public boolean isSetPredicate() {
     return this.predicate != null;
   }
@@ -299,7 +293,7 @@ public class Deletion implements TBase<D
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -394,7 +388,7 @@ public class Deletion implements TBase<D
       return lastComparison;
     }
     if (isSetTimestamp()) {
-      lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -404,7 +398,7 @@ public class Deletion implements TBase<D
       return lastComparison;
     }
     if (isSetSuper_column()) {
-      lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.super_column, typedOther.super_column);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -414,7 +408,7 @@ public class Deletion implements TBase<D
       return lastComparison;
     }
     if (isSetPredicate()) {
-      lastComparison = TBaseHelper.compareTo(this.predicate, typedOther.predicate);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.predicate, typedOther.predicate);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -426,41 +420,41 @@ public class Deletion implements TBase<D
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // TIMESTAMP
-          if (field.type == TType.I64) {
+          if (field.type == org.apache.thrift.protocol.TType.I64) {
             this.timestamp = iprot.readI64();
             setTimestampIsSet(true);
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // SUPER_COLUMN
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.super_column = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 3: // PREDICATE
-          if (field.type == TType.STRUCT) {
+          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
             this.predicate = new SlicePredicate();
             this.predicate.read(iprot);
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -470,7 +464,7 @@ public class Deletion implements TBase<D
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
@@ -513,7 +507,7 @@ public class Deletion implements TBase<D
       if (this.super_column == null) {
         sb.append("null");
       } else {
-        TBaseHelper.toString(this.super_column, sb);
+        org.apache.thrift.TBaseHelper.toString(this.super_column, sb);
       }
       first = false;
     }
@@ -531,9 +525,27 @@ public class Deletion implements TBase<D
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
   }
 
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java Fri Apr  8 00:47:44 2011
@@ -42,25 +42,19 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
-public class IndexClause implements TBase<IndexClause, IndexClause._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("IndexClause");
-
-  private static final TField EXPRESSIONS_FIELD_DESC = new TField("expressions", TType.LIST, (short)1);
-  private static final TField START_KEY_FIELD_DESC = new TField("start_key", TType.STRING, (short)2);
-  private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)3);
+public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexClause._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IndexClause");
+
+  private static final org.apache.thrift.protocol.TField EXPRESSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("expressions", org.apache.thrift.protocol.TType.LIST, (short)1);
+  private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("start_key", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)3);
 
   public List<IndexExpression> expressions;
   public ByteBuffer start_key;
   public int count;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     EXPRESSIONS((short)1, "expressions"),
     START_KEY((short)2, "start_key"),
     COUNT((short)3, "count");
@@ -127,18 +121,18 @@ public class IndexClause implements TBas
   private static final int __COUNT_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.EXPRESSIONS, new FieldMetaData("expressions", TFieldRequirementType.REQUIRED, 
-        new ListMetaData(TType.LIST, 
-            new StructMetaData(TType.STRUCT, IndexExpression.class))));
-    tmpMap.put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.I32)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.EXPRESSIONS, new org.apache.thrift.meta_data.FieldMetaData("expressions", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IndexExpression.class))));
+    tmpMap.put(_Fields.START_KEY, new org.apache.thrift.meta_data.FieldMetaData("start_key", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(IndexClause.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IndexClause.class, metaDataMap);
   }
 
   public IndexClause() {
@@ -172,7 +166,7 @@ public class IndexClause implements TBas
       this.expressions = __this__expressions;
     }
     if (other.isSetStart_key()) {
-      this.start_key = TBaseHelper.copyBinary(other.start_key);
+      this.start_key = org.apache.thrift.TBaseHelper.copyBinary(other.start_key);
 ;
     }
     this.count = other.count;
@@ -218,7 +212,7 @@ public class IndexClause implements TBas
     this.expressions = null;
   }
 
-  /** Returns true if field expressions is set (has been asigned a value) and false otherwise */
+  /** Returns true if field expressions is set (has been assigned a value) and false otherwise */
   public boolean isSetExpressions() {
     return this.expressions != null;
   }
@@ -230,16 +224,16 @@ public class IndexClause implements TBas
   }
 
   public byte[] getStart_key() {
-    setStart_key(TBaseHelper.rightSize(start_key));
-    return start_key.array();
+    setStart_key(org.apache.thrift.TBaseHelper.rightSize(start_key));
+    return start_key == null ? null : start_key.array();
   }
 
-  public ByteBuffer BufferForStart_key() {
+  public ByteBuffer bufferForStart_key() {
     return start_key;
   }
 
   public IndexClause setStart_key(byte[] start_key) {
-    setStart_key(ByteBuffer.wrap(start_key));
+    setStart_key(start_key == null ? (ByteBuffer)null : ByteBuffer.wrap(start_key));
     return this;
   }
 
@@ -252,7 +246,7 @@ public class IndexClause implements TBas
     this.start_key = null;
   }
 
-  /** Returns true if field start_key is set (has been asigned a value) and false otherwise */
+  /** Returns true if field start_key is set (has been assigned a value) and false otherwise */
   public boolean isSetStart_key() {
     return this.start_key != null;
   }
@@ -277,7 +271,7 @@ public class IndexClause implements TBas
     __isset_bit_vector.clear(__COUNT_ISSET_ID);
   }
 
-  /** Returns true if field count is set (has been asigned a value) and false otherwise */
+  /** Returns true if field count is set (has been assigned a value) and false otherwise */
   public boolean isSetCount() {
     return __isset_bit_vector.get(__COUNT_ISSET_ID);
   }
@@ -330,7 +324,7 @@ public class IndexClause implements TBas
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -425,7 +419,7 @@ public class IndexClause implements TBas
       return lastComparison;
     }
     if (isSetExpressions()) {
-      lastComparison = TBaseHelper.compareTo(this.expressions, typedOther.expressions);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expressions, typedOther.expressions);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -435,7 +429,7 @@ public class IndexClause implements TBas
       return lastComparison;
     }
     if (isSetStart_key()) {
-      lastComparison = TBaseHelper.compareTo(this.start_key, typedOther.start_key);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_key, typedOther.start_key);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -445,7 +439,7 @@ public class IndexClause implements TBas
       return lastComparison;
     }
     if (isSetCount()) {
-      lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, typedOther.count);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -457,20 +451,20 @@ public class IndexClause implements TBas
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // EXPRESSIONS
-          if (field.type == TType.LIST) {
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              TList _list12 = iprot.readListBegin();
+              org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
               this.expressions = new ArrayList<IndexExpression>(_list12.size);
               for (int _i13 = 0; _i13 < _list12.size; ++_i13)
               {
@@ -482,26 +476,26 @@ public class IndexClause implements TBas
               iprot.readListEnd();
             }
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // START_KEY
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.start_key = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 3: // COUNT
-          if (field.type == TType.I32) {
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
             this.count = iprot.readI32();
             setCountIsSet(true);
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -509,19 +503,19 @@ public class IndexClause implements TBas
 
     // check for required fields of primitive type, which can't be checked in the validate method
     if (!isSetCount()) {
-      throw new TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
     }
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
     if (this.expressions != null) {
       oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC);
       {
-        oprot.writeListBegin(new TList(TType.STRUCT, this.expressions.size()));
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.expressions.size()));
         for (IndexExpression _iter15 : this.expressions)
         {
           _iter15.write(oprot);
@@ -559,7 +553,7 @@ public class IndexClause implements TBas
     if (this.start_key == null) {
       sb.append("null");
     } else {
-      TBaseHelper.toString(this.start_key, sb);
+      org.apache.thrift.TBaseHelper.toString(this.start_key, sb);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -570,16 +564,34 @@ public class IndexClause implements TBas
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     if (expressions == null) {
-      throw new TProtocolException("Required field 'expressions' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'expressions' was not present! Struct: " + toString());
     }
     if (start_key == null) {
-      throw new TProtocolException("Required field 'start_key' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'start_key' was not present! Struct: " + toString());
     }
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java Fri Apr  8 00:47:44 2011
@@ -42,18 +42,12 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
-public class IndexExpression implements TBase<IndexExpression, IndexExpression._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("IndexExpression");
-
-  private static final TField COLUMN_NAME_FIELD_DESC = new TField("column_name", TType.STRING, (short)1);
-  private static final TField OP_FIELD_DESC = new TField("op", TType.I32, (short)2);
-  private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)3);
+public class IndexExpression implements org.apache.thrift.TBase<IndexExpression, IndexExpression._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IndexExpression");
+
+  private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField OP_FIELD_DESC = new org.apache.thrift.protocol.TField("op", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
 
   public ByteBuffer column_name;
   /**
@@ -64,7 +58,7 @@ public class IndexExpression implements 
   public ByteBuffer value;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     COLUMN_NAME((short)1, "column_name"),
     /**
      * 
@@ -133,17 +127,17 @@ public class IndexExpression implements 
 
   // isset id assignments
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.OP, new FieldMetaData("op", TFieldRequirementType.REQUIRED, 
-        new EnumMetaData(TType.ENUM, IndexOperator.class)));
-    tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.OP, new org.apache.thrift.meta_data.FieldMetaData("op", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, IndexOperator.class)));
+    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(IndexExpression.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IndexExpression.class, metaDataMap);
   }
 
   public IndexExpression() {
@@ -165,14 +159,14 @@ public class IndexExpression implements 
    */
   public IndexExpression(IndexExpression other) {
     if (other.isSetColumn_name()) {
-      this.column_name = TBaseHelper.copyBinary(other.column_name);
+      this.column_name = org.apache.thrift.TBaseHelper.copyBinary(other.column_name);
 ;
     }
     if (other.isSetOp()) {
       this.op = other.op;
     }
     if (other.isSetValue()) {
-      this.value = TBaseHelper.copyBinary(other.value);
+      this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
 ;
     }
   }
@@ -189,16 +183,16 @@ public class IndexExpression implements 
   }
 
   public byte[] getColumn_name() {
-    setColumn_name(TBaseHelper.rightSize(column_name));
-    return column_name.array();
+    setColumn_name(org.apache.thrift.TBaseHelper.rightSize(column_name));
+    return column_name == null ? null : column_name.array();
   }
 
-  public ByteBuffer BufferForColumn_name() {
+  public ByteBuffer bufferForColumn_name() {
     return column_name;
   }
 
   public IndexExpression setColumn_name(byte[] column_name) {
-    setColumn_name(ByteBuffer.wrap(column_name));
+    setColumn_name(column_name == null ? (ByteBuffer)null : ByteBuffer.wrap(column_name));
     return this;
   }
 
@@ -211,7 +205,7 @@ public class IndexExpression implements 
     this.column_name = null;
   }
 
-  /** Returns true if field column_name is set (has been asigned a value) and false otherwise */
+  /** Returns true if field column_name is set (has been assigned a value) and false otherwise */
   public boolean isSetColumn_name() {
     return this.column_name != null;
   }
@@ -243,7 +237,7 @@ public class IndexExpression implements 
     this.op = null;
   }
 
-  /** Returns true if field op is set (has been asigned a value) and false otherwise */
+  /** Returns true if field op is set (has been assigned a value) and false otherwise */
   public boolean isSetOp() {
     return this.op != null;
   }
@@ -255,16 +249,16 @@ public class IndexExpression implements 
   }
 
   public byte[] getValue() {
-    setValue(TBaseHelper.rightSize(value));
-    return value.array();
+    setValue(org.apache.thrift.TBaseHelper.rightSize(value));
+    return value == null ? null : value.array();
   }
 
-  public ByteBuffer BufferForValue() {
+  public ByteBuffer bufferForValue() {
     return value;
   }
 
   public IndexExpression setValue(byte[] value) {
-    setValue(ByteBuffer.wrap(value));
+    setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
     return this;
   }
 
@@ -277,7 +271,7 @@ public class IndexExpression implements 
     this.value = null;
   }
 
-  /** Returns true if field value is set (has been asigned a value) and false otherwise */
+  /** Returns true if field value is set (has been assigned a value) and false otherwise */
   public boolean isSetValue() {
     return this.value != null;
   }
@@ -332,7 +326,7 @@ public class IndexExpression implements 
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -427,7 +421,7 @@ public class IndexExpression implements 
       return lastComparison;
     }
     if (isSetColumn_name()) {
-      lastComparison = TBaseHelper.compareTo(this.column_name, typedOther.column_name);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, typedOther.column_name);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -437,7 +431,7 @@ public class IndexExpression implements 
       return lastComparison;
     }
     if (isSetOp()) {
-      lastComparison = TBaseHelper.compareTo(this.op, typedOther.op);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.op, typedOther.op);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -447,7 +441,7 @@ public class IndexExpression implements 
       return lastComparison;
     }
     if (isSetValue()) {
-      lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -459,39 +453,39 @@ public class IndexExpression implements 
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // COLUMN_NAME
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.column_name = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // OP
-          if (field.type == TType.I32) {
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
             this.op = IndexOperator.findByValue(iprot.readI32());
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 3: // VALUE
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.value = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -501,7 +495,7 @@ public class IndexExpression implements 
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
@@ -533,7 +527,7 @@ public class IndexExpression implements 
     if (this.column_name == null) {
       sb.append("null");
     } else {
-      TBaseHelper.toString(this.column_name, sb);
+      org.apache.thrift.TBaseHelper.toString(this.column_name, sb);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -549,23 +543,39 @@ public class IndexExpression implements 
     if (this.value == null) {
       sb.append("null");
     } else {
-      TBaseHelper.toString(this.value, sb);
+      org.apache.thrift.TBaseHelper.toString(this.value, sb);
     }
     first = false;
     sb.append(")");
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     if (column_name == null) {
-      throw new TProtocolException("Required field 'column_name' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_name' was not present! Struct: " + toString());
     }
     if (op == null) {
-      throw new TProtocolException("Required field 'op' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'op' was not present! Struct: " + toString());
     }
     if (value == null) {
-      throw new TProtocolException("Required field 'value' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
+    }
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
     }
   }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java Fri Apr  8 00:47:44 2011
@@ -31,7 +31,7 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
-public enum IndexOperator implements TEnum {
+public enum IndexOperator implements org.apache.thrift.TEnum {
   EQ(0),
   GTE(1),
   GT(2),

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java Fri Apr  8 00:47:44 2011
@@ -31,7 +31,7 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
-public enum IndexType implements TEnum {
+public enum IndexType implements org.apache.thrift.TEnum {
   KEYS(0);
 
   private final int value;

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java Fri Apr  8 00:47:44 2011
@@ -42,25 +42,19 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
 /**
  * Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
  * why contains an associated error message.
  */
-public class InvalidRequestException extends Exception implements TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("InvalidRequestException");
+public class InvalidRequestException extends Exception implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidRequestException");
 
-  private static final TField WHY_FIELD_DESC = new TField("why", TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", org.apache.thrift.protocol.TType.STRING, (short)1);
 
   public String why;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     WHY((short)1, "why");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -119,13 +113,13 @@ public class InvalidRequestException ext
 
   // isset id assignments
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.WHY, new org.apache.thrift.meta_data.FieldMetaData("why", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(InvalidRequestException.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidRequestException.class, metaDataMap);
   }
 
   public InvalidRequestException() {
@@ -169,7 +163,7 @@ public class InvalidRequestException ext
     this.why = null;
   }
 
-  /** Returns true if field why is set (has been asigned a value) and false otherwise */
+  /** Returns true if field why is set (has been assigned a value) and false otherwise */
   public boolean isSetWhy() {
     return this.why != null;
   }
@@ -202,7 +196,7 @@ public class InvalidRequestException ext
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -265,7 +259,7 @@ public class InvalidRequestException ext
       return lastComparison;
     }
     if (isSetWhy()) {
-      lastComparison = TBaseHelper.compareTo(this.why, typedOther.why);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.why, typedOther.why);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -277,25 +271,25 @@ public class InvalidRequestException ext
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // WHY
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.why = iprot.readString();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -305,7 +299,7 @@ public class InvalidRequestException ext
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
@@ -334,10 +328,26 @@ public class InvalidRequestException ext
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     if (why == null) {
-      throw new TProtocolException("Required field 'why' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'why' was not present! Struct: " + toString());
+    }
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
     }
   }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java Fri Apr  8 00:47:44 2011
@@ -42,23 +42,17 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
+public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyCount");
 
-public class KeyCount implements TBase<KeyCount, KeyCount._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("KeyCount");
-
-  private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)1);
-  private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)2);
 
   public ByteBuffer key;
   public int count;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     KEY((short)1, "key"),
     COUNT((short)2, "count");
 
@@ -122,15 +116,15 @@ public class KeyCount implements TBase<K
   private static final int __COUNT_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.KEY, new FieldMetaData("key", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.I32)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(KeyCount.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyCount.class, metaDataMap);
   }
 
   public KeyCount() {
@@ -153,7 +147,7 @@ public class KeyCount implements TBase<K
     __isset_bit_vector.clear();
     __isset_bit_vector.or(other.__isset_bit_vector);
     if (other.isSetKey()) {
-      this.key = TBaseHelper.copyBinary(other.key);
+      this.key = org.apache.thrift.TBaseHelper.copyBinary(other.key);
 ;
     }
     this.count = other.count;
@@ -171,16 +165,16 @@ public class KeyCount implements TBase<K
   }
 
   public byte[] getKey() {
-    setKey(TBaseHelper.rightSize(key));
-    return key.array();
+    setKey(org.apache.thrift.TBaseHelper.rightSize(key));
+    return key == null ? null : key.array();
   }
 
-  public ByteBuffer BufferForKey() {
+  public ByteBuffer bufferForKey() {
     return key;
   }
 
   public KeyCount setKey(byte[] key) {
-    setKey(ByteBuffer.wrap(key));
+    setKey(key == null ? (ByteBuffer)null : ByteBuffer.wrap(key));
     return this;
   }
 
@@ -193,7 +187,7 @@ public class KeyCount implements TBase<K
     this.key = null;
   }
 
-  /** Returns true if field key is set (has been asigned a value) and false otherwise */
+  /** Returns true if field key is set (has been assigned a value) and false otherwise */
   public boolean isSetKey() {
     return this.key != null;
   }
@@ -218,7 +212,7 @@ public class KeyCount implements TBase<K
     __isset_bit_vector.clear(__COUNT_ISSET_ID);
   }
 
-  /** Returns true if field count is set (has been asigned a value) and false otherwise */
+  /** Returns true if field count is set (has been assigned a value) and false otherwise */
   public boolean isSetCount() {
     return __isset_bit_vector.get(__COUNT_ISSET_ID);
   }
@@ -260,7 +254,7 @@ public class KeyCount implements TBase<K
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -339,7 +333,7 @@ public class KeyCount implements TBase<K
       return lastComparison;
     }
     if (isSetKey()) {
-      lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -349,7 +343,7 @@ public class KeyCount implements TBase<K
       return lastComparison;
     }
     if (isSetCount()) {
-      lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, typedOther.count);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -361,33 +355,33 @@ public class KeyCount implements TBase<K
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // KEY
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.key = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // COUNT
-          if (field.type == TType.I32) {
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
             this.count = iprot.readI32();
             setCountIsSet(true);
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -395,12 +389,12 @@ public class KeyCount implements TBase<K
 
     // check for required fields of primitive type, which can't be checked in the validate method
     if (!isSetCount()) {
-      throw new TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
     }
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
@@ -425,7 +419,7 @@ public class KeyCount implements TBase<K
     if (this.key == null) {
       sb.append("null");
     } else {
-      TBaseHelper.toString(this.key, sb);
+      org.apache.thrift.TBaseHelper.toString(this.key, sb);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -436,13 +430,31 @@ public class KeyCount implements TBase<K
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     if (key == null) {
-      throw new TProtocolException("Required field 'key' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
     }
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java Fri Apr  8 00:47:44 2011
@@ -42,12 +42,6 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
 /**
  * The semantics of start keys and tokens are slightly different.
  * Keys are start-inclusive; tokens are start-exclusive.  Token
@@ -56,14 +50,14 @@ import org.apache.thrift.protocol.*;
  * one-element range, but a range from tokenY to tokenY is the
  * full ring.
  */
-public class KeyRange implements TBase<KeyRange, KeyRange._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("KeyRange");
+public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyRange");
 
-  private static final TField START_KEY_FIELD_DESC = new TField("start_key", TType.STRING, (short)1);
-  private static final TField END_KEY_FIELD_DESC = new TField("end_key", TType.STRING, (short)2);
-  private static final TField START_TOKEN_FIELD_DESC = new TField("start_token", TType.STRING, (short)3);
-  private static final TField END_TOKEN_FIELD_DESC = new TField("end_token", TType.STRING, (short)4);
-  private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)5);
+  private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("start_key", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField END_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("end_key", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField START_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("start_token", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField END_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("end_token", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)5);
 
   public ByteBuffer start_key;
   public ByteBuffer end_key;
@@ -72,7 +66,7 @@ public class KeyRange implements TBase<K
   public int count;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     START_KEY((short)1, "start_key"),
     END_KEY((short)2, "end_key"),
     START_TOKEN((short)3, "start_token"),
@@ -145,21 +139,21 @@ public class KeyRange implements TBase<K
   private static final int __COUNT_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.END_KEY, new FieldMetaData("end_key", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.I32)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.START_KEY, new org.apache.thrift.meta_data.FieldMetaData("start_key", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.END_KEY, new org.apache.thrift.meta_data.FieldMetaData("end_key", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.START_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("start_token", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.END_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("end_token", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(KeyRange.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyRange.class, metaDataMap);
   }
 
   public KeyRange() {
@@ -182,11 +176,11 @@ public class KeyRange implements TBase<K
     __isset_bit_vector.clear();
     __isset_bit_vector.or(other.__isset_bit_vector);
     if (other.isSetStart_key()) {
-      this.start_key = TBaseHelper.copyBinary(other.start_key);
+      this.start_key = org.apache.thrift.TBaseHelper.copyBinary(other.start_key);
 ;
     }
     if (other.isSetEnd_key()) {
-      this.end_key = TBaseHelper.copyBinary(other.end_key);
+      this.end_key = org.apache.thrift.TBaseHelper.copyBinary(other.end_key);
 ;
     }
     if (other.isSetStart_token()) {
@@ -213,16 +207,16 @@ public class KeyRange implements TBase<K
   }
 
   public byte[] getStart_key() {
-    setStart_key(TBaseHelper.rightSize(start_key));
-    return start_key.array();
+    setStart_key(org.apache.thrift.TBaseHelper.rightSize(start_key));
+    return start_key == null ? null : start_key.array();
   }
 
-  public ByteBuffer BufferForStart_key() {
+  public ByteBuffer bufferForStart_key() {
     return start_key;
   }
 
   public KeyRange setStart_key(byte[] start_key) {
-    setStart_key(ByteBuffer.wrap(start_key));
+    setStart_key(start_key == null ? (ByteBuffer)null : ByteBuffer.wrap(start_key));
     return this;
   }
 
@@ -235,7 +229,7 @@ public class KeyRange implements TBase<K
     this.start_key = null;
   }
 
-  /** Returns true if field start_key is set (has been asigned a value) and false otherwise */
+  /** Returns true if field start_key is set (has been assigned a value) and false otherwise */
   public boolean isSetStart_key() {
     return this.start_key != null;
   }
@@ -247,16 +241,16 @@ public class KeyRange implements TBase<K
   }
 
   public byte[] getEnd_key() {
-    setEnd_key(TBaseHelper.rightSize(end_key));
-    return end_key.array();
+    setEnd_key(org.apache.thrift.TBaseHelper.rightSize(end_key));
+    return end_key == null ? null : end_key.array();
   }
 
-  public ByteBuffer BufferForEnd_key() {
+  public ByteBuffer bufferForEnd_key() {
     return end_key;
   }
 
   public KeyRange setEnd_key(byte[] end_key) {
-    setEnd_key(ByteBuffer.wrap(end_key));
+    setEnd_key(end_key == null ? (ByteBuffer)null : ByteBuffer.wrap(end_key));
     return this;
   }
 
@@ -269,7 +263,7 @@ public class KeyRange implements TBase<K
     this.end_key = null;
   }
 
-  /** Returns true if field end_key is set (has been asigned a value) and false otherwise */
+  /** Returns true if field end_key is set (has been assigned a value) and false otherwise */
   public boolean isSetEnd_key() {
     return this.end_key != null;
   }
@@ -293,7 +287,7 @@ public class KeyRange implements TBase<K
     this.start_token = null;
   }
 
-  /** Returns true if field start_token is set (has been asigned a value) and false otherwise */
+  /** Returns true if field start_token is set (has been assigned a value) and false otherwise */
   public boolean isSetStart_token() {
     return this.start_token != null;
   }
@@ -317,7 +311,7 @@ public class KeyRange implements TBase<K
     this.end_token = null;
   }
 
-  /** Returns true if field end_token is set (has been asigned a value) and false otherwise */
+  /** Returns true if field end_token is set (has been assigned a value) and false otherwise */
   public boolean isSetEnd_token() {
     return this.end_token != null;
   }
@@ -342,7 +336,7 @@ public class KeyRange implements TBase<K
     __isset_bit_vector.clear(__COUNT_ISSET_ID);
   }
 
-  /** Returns true if field count is set (has been asigned a value) and false otherwise */
+  /** Returns true if field count is set (has been assigned a value) and false otherwise */
   public boolean isSetCount() {
     return __isset_bit_vector.get(__COUNT_ISSET_ID);
   }
@@ -417,7 +411,7 @@ public class KeyRange implements TBase<K
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -544,7 +538,7 @@ public class KeyRange implements TBase<K
       return lastComparison;
     }
     if (isSetStart_key()) {
-      lastComparison = TBaseHelper.compareTo(this.start_key, typedOther.start_key);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_key, typedOther.start_key);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -554,7 +548,7 @@ public class KeyRange implements TBase<K
       return lastComparison;
     }
     if (isSetEnd_key()) {
-      lastComparison = TBaseHelper.compareTo(this.end_key, typedOther.end_key);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_key, typedOther.end_key);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -564,7 +558,7 @@ public class KeyRange implements TBase<K
       return lastComparison;
     }
     if (isSetStart_token()) {
-      lastComparison = TBaseHelper.compareTo(this.start_token, typedOther.start_token);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_token, typedOther.start_token);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -574,7 +568,7 @@ public class KeyRange implements TBase<K
       return lastComparison;
     }
     if (isSetEnd_token()) {
-      lastComparison = TBaseHelper.compareTo(this.end_token, typedOther.end_token);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_token, typedOther.end_token);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -584,7 +578,7 @@ public class KeyRange implements TBase<K
       return lastComparison;
     }
     if (isSetCount()) {
-      lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, typedOther.count);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -596,54 +590,54 @@ public class KeyRange implements TBase<K
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // START_KEY
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.start_key = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // END_KEY
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.end_key = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 3: // START_TOKEN
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.start_token = iprot.readString();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 4: // END_TOKEN
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.end_token = iprot.readString();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 5: // COUNT
-          if (field.type == TType.I32) {
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
             this.count = iprot.readI32();
             setCountIsSet(true);
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -651,12 +645,12 @@ public class KeyRange implements TBase<K
 
     // check for required fields of primitive type, which can't be checked in the validate method
     if (!isSetCount()) {
-      throw new TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
     }
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
@@ -705,7 +699,7 @@ public class KeyRange implements TBase<K
       if (this.start_key == null) {
         sb.append("null");
       } else {
-        TBaseHelper.toString(this.start_key, sb);
+        org.apache.thrift.TBaseHelper.toString(this.start_key, sb);
       }
       first = false;
     }
@@ -715,7 +709,7 @@ public class KeyRange implements TBase<K
       if (this.end_key == null) {
         sb.append("null");
       } else {
-        TBaseHelper.toString(this.end_key, sb);
+        org.apache.thrift.TBaseHelper.toString(this.end_key, sb);
       }
       first = false;
     }
@@ -747,10 +741,28 @@ public class KeyRange implements TBase<K
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java Fri Apr  8 00:47:44 2011
@@ -42,12 +42,6 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
 /**
  * A KeySlice is key followed by the data it maps to. A collection of KeySlice is returned by the get_range_slice operation.
  * 
@@ -55,17 +49,17 @@ import org.apache.thrift.protocol.*;
  * @param columns. List of data represented by the key. Typically, the list is pared down to only the columns specified by
  *                 a SlicePredicate.
  */
-public class KeySlice implements TBase<KeySlice, KeySlice._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("KeySlice");
+public class KeySlice implements org.apache.thrift.TBase<KeySlice, KeySlice._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeySlice");
 
-  private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)1);
-  private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)2);
+  private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2);
 
   public ByteBuffer key;
   public List<ColumnOrSuperColumn> columns;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  public enum _Fields implements TFieldIdEnum {
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     KEY((short)1, "key"),
     COLUMNS((short)2, "columns");
 
@@ -127,16 +121,16 @@ public class KeySlice implements TBase<K
 
   // isset id assignments
 
-  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
-    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.KEY, new FieldMetaData("key", TFieldRequirementType.REQUIRED, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.REQUIRED, 
-        new ListMetaData(TType.LIST, 
-            new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class))));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnOrSuperColumn.class))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(KeySlice.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeySlice.class, metaDataMap);
   }
 
   public KeySlice() {
@@ -156,7 +150,7 @@ public class KeySlice implements TBase<K
    */
   public KeySlice(KeySlice other) {
     if (other.isSetKey()) {
-      this.key = TBaseHelper.copyBinary(other.key);
+      this.key = org.apache.thrift.TBaseHelper.copyBinary(other.key);
 ;
     }
     if (other.isSetColumns()) {
@@ -179,16 +173,16 @@ public class KeySlice implements TBase<K
   }
 
   public byte[] getKey() {
-    setKey(TBaseHelper.rightSize(key));
-    return key.array();
+    setKey(org.apache.thrift.TBaseHelper.rightSize(key));
+    return key == null ? null : key.array();
   }
 
-  public ByteBuffer BufferForKey() {
+  public ByteBuffer bufferForKey() {
     return key;
   }
 
   public KeySlice setKey(byte[] key) {
-    setKey(ByteBuffer.wrap(key));
+    setKey(key == null ? (ByteBuffer)null : ByteBuffer.wrap(key));
     return this;
   }
 
@@ -201,7 +195,7 @@ public class KeySlice implements TBase<K
     this.key = null;
   }
 
-  /** Returns true if field key is set (has been asigned a value) and false otherwise */
+  /** Returns true if field key is set (has been assigned a value) and false otherwise */
   public boolean isSetKey() {
     return this.key != null;
   }
@@ -240,7 +234,7 @@ public class KeySlice implements TBase<K
     this.columns = null;
   }
 
-  /** Returns true if field columns is set (has been asigned a value) and false otherwise */
+  /** Returns true if field columns is set (has been assigned a value) and false otherwise */
   public boolean isSetColumns() {
     return this.columns != null;
   }
@@ -284,7 +278,7 @@ public class KeySlice implements TBase<K
     throw new IllegalStateException();
   }
 
-  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
@@ -363,7 +357,7 @@ public class KeySlice implements TBase<K
       return lastComparison;
     }
     if (isSetKey()) {
-      lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -373,7 +367,7 @@ public class KeySlice implements TBase<K
       return lastComparison;
     }
     if (isSetColumns()) {
-      lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -385,27 +379,27 @@ public class KeySlice implements TBase<K
     return _Fields.findByThriftId(fieldId);
   }
 
-  public void read(TProtocol iprot) throws TException {
-    TField field;
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
     iprot.readStructBegin();
     while (true)
     {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
         break;
       }
       switch (field.id) {
         case 1: // KEY
-          if (field.type == TType.STRING) {
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
             this.key = iprot.readBinary();
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // COLUMNS
-          if (field.type == TType.LIST) {
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              TList _list16 = iprot.readListBegin();
+              org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
               this.columns = new ArrayList<ColumnOrSuperColumn>(_list16.size);
               for (int _i17 = 0; _i17 < _list16.size; ++_i17)
               {
@@ -417,11 +411,11 @@ public class KeySlice implements TBase<K
               iprot.readListEnd();
             }
           } else { 
-            TProtocolUtil.skip(iprot, field.type);
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -431,7 +425,7 @@ public class KeySlice implements TBase<K
     validate();
   }
 
-  public void write(TProtocol oprot) throws TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     validate();
 
     oprot.writeStructBegin(STRUCT_DESC);
@@ -443,7 +437,7 @@ public class KeySlice implements TBase<K
     if (this.columns != null) {
       oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
       {
-        oprot.writeListBegin(new TList(TType.STRUCT, this.columns.size()));
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
         for (ColumnOrSuperColumn _iter19 : this.columns)
         {
           _iter19.write(oprot);
@@ -465,7 +459,7 @@ public class KeySlice implements TBase<K
     if (this.key == null) {
       sb.append("null");
     } else {
-      TBaseHelper.toString(this.key, sb);
+      org.apache.thrift.TBaseHelper.toString(this.key, sb);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -480,13 +474,29 @@ public class KeySlice implements TBase<K
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     if (key == null) {
-      throw new TProtocolException("Required field 'key' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
     }
     if (columns == null) {
-      throw new TProtocolException("Required field 'columns' was not present! Struct: " + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'columns' was not present! Struct: " + toString());
+    }
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
     }
   }
 



Mime
View raw message