cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r1090076 [7/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/TokenRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java
(original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.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 TokenRange implements TBase<TokenRange, TokenRange._Fields>, java.io.Serializable,
Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("TokenRange");
-
-  private static final TField START_TOKEN_FIELD_DESC = new TField("start_token", TType.STRING,
(short)1);
-  private static final TField END_TOKEN_FIELD_DESC = new TField("end_token", TType.STRING,
(short)2);
-  private static final TField ENDPOINTS_FIELD_DESC = new TField("endpoints", TType.LIST,
(short)3);
+public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRange._Fields>,
java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TokenRange");
+
+  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)1);
+  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)2);
+  private static final org.apache.thrift.protocol.TField ENDPOINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("endpoints",
org.apache.thrift.protocol.TType.LIST, (short)3);
 
   public String start_token;
   public String end_token;
   public List<String> endpoints;
 
   /** 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_TOKEN((short)1, "start_token"),
     END_TOKEN((short)2, "end_token"),
     ENDPOINTS((short)3, "endpoints");
@@ -125,18 +119,18 @@ public class TokenRange implements TBase
 
   // 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.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.REQUIRED,

-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.REQUIRED,

-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.ENDPOINTS, new FieldMetaData("endpoints", TFieldRequirementType.REQUIRED,

-        new ListMetaData(TType.LIST, 
-            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.START_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("start_token",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        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.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.ENDPOINTS, new org.apache.thrift.meta_data.FieldMetaData("endpoints",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,

+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(TokenRange.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TokenRange.class, metaDataMap);
   }
 
   public TokenRange() {
@@ -196,7 +190,7 @@ public class TokenRange implements TBase
     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;
   }
@@ -220,7 +214,7 @@ public class TokenRange implements TBase
     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;
   }
@@ -259,7 +253,7 @@ public class TokenRange implements TBase
     this.endpoints = null;
   }
 
-  /** Returns true if field endpoints is set (has been asigned a value) and false otherwise
*/
+  /** Returns true if field endpoints is set (has been assigned a value) and false otherwise
*/
   public boolean isSetEndpoints() {
     return this.endpoints != null;
   }
@@ -314,7 +308,7 @@ public class TokenRange implements TBase
     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();
@@ -409,7 +403,7 @@ public class TokenRange implements TBase
       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;
       }
@@ -419,7 +413,7 @@ public class TokenRange implements TBase
       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;
       }
@@ -429,7 +423,7 @@ public class TokenRange implements TBase
       return lastComparison;
     }
     if (isSetEndpoints()) {
-      lastComparison = TBaseHelper.compareTo(this.endpoints, typedOther.endpoints);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endpoints, typedOther.endpoints);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -441,34 +435,34 @@ public class TokenRange implements TBase
     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_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 2: // 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 3: // ENDPOINTS
-          if (field.type == TType.LIST) {
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              TList _list20 = iprot.readListBegin();
+              org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
               this.endpoints = new ArrayList<String>(_list20.size);
               for (int _i21 = 0; _i21 < _list20.size; ++_i21)
               {
@@ -479,11 +473,11 @@ public class TokenRange implements TBase
               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();
     }
@@ -493,7 +487,7 @@ public class TokenRange implements TBase
     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);
@@ -510,7 +504,7 @@ public class TokenRange implements TBase
     if (this.endpoints != null) {
       oprot.writeFieldBegin(ENDPOINTS_FIELD_DESC);
       {
-        oprot.writeListBegin(new TList(TType.STRING, this.endpoints.size()));
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
this.endpoints.size()));
         for (String _iter23 : this.endpoints)
         {
           oprot.writeString(_iter23);
@@ -555,16 +549,32 @@ public class TokenRange implements TBase
     return sb.toString();
   }
 
-  public void validate() throws TException {
+  public void validate() throws org.apache.thrift.TException {
     // check for required fields
     if (start_token == null) {
-      throw new TProtocolException("Required field 'start_token' was not present! Struct:
" + toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'start_token'
was not present! Struct: " + toString());
     }
     if (end_token == null) {
-      throw new TProtocolException("Required field 'end_token' was not present! Struct: "
+ toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'end_token'
was not present! Struct: " + toString());
     }
     if (endpoints == null) {
-      throw new TProtocolException("Required field 'endpoints' was not present! Struct: "
+ toString());
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'endpoints'
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/UnavailableException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java?rev=1090076&r1=1090075&r2=1090076&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java
(original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java
Fri Apr  8 00:47:44 2011
@@ -42,22 +42,16 @@ 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.*;
-
 /**
  * Not all the replicas required could be created and/or read.
  */
-public class UnavailableException extends Exception implements TBase<UnavailableException,
UnavailableException._Fields>, java.io.Serializable, Cloneable {
-  private static final TStruct STRUCT_DESC = new TStruct("UnavailableException");
+public class UnavailableException extends Exception implements org.apache.thrift.TBase<UnavailableException,
UnavailableException._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnavailableException");
 
 
 
   /** 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 {
 ;
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -111,11 +105,11 @@ public class UnavailableException extend
       return _fieldName;
     }
   }
-  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);
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    FieldMetaData.addStructMetaDataMap(UnavailableException.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnavailableException.class,
metaDataMap);
   }
 
   public UnavailableException() {
@@ -146,7 +140,7 @@ public class UnavailableException extend
     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();
@@ -195,18 +189,18 @@ public class UnavailableException extend
     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) {
         default:
-          TProtocolUtil.skip(iprot, field.type);
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
       iprot.readFieldEnd();
     }
@@ -216,7 +210,7 @@ public class UnavailableException extend
     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);
@@ -233,9 +227,25 @@ public class UnavailableException extend
     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 {
+      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