cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [2/3] Upgrade Thrift to 0.7.0
Date Tue, 10 Jan 2012 20:47:48 GMT
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7c8c5704/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
index eb0310b..f96d1d0 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
@@ -1,5 +1,5 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  */
@@ -399,7 +399,7 @@ public class Cassandra {
 
   }
 
-  public static class Client implements org.apache.thrift.TServiceClient, Iface {
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
     public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
       public Factory() {}
       public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -412,28 +412,11 @@ public class Cassandra {
 
     public Client(org.apache.thrift.protocol.TProtocol prot)
     {
-      this(prot, prot);
+      super(prot, prot);
     }
 
-    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot)
-    {
-      iprot_ = iprot;
-      oprot_ = oprot;
-    }
-
-    protected org.apache.thrift.protocol.TProtocol iprot_;
-    protected org.apache.thrift.protocol.TProtocol oprot_;
-
-    protected int seqid_;
-
-    public org.apache.thrift.protocol.TProtocol getInputProtocol()
-    {
-      return this.iprot_;
-    }
-
-    public org.apache.thrift.protocol.TProtocol getOutputProtocol()
-    {
-      return this.oprot_;
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
     }
 
     public void login(AuthenticationRequest auth_request) throws AuthenticationException, AuthorizationException, org.apache.thrift.TException
@@ -444,28 +427,15 @@ public class Cassandra {
 
     public void send_login(AuthenticationRequest auth_request) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       login_args args = new login_args();
       args.setAuth_request(auth_request);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("login", args);
     }
 
     public void recv_login() throws AuthenticationException, AuthorizationException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "login failed: out of sequence response");
-      }
       login_result result = new login_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "login");
       if (result.authnx != null) {
         throw result.authnx;
       }
@@ -483,28 +453,15 @@ public class Cassandra {
 
     public void send_set_keyspace(String keyspace) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_keyspace", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       set_keyspace_args args = new set_keyspace_args();
       args.setKeyspace(keyspace);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("set_keyspace", args);
     }
 
     public void recv_set_keyspace() throws InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "set_keyspace failed: out of sequence response");
-      }
       set_keyspace_result result = new set_keyspace_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "set_keyspace");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -519,30 +476,17 @@ public class Cassandra {
 
     public void send_get(ByteBuffer key, ColumnPath column_path, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       get_args args = new get_args();
       args.setKey(key);
       args.setColumn_path(column_path);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("get", args);
     }
 
     public ColumnOrSuperColumn recv_get() throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get failed: out of sequence response");
-      }
       get_result result = new get_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "get");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -569,31 +513,18 @@ public class Cassandra {
 
     public void send_get_slice(ByteBuffer key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_slice", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       get_slice_args args = new get_slice_args();
       args.setKey(key);
       args.setColumn_parent(column_parent);
       args.setPredicate(predicate);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("get_slice", args);
     }
 
     public List<ColumnOrSuperColumn> recv_get_slice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_slice failed: out of sequence response");
-      }
       get_slice_result result = new get_slice_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "get_slice");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -617,31 +548,18 @@ public class Cassandra {
 
     public void send_get_count(ByteBuffer key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_count", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       get_count_args args = new get_count_args();
       args.setKey(key);
       args.setColumn_parent(column_parent);
       args.setPredicate(predicate);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("get_count", args);
     }
 
     public int recv_get_count() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_count failed: out of sequence response");
-      }
       get_count_result result = new get_count_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "get_count");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -665,31 +583,18 @@ public class Cassandra {
 
     public void send_multiget_slice(List<ByteBuffer> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_slice", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       multiget_slice_args args = new multiget_slice_args();
       args.setKeys(keys);
       args.setColumn_parent(column_parent);
       args.setPredicate(predicate);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("multiget_slice", args);
     }
 
     public Map<ByteBuffer,List<ColumnOrSuperColumn>> recv_multiget_slice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "multiget_slice failed: out of sequence response");
-      }
       multiget_slice_result result = new multiget_slice_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "multiget_slice");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -713,31 +618,18 @@ public class Cassandra {
 
     public void send_multiget_count(List<ByteBuffer> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_count", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       multiget_count_args args = new multiget_count_args();
       args.setKeys(keys);
       args.setColumn_parent(column_parent);
       args.setPredicate(predicate);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("multiget_count", args);
     }
 
     public Map<ByteBuffer,Integer> recv_multiget_count() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "multiget_count failed: out of sequence response");
-      }
       multiget_count_result result = new multiget_count_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "multiget_count");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -761,31 +653,18 @@ public class Cassandra {
 
     public void send_get_range_slices(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slices", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       get_range_slices_args args = new get_range_slices_args();
       args.setColumn_parent(column_parent);
       args.setPredicate(predicate);
       args.setRange(range);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("get_range_slices", args);
     }
 
     public List<KeySlice> recv_get_range_slices() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_range_slices failed: out of sequence response");
-      }
       get_range_slices_result result = new get_range_slices_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "get_range_slices");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -809,31 +688,18 @@ public class Cassandra {
 
     public void send_get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_indexed_slices", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       get_indexed_slices_args args = new get_indexed_slices_args();
       args.setColumn_parent(column_parent);
       args.setIndex_clause(index_clause);
       args.setColumn_predicate(column_predicate);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("get_indexed_slices", args);
     }
 
     public List<KeySlice> recv_get_indexed_slices() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_indexed_slices failed: out of sequence response");
-      }
       get_indexed_slices_result result = new get_indexed_slices_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "get_indexed_slices");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -857,31 +723,18 @@ public class Cassandra {
 
     public void send_insert(ByteBuffer key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       insert_args args = new insert_args();
       args.setKey(key);
       args.setColumn_parent(column_parent);
       args.setColumn(column);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("insert", args);
     }
 
     public void recv_insert() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "insert failed: out of sequence response");
-      }
       insert_result result = new insert_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "insert");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -902,31 +755,18 @@ public class Cassandra {
 
     public void send_add(ByteBuffer key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       add_args args = new add_args();
       args.setKey(key);
       args.setColumn_parent(column_parent);
       args.setColumn(column);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("add", args);
     }
 
     public void recv_add() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "add failed: out of sequence response");
-      }
       add_result result = new add_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "add");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -947,31 +787,18 @@ public class Cassandra {
 
     public void send_remove(ByteBuffer key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       remove_args args = new remove_args();
       args.setKey(key);
       args.setColumn_path(column_path);
       args.setTimestamp(timestamp);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("remove", args);
     }
 
     public void recv_remove() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "remove failed: out of sequence response");
-      }
       remove_result result = new remove_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "remove");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -992,30 +819,17 @@ public class Cassandra {
 
     public void send_remove_counter(ByteBuffer key, ColumnPath path, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_counter", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       remove_counter_args args = new remove_counter_args();
       args.setKey(key);
       args.setPath(path);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("remove_counter", args);
     }
 
     public void recv_remove_counter() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "remove_counter failed: out of sequence response");
-      }
       remove_counter_result result = new remove_counter_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "remove_counter");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -1036,29 +850,16 @@ public class Cassandra {
 
     public void send_batch_mutate(Map<ByteBuffer,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_mutate", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       batch_mutate_args args = new batch_mutate_args();
       args.setMutation_map(mutation_map);
       args.setConsistency_level(consistency_level);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("batch_mutate", args);
     }
 
     public void recv_batch_mutate() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "batch_mutate failed: out of sequence response");
-      }
       batch_mutate_result result = new batch_mutate_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "batch_mutate");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -1079,28 +880,15 @@ public class Cassandra {
 
     public void send_truncate(String cfname) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncate", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       truncate_args args = new truncate_args();
       args.setCfname(cfname);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("truncate", args);
     }
 
     public void recv_truncate() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "truncate failed: out of sequence response");
-      }
       truncate_result result = new truncate_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "truncate");
       if (result.ire != null) {
         throw result.ire;
       }
@@ -1121,27 +909,14 @@ public class Cassandra {
 
     public void send_describe_schema_versions() throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_schema_versions", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_schema_versions_args args = new describe_schema_versions_args();
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_schema_versions", args);
     }
 
     public Map<String,List<String>> recv_describe_schema_versions() throws InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_schema_versions failed: out of sequence response");
-      }
       describe_schema_versions_result result = new describe_schema_versions_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_schema_versions");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1159,27 +934,14 @@ public class Cassandra {
 
     public void send_describe_keyspaces() throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspaces", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_keyspaces_args args = new describe_keyspaces_args();
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_keyspaces", args);
     }
 
     public List<KsDef> recv_describe_keyspaces() throws InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_keyspaces failed: out of sequence response");
-      }
       describe_keyspaces_result result = new describe_keyspaces_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_keyspaces");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1197,27 +959,14 @@ public class Cassandra {
 
     public void send_describe_cluster_name() throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_cluster_name", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_cluster_name_args args = new describe_cluster_name_args();
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_cluster_name", args);
     }
 
     public String recv_describe_cluster_name() throws org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_cluster_name failed: out of sequence response");
-      }
       describe_cluster_name_result result = new describe_cluster_name_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_cluster_name");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1232,27 +981,14 @@ public class Cassandra {
 
     public void send_describe_version() throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_version", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_version_args args = new describe_version_args();
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_version", args);
     }
 
     public String recv_describe_version() throws org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_version failed: out of sequence response");
-      }
       describe_version_result result = new describe_version_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_version");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1267,28 +1003,15 @@ public class Cassandra {
 
     public void send_describe_ring(String keyspace) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_ring", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_ring_args args = new describe_ring_args();
       args.setKeyspace(keyspace);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_ring", args);
     }
 
     public List<TokenRange> recv_describe_ring() throws InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_ring failed: out of sequence response");
-      }
       describe_ring_result result = new describe_ring_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_ring");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1306,27 +1029,14 @@ public class Cassandra {
 
     public void send_describe_partitioner() throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_partitioner", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_partitioner_args args = new describe_partitioner_args();
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_partitioner", args);
     }
 
     public String recv_describe_partitioner() throws org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_partitioner failed: out of sequence response");
-      }
       describe_partitioner_result result = new describe_partitioner_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_partitioner");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1341,27 +1051,14 @@ public class Cassandra {
 
     public void send_describe_snitch() throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_snitch", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_snitch_args args = new describe_snitch_args();
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_snitch", args);
     }
 
     public String recv_describe_snitch() throws org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_snitch failed: out of sequence response");
-      }
       describe_snitch_result result = new describe_snitch_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_snitch");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1376,28 +1073,15 @@ public class Cassandra {
 
     public void send_describe_keyspace(String keyspace) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspace", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_keyspace_args args = new describe_keyspace_args();
       args.setKeyspace(keyspace);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_keyspace", args);
     }
 
     public KsDef recv_describe_keyspace() throws NotFoundException, InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_keyspace failed: out of sequence response");
-      }
       describe_keyspace_result result = new describe_keyspace_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_keyspace");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1418,31 +1102,18 @@ public class Cassandra {
 
     public void send_describe_splits(String cfName, String start_token, String end_token, int keys_per_split) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_splits", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       describe_splits_args args = new describe_splits_args();
       args.setCfName(cfName);
       args.setStart_token(start_token);
       args.setEnd_token(end_token);
       args.setKeys_per_split(keys_per_split);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("describe_splits", args);
     }
 
     public List<String> recv_describe_splits() throws InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_splits failed: out of sequence response");
-      }
       describe_splits_result result = new describe_splits_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "describe_splits");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1460,28 +1131,15 @@ public class Cassandra {
 
     public void send_system_add_column_family(CfDef cf_def) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("system_add_column_family", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       system_add_column_family_args args = new system_add_column_family_args();
       args.setCf_def(cf_def);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("system_add_column_family", args);
     }
 
     public String recv_system_add_column_family() throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "system_add_column_family failed: out of sequence response");
-      }
       system_add_column_family_result result = new system_add_column_family_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "system_add_column_family");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1502,28 +1160,15 @@ public class Cassandra {
 
     public void send_system_drop_column_family(String column_family) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("system_drop_column_family", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       system_drop_column_family_args args = new system_drop_column_family_args();
       args.setColumn_family(column_family);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("system_drop_column_family", args);
     }
 
     public String recv_system_drop_column_family() throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "system_drop_column_family failed: out of sequence response");
-      }
       system_drop_column_family_result result = new system_drop_column_family_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "system_drop_column_family");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1544,28 +1189,15 @@ public class Cassandra {
 
     public void send_system_add_keyspace(KsDef ks_def) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("system_add_keyspace", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       system_add_keyspace_args args = new system_add_keyspace_args();
       args.setKs_def(ks_def);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("system_add_keyspace", args);
     }
 
     public String recv_system_add_keyspace() throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "system_add_keyspace failed: out of sequence response");
-      }
       system_add_keyspace_result result = new system_add_keyspace_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "system_add_keyspace");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1586,28 +1218,15 @@ public class Cassandra {
 
     public void send_system_drop_keyspace(String keyspace) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("system_drop_keyspace", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       system_drop_keyspace_args args = new system_drop_keyspace_args();
       args.setKeyspace(keyspace);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("system_drop_keyspace", args);
     }
 
     public String recv_system_drop_keyspace() throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "system_drop_keyspace failed: out of sequence response");
-      }
       system_drop_keyspace_result result = new system_drop_keyspace_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "system_drop_keyspace");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1628,28 +1247,15 @@ public class Cassandra {
 
     public void send_system_update_keyspace(KsDef ks_def) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("system_update_keyspace", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       system_update_keyspace_args args = new system_update_keyspace_args();
       args.setKs_def(ks_def);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("system_update_keyspace", args);
     }
 
     public String recv_system_update_keyspace() throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "system_update_keyspace failed: out of sequence response");
-      }
       system_update_keyspace_result result = new system_update_keyspace_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "system_update_keyspace");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1670,28 +1276,15 @@ public class Cassandra {
 
     public void send_system_update_column_family(CfDef cf_def) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("system_update_column_family", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       system_update_column_family_args args = new system_update_column_family_args();
       args.setCf_def(cf_def);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("system_update_column_family", args);
     }
 
     public String recv_system_update_column_family() throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "system_update_column_family failed: out of sequence response");
-      }
       system_update_column_family_result result = new system_update_column_family_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "system_update_column_family");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1712,29 +1305,16 @@ public class Cassandra {
 
     public void send_execute_cql_query(ByteBuffer query, Compression compression) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("execute_cql_query", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       execute_cql_query_args args = new execute_cql_query_args();
       args.setQuery(query);
       args.setCompression(compression);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("execute_cql_query", args);
     }
 
     public CqlResult recv_execute_cql_query() throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "execute_cql_query failed: out of sequence response");
-      }
       execute_cql_query_result result = new execute_cql_query_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "execute_cql_query");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1761,29 +1341,16 @@ public class Cassandra {
 
     public void send_prepare_cql_query(ByteBuffer query, Compression compression) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("prepare_cql_query", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       prepare_cql_query_args args = new prepare_cql_query_args();
       args.setQuery(query);
       args.setCompression(compression);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("prepare_cql_query", args);
     }
 
     public CqlPreparedResult recv_prepare_cql_query() throws InvalidRequestException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "prepare_cql_query failed: out of sequence response");
-      }
       prepare_cql_query_result result = new prepare_cql_query_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "prepare_cql_query");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1801,29 +1368,16 @@ public class Cassandra {
 
     public void send_execute_prepared_cql_query(int itemId, List<String> values) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("execute_prepared_cql_query", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       execute_prepared_cql_query_args args = new execute_prepared_cql_query_args();
       args.setItemId(itemId);
       args.setValues(values);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("execute_prepared_cql_query", args);
     }
 
     public CqlResult recv_execute_prepared_cql_query() throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "execute_prepared_cql_query failed: out of sequence response");
-      }
       execute_prepared_cql_query_result result = new execute_prepared_cql_query_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "execute_prepared_cql_query");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -1862,9 +1416,9 @@ public class Cassandra {
 
     public void login(AuthenticationRequest auth_request, org.apache.thrift.async.AsyncMethodCallback<login_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      login_call method_call = new login_call(auth_request, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      login_call method_call = new login_call(auth_request, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class login_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -1894,9 +1448,9 @@ public class Cassandra {
 
     public void set_keyspace(String keyspace, org.apache.thrift.async.AsyncMethodCallback<set_keyspace_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      set_keyspace_call method_call = new set_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      set_keyspace_call method_call = new set_keyspace_call(keyspace, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class set_keyspace_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -1926,9 +1480,9 @@ public class Cassandra {
 
     public void get(ByteBuffer key, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      get_call method_call = new get_call(key, column_path, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      get_call method_call = new get_call(key, column_path, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class get_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -1964,9 +1518,9 @@ public class Cassandra {
 
     public void get_slice(ByteBuffer key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_slice_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      get_slice_call method_call = new get_slice_call(key, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      get_slice_call method_call = new get_slice_call(key, column_parent, predicate, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class get_slice_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2005,9 +1559,9 @@ public class Cassandra {
 
     public void get_count(ByteBuffer key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_count_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      get_count_call method_call = new get_count_call(key, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      get_count_call method_call = new get_count_call(key, column_parent, predicate, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class get_count_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2046,9 +1600,9 @@ public class Cassandra {
 
     public void multiget_slice(List<ByteBuffer> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<multiget_slice_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      multiget_slice_call method_call = new multiget_slice_call(keys, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      multiget_slice_call method_call = new multiget_slice_call(keys, column_parent, predicate, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class multiget_slice_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2087,9 +1641,9 @@ public class Cassandra {
 
     public void multiget_count(List<ByteBuffer> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<multiget_count_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      multiget_count_call method_call = new multiget_count_call(keys, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      multiget_count_call method_call = new multiget_count_call(keys, column_parent, predicate, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class multiget_count_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2128,9 +1682,9 @@ public class Cassandra {
 
     public void get_range_slices(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_range_slices_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      get_range_slices_call method_call = new get_range_slices_call(column_parent, predicate, range, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      get_range_slices_call method_call = new get_range_slices_call(column_parent, predicate, range, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class get_range_slices_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2169,9 +1723,9 @@ public class Cassandra {
 
     public void get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_indexed_slices_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      get_indexed_slices_call method_call = new get_indexed_slices_call(column_parent, index_clause, column_predicate, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      get_indexed_slices_call method_call = new get_indexed_slices_call(column_parent, index_clause, column_predicate, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class get_indexed_slices_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2210,9 +1764,9 @@ public class Cassandra {
 
     public void insert(ByteBuffer key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<insert_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      insert_call method_call = new insert_call(key, column_parent, column, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      insert_call method_call = new insert_call(key, column_parent, column, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class insert_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2251,9 +1805,9 @@ public class Cassandra {
 
     public void add(ByteBuffer key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<add_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      add_call method_call = new add_call(key, column_parent, column, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      add_call method_call = new add_call(key, column_parent, column, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class add_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2292,9 +1846,9 @@ public class Cassandra {
 
     public void remove(ByteBuffer key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<remove_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      remove_call method_call = new remove_call(key, column_path, timestamp, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      remove_call method_call = new remove_call(key, column_path, timestamp, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class remove_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2333,9 +1887,9 @@ public class Cassandra {
 
     public void remove_counter(ByteBuffer key, ColumnPath path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<remove_counter_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      remove_counter_call method_call = new remove_counter_call(key, path, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      remove_counter_call method_call = new remove_counter_call(key, path, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class remove_counter_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2371,9 +1925,9 @@ public class Cassandra {
 
     public void batch_mutate(Map<ByteBuffer,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<batch_mutate_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      batch_mutate_call method_call = new batch_mutate_call(mutation_map, consistency_level, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      batch_mutate_call method_call = new batch_mutate_call(mutation_map, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class batch_mutate_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2406,9 +1960,9 @@ public class Cassandra {
 
     public void truncate(String cfname, org.apache.thrift.async.AsyncMethodCallback<truncate_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      truncate_call method_call = new truncate_call(cfname, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      truncate_call method_call = new truncate_call(cfname, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class truncate_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2438,9 +1992,9 @@ public class Cassandra {
 
     public void describe_schema_versions(org.apache.thrift.async.AsyncMethodCallback<describe_schema_versions_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_schema_versions_call method_call = new describe_schema_versions_call(resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_schema_versions_call method_call = new describe_schema_versions_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_schema_versions_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2467,9 +2021,9 @@ public class Cassandra {
 
     public void describe_keyspaces(org.apache.thrift.async.AsyncMethodCallback<describe_keyspaces_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_keyspaces_call method_call = new describe_keyspaces_call(resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_keyspaces_call method_call = new describe_keyspaces_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_keyspaces_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2496,9 +2050,9 @@ public class Cassandra {
 
     public void describe_cluster_name(org.apache.thrift.async.AsyncMethodCallback<describe_cluster_name_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_cluster_name_call method_call = new describe_cluster_name_call(resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_cluster_name_call method_call = new describe_cluster_name_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_cluster_name_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2525,9 +2079,9 @@ public class Cassandra {
 
     public void describe_version(org.apache.thrift.async.AsyncMethodCallback<describe_version_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_version_call method_call = new describe_version_call(resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_version_call method_call = new describe_version_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_version_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2554,9 +2108,9 @@ public class Cassandra {
 
     public void describe_ring(String keyspace, org.apache.thrift.async.AsyncMethodCallback<describe_ring_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_ring_call method_call = new describe_ring_call(keyspace, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_ring_call method_call = new describe_ring_call(keyspace, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_ring_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2586,9 +2140,9 @@ public class Cassandra {
 
     public void describe_partitioner(org.apache.thrift.async.AsyncMethodCallback<describe_partitioner_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_partitioner_call method_call = new describe_partitioner_call(resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_partitioner_call method_call = new describe_partitioner_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_partitioner_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2615,9 +2169,9 @@ public class Cassandra {
 
     public void describe_snitch(org.apache.thrift.async.AsyncMethodCallback<describe_snitch_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_snitch_call method_call = new describe_snitch_call(resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_snitch_call method_call = new describe_snitch_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_snitch_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2644,9 +2198,9 @@ public class Cassandra {
 
     public void describe_keyspace(String keyspace, org.apache.thrift.async.AsyncMethodCallback<describe_keyspace_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_keyspace_call method_call = new describe_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_keyspace_call method_call = new describe_keyspace_call(keyspace, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_keyspace_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2676,9 +2230,9 @@ public class Cassandra {
 
     public void describe_splits(String cfName, String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<describe_splits_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      describe_splits_call method_call = new describe_splits_call(cfName, start_token, end_token, keys_per_split, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      describe_splits_call method_call = new describe_splits_call(cfName, start_token, end_token, keys_per_split, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class describe_splits_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2717,9 +2271,9 @@ public class Cassandra {
 
     public void system_add_column_family(CfDef cf_def, org.apache.thrift.async.AsyncMethodCallback<system_add_column_family_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      system_add_column_family_call method_call = new system_add_column_family_call(cf_def, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      system_add_column_family_call method_call = new system_add_column_family_call(cf_def, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class system_add_column_family_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2749,9 +2303,9 @@ public class Cassandra {
 
     public void system_drop_column_family(String column_family, org.apache.thrift.async.AsyncMethodCallback<system_drop_column_family_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      system_drop_column_family_call method_call = new system_drop_column_family_call(column_family, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      system_drop_column_family_call method_call = new system_drop_column_family_call(column_family, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class system_drop_column_family_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2781,9 +2335,9 @@ public class Cassandra {
 
     public void system_add_keyspace(KsDef ks_def, org.apache.thrift.async.AsyncMethodCallback<system_add_keyspace_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      system_add_keyspace_call method_call = new system_add_keyspace_call(ks_def, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      system_add_keyspace_call method_call = new system_add_keyspace_call(ks_def, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class system_add_keyspace_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2813,9 +2367,9 @@ public class Cassandra {
 
     public void system_drop_keyspace(String keyspace, org.apache.thrift.async.AsyncMethodCallback<system_drop_keyspace_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      system_drop_keyspace_call method_call = new system_drop_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      system_drop_keyspace_call method_call = new system_drop_keyspace_call(keyspace, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class system_drop_keyspace_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2845,9 +2399,9 @@ public class Cassandra {
 
     public void system_update_keyspace(KsDef ks_def, org.apache.thrift.async.AsyncMethodCallback<system_update_keyspace_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      system_update_keyspace_call method_call = new system_update_keyspace_call(ks_def, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      system_update_keyspace_call method_call = new system_update_keyspace_call(ks_def, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class system_update_keyspace_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2877,9 +2431,9 @@ public class Cassandra {
 
     public void system_update_column_family(CfDef cf_def, org.apache.thrift.async.AsyncMethodCallback<system_update_column_family_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      system_update_column_family_call method_call = new system_update_column_family_call(cf_def, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      system_update_column_family_call method_call = new system_update_column_family_call(cf_def, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class system_update_column_family_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2909,9 +2463,9 @@ public class Cassandra {
 
     public void execute_cql_query(ByteBuffer query, Compression compression, org.apache.thrift.async.AsyncMethodCallback<execute_cql_query_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      execute_cql_query_call method_call = new execute_cql_query_call(query, compression, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      execute_cql_query_call method_call = new execute_cql_query_call(query, compression, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class execute_cql_query_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2944,9 +2498,9 @@ public class Cassandra {
 
     public void prepare_cql_query(ByteBuffer query, Compression compression, org.apache.thrift.async.AsyncMethodCallback<prepare_cql_query_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      prepare_cql_query_call method_call = new prepare_cql_query_call(query, compression, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      prepare_cql_query_call method_call = new prepare_cql_query_call(query, compression, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class prepare_cql_query_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -2979,9 +2533,9 @@ public class Cassandra {
 
     public void execute_prepared_cql_query(int itemId, List<String> values, org.apache.thrift.async.AsyncMethodCallback<execute_prepared_cql_query_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      execute_prepared_cql_query_call method_call = new execute_prepared_cql_query_call(itemId, values, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      execute_prepared_cql_query_call method_call = new execute_prepared_cql_query_call(itemId, values, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class execute_prepared_cql_query_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -3014,168 +2568,108 @@ public class Cassandra {
 
   }
 
-  public static class Processor implements org.apache.thrift.TProcessor {
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(Iface iface)
-    {
-      iface_ = iface;
-      processMap_.put("login", new login());
-      processMap_.put("set_keyspace", new set_keyspace());
-      processMap_.put("get", new get());
-      processMap_.put("get_slice", new get_slice());
-      processMap_.put("get_count", new get_count());
-      processMap_.put("multiget_slice", new multiget_slice());
-      processMap_.put("multiget_count", new multiget_count());
-      processMap_.put("get_range_slices", new get_range_slices());
-      processMap_.put("get_indexed_slices", new get_indexed_slices());
-      processMap_.put("insert", new insert());
-      processMap_.put("add", new add());
-      processMap_.put("remove", new remove());
-      processMap_.put("remove_counter", new remove_counter());
-      processMap_.put("batch_mutate", new batch_mutate());
-      processMap_.put("truncate", new truncate());
-      processMap_.put("describe_schema_versions", new describe_schema_versions());
-      processMap_.put("describe_keyspaces", new describe_keyspaces());
-      processMap_.put("describe_cluster_name", new describe_cluster_name());
-      processMap_.put("describe_version", new describe_version());
-      processMap_.put("describe_ring", new describe_ring());
-      processMap_.put("describe_partitioner", new describe_partitioner());
-      processMap_.put("describe_snitch", new describe_snitch());
-      processMap_.put("describe_keyspace", new describe_keyspace());
-      processMap_.put("describe_splits", new describe_splits());
-      processMap_.put("system_add_column_family", new system_add_column_family());
-      processMap_.put("system_drop_column_family", new system_drop_column_family());
-      processMap_.put("system_add_keyspace", new system_add_keyspace());
-      processMap_.put("system_drop_keyspace", new system_drop_keyspace());
-      processMap_.put("system_update_keyspace", new system_update_keyspace());
-      processMap_.put("system_update_column_family", new system_update_column_family());
-      processMap_.put("execute_cql_query", new execute_cql_query());
-      processMap_.put("prepare_cql_query", new prepare_cql_query());
-      processMap_.put("execute_prepared_cql_query", new execute_prepared_cql_query());
-    }
-
-    protected static interface ProcessFunction {
-      public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException;
-    }
-
-    private Iface iface_;
-    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
-
-    public boolean process(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
-    {
-      org.apache.thrift.protocol.TMessage msg = iprot.readMessageBegin();
-      ProcessFunction fn = processMap_.get(msg.name);
-      if (fn == null) {
-        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, org.apache.thrift.protocol.TType.STRUCT);
-        iprot.readMessageEnd();
-        org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
-        oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(msg.name, org.apache.thrift.protocol.TMessageType.EXCEPTION, msg.seqid));
-        x.write(oprot);
-        oprot.writeMessageEnd();
-        oprot.getTransport().flush();
-        return true;
-      }
-      fn.process(msg.seqid, iprot, oprot);
-      return true;
-    }
-
-    private class login implements ProcessFunction {
-      public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
-      {
-        login_args args = new login_args();
-        try {
-          args.read(iprot);
-        } catch (org.apache.thrift.protocol.TProtocolException e) {
-          iprot.readMessageEnd();
-          org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage());
-          oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid));
-          x.write(oprot);
-          oprot.writeMessageEnd();
-          oprot.getTransport().flush();
-          return;
-        }
-        iprot.readMessageEnd();
+    public Processor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+    }
+
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      processMap.put("login", new login());
+      processMap.put("set_keyspace", new set_keyspace());
+      processMap.put("get", new get());
+      processMap.put("get_slice", new get_slice());
+      processMap.put("get_count", new get_count());
+      processMap.put("multiget_slice", new multiget_slice());
+      processMap.put("multiget_count", new multiget_count());
+      processMap.put("get_range_slices", new get_range_slices());
+      processMap.put("get_indexed_slices", new get_indexed_slices());
+      processMap.put("insert", new insert());
+      processMap.put("add", new add());
+      processMap.put("remove", new remove());
+      processMap.put("remove_counter", new remove_counter());
+      processMap.put("batch_mutate", new batch_mutate());
+      processMap.put("truncate", new truncate());
+      processMap.put("describe_schema_versions", new describe_schema_versions());
+      processMap.put("describe_keyspaces", new describe_keyspaces());
+      processMap.put("describe_cluster_name", new describe_cluster_name());
+      processMap.put("describe_version", new describe_version());
+      processMap.put("describe_ring", new describe_ring());
+      processMap.put("describe_partitioner", new describe_partitioner());
+      processMap.put("describe_snitch", new describe_snitch());
+      processMap.put("describe_keyspace", new describe_keyspace());
+      processMap.put("describe_splits", new describe_splits());
+      processMap.put("system_add_column_family", new system_add_column_family());
+      processMap.put("system_drop_column_family", new system_drop_column_family());
+      processMap.put("system_add_keyspace", new system_add_keyspace());
+      processMap.put("system_drop_keyspace", new system_drop_keyspace());
+      processMap.put("system_update_keyspace", new system_update_keyspace());
+      processMap.put("system_update_column_family", new system_update_column_family());
+      processMap.put("execute_cql_query", new execute_cql_query());
+      processMap.put("prepare_cql_query", new prepare_cql_query());
+      processMap.put("execute_prepared_cql_query", new execute_prepared_cql_query());
+      return processMap;
+    }
+
+    private static class login<I extends Iface> extends org.apache.thrift.ProcessFunction<I, login_args> {
+      public login() {
+        super("login");
+      }
+
+      protected login_args getEmptyArgsInstance() {
+        return new login_args();
+      }
+
+      protected login_result getResult(I iface, login_args args) throws org.apache.thrift.TException {
         login_result result = new login_result();
         try {
-          iface_.login(args.auth_request);
+          iface.login(args.auth_request);
         } catch (AuthenticationException authnx) {
           result.authnx = authnx;
         } catch (AuthorizationException authzx) {
           result.authzx = authzx;
-        } catch (Throwable th) {
-          LOGGER.error("Internal error processing login", th);
-          org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing login");
-          oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid));
-          x.write(oprot);
-          oprot.writeMessageEnd();
-          oprot.getTransport().flush();
-          return;
         }
-        oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.REPLY, seqid));
-        result.write(oprot);
-        oprot.writeMessageEnd();
-        oprot.getTransport().flush();
+        return result;
       }
-
     }
 
-    private class set_keyspace implements ProcessFunction {
-      public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot

<TRUNCATED>

Mime
View raw message