You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2010/07/14 04:47:04 UTC
svn commit: r963928 [2/4] - in /cassandra/trunk: ./
interface/thrift/gen-java/org/apache/cassandra/thrift/ lib/ lib/licenses/
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ 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 Cassandra {
@@ -286,7 +288,75 @@ public class Cassandra {
}
- public static class Client implements Iface {
+ public interface AsyncIface {
+
+ public void login(AuthenticationRequest auth_request, AsyncMethodCallback<AsyncClient.login_call> resultHandler) throws TException;
+
+ public void set_keyspace(String keyspace, AsyncMethodCallback<AsyncClient.set_keyspace_call> resultHandler) throws TException;
+
+ public void get(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.get_call> resultHandler) throws TException;
+
+ public void get_slice(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.get_slice_call> resultHandler) throws TException;
+
+ public void multiget_slice(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.multiget_slice_call> resultHandler) throws TException;
+
+ public void get_count(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.get_count_call> resultHandler) throws TException;
+
+ public void multiget_count(String keyspace, List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.multiget_count_call> resultHandler) throws TException;
+
+ public void get_range_slices(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.get_range_slices_call> resultHandler) throws TException;
+
+ public void scan(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.scan_call> resultHandler) throws TException;
+
+ public void scan_count(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.scan_count_call> resultHandler) throws TException;
+
+ public void insert(byte[] key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.insert_call> resultHandler) throws TException;
+
+ public void remove(byte[] key, ColumnPath column_path, Clock clock, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.remove_call> resultHandler) throws TException;
+
+ public void batch_mutate(Map<byte[],Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, AsyncMethodCallback<AsyncClient.batch_mutate_call> resultHandler) throws TException;
+
+ public void truncate(String cfname, AsyncMethodCallback<AsyncClient.truncate_call> resultHandler) throws TException;
+
+ public void check_schema_agreement(AsyncMethodCallback<AsyncClient.check_schema_agreement_call> resultHandler) throws TException;
+
+ public void describe_keyspaces(AsyncMethodCallback<AsyncClient.describe_keyspaces_call> resultHandler) throws TException;
+
+ public void describe_cluster_name(AsyncMethodCallback<AsyncClient.describe_cluster_name_call> resultHandler) throws TException;
+
+ public void describe_version(AsyncMethodCallback<AsyncClient.describe_version_call> resultHandler) throws TException;
+
+ public void describe_ring(String keyspace, AsyncMethodCallback<AsyncClient.describe_ring_call> resultHandler) throws TException;
+
+ public void describe_keyspace(String keyspace, AsyncMethodCallback<AsyncClient.describe_keyspace_call> resultHandler) throws TException;
+
+ public void describe_splits(String keyspace, String cfName, String start_token, String end_token, int keys_per_split, AsyncMethodCallback<AsyncClient.describe_splits_call> resultHandler) throws TException;
+
+ public void system_add_column_family(CfDef cf_def, AsyncMethodCallback<AsyncClient.system_add_column_family_call> resultHandler) throws TException;
+
+ public void system_drop_column_family(String column_family, AsyncMethodCallback<AsyncClient.system_drop_column_family_call> resultHandler) throws TException;
+
+ public void system_rename_column_family(String old_name, String new_name, AsyncMethodCallback<AsyncClient.system_rename_column_family_call> resultHandler) throws TException;
+
+ public void system_add_keyspace(KsDef ks_def, AsyncMethodCallback<AsyncClient.system_add_keyspace_call> resultHandler) throws TException;
+
+ public void system_drop_keyspace(String keyspace, AsyncMethodCallback<AsyncClient.system_drop_keyspace_call> resultHandler) throws TException;
+
+ public void system_rename_keyspace(String old_name, String new_name, AsyncMethodCallback<AsyncClient.system_rename_keyspace_call> resultHandler) throws TException;
+
+ }
+
+ public static class Client implements TServiceClient, Iface {
+ public static class Factory implements TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(TProtocol iprot, TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
public Client(TProtocol prot)
{
this(prot, prot);
@@ -321,9 +391,9 @@ public class Cassandra {
public void send_login(AuthenticationRequest auth_request) throws TException
{
- oprot_.writeMessageBegin(new TMessage("login", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("login", TMessageType.CALL, ++seqid_));
login_args args = new login_args();
- args.auth_request = auth_request;
+ args.setAuth_request(auth_request);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -337,6 +407,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "login failed: out of sequence response");
+ }
login_result result = new login_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -360,9 +433,9 @@ public class Cassandra {
public void send_set_keyspace(String keyspace) throws TException
{
- oprot_.writeMessageBegin(new TMessage("set_keyspace", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("set_keyspace", TMessageType.CALL, ++seqid_));
set_keyspace_args args = new set_keyspace_args();
- args.keyspace = keyspace;
+ args.setKeyspace(keyspace);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -376,6 +449,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "set_keyspace failed: out of sequence response");
+ }
set_keyspace_result result = new set_keyspace_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -393,11 +469,11 @@ public class Cassandra {
public void send_get(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("get", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("get", TMessageType.CALL, ++seqid_));
get_args args = new get_args();
- args.key = key;
- args.column_path = column_path;
- args.consistency_level = consistency_level;
+ args.setKey(key);
+ args.setColumn_path(column_path);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -411,6 +487,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get failed: out of sequence response");
+ }
get_result result = new get_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -440,12 +519,12 @@ public class Cassandra {
public void send_get_slice(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("get_slice", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("get_slice", TMessageType.CALL, ++seqid_));
get_slice_args args = new get_slice_args();
- args.key = key;
- args.column_parent = column_parent;
- args.predicate = predicate;
- args.consistency_level = consistency_level;
+ args.setKey(key);
+ args.setColumn_parent(column_parent);
+ args.setPredicate(predicate);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -459,6 +538,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_slice failed: out of sequence response");
+ }
get_slice_result result = new get_slice_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -485,12 +567,12 @@ public class Cassandra {
public void send_multiget_slice(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("multiget_slice", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("multiget_slice", TMessageType.CALL, ++seqid_));
multiget_slice_args args = new multiget_slice_args();
- args.keys = keys;
- args.column_parent = column_parent;
- args.predicate = predicate;
- args.consistency_level = consistency_level;
+ args.setKeys(keys);
+ args.setColumn_parent(column_parent);
+ args.setPredicate(predicate);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -504,6 +586,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "multiget_slice failed: out of sequence response");
+ }
multiget_slice_result result = new multiget_slice_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -530,12 +615,12 @@ public class Cassandra {
public void send_get_count(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("get_count", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("get_count", TMessageType.CALL, ++seqid_));
get_count_args args = new get_count_args();
- args.key = key;
- args.column_parent = column_parent;
- args.predicate = predicate;
- args.consistency_level = consistency_level;
+ args.setKey(key);
+ args.setColumn_parent(column_parent);
+ args.setPredicate(predicate);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -549,6 +634,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_count failed: out of sequence response");
+ }
get_count_result result = new get_count_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -575,13 +663,13 @@ public class Cassandra {
public void send_multiget_count(String keyspace, List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("multiget_count", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("multiget_count", TMessageType.CALL, ++seqid_));
multiget_count_args args = new multiget_count_args();
- args.keyspace = keyspace;
- args.keys = keys;
- args.column_parent = column_parent;
- args.predicate = predicate;
- args.consistency_level = consistency_level;
+ args.setKeyspace(keyspace);
+ args.setKeys(keys);
+ args.setColumn_parent(column_parent);
+ args.setPredicate(predicate);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -595,6 +683,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "multiget_count failed: out of sequence response");
+ }
multiget_count_result result = new multiget_count_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -621,12 +712,12 @@ public class Cassandra {
public void send_get_range_slices(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("get_range_slices", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("get_range_slices", TMessageType.CALL, ++seqid_));
get_range_slices_args args = new get_range_slices_args();
- args.column_parent = column_parent;
- args.predicate = predicate;
- args.range = range;
- args.consistency_level = consistency_level;
+ args.setColumn_parent(column_parent);
+ args.setPredicate(predicate);
+ args.setRange(range);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -640,6 +731,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(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();
@@ -666,12 +760,12 @@ public class Cassandra {
public void send_scan(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("scan", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("scan", TMessageType.CALL, ++seqid_));
scan_args args = new scan_args();
- args.column_parent = column_parent;
- args.row_predicate = row_predicate;
- args.column_predicate = column_predicate;
- args.consistency_level = consistency_level;
+ args.setColumn_parent(column_parent);
+ args.setRow_predicate(row_predicate);
+ args.setColumn_predicate(column_predicate);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -685,6 +779,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scan failed: out of sequence response");
+ }
scan_result result = new scan_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -711,12 +808,12 @@ public class Cassandra {
public void send_scan_count(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("scan_count", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("scan_count", TMessageType.CALL, ++seqid_));
scan_count_args args = new scan_count_args();
- args.column_parent = column_parent;
- args.row_predicate = row_predicate;
- args.column_predicate = column_predicate;
- args.consistency_level = consistency_level;
+ args.setColumn_parent(column_parent);
+ args.setRow_predicate(row_predicate);
+ args.setColumn_predicate(column_predicate);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -730,6 +827,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scan_count failed: out of sequence response");
+ }
scan_count_result result = new scan_count_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -756,12 +856,12 @@ public class Cassandra {
public void send_insert(byte[] key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("insert", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("insert", TMessageType.CALL, ++seqid_));
insert_args args = new insert_args();
- args.key = key;
- args.column_parent = column_parent;
- args.column = column;
- args.consistency_level = consistency_level;
+ args.setKey(key);
+ args.setColumn_parent(column_parent);
+ args.setColumn(column);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -775,6 +875,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "insert failed: out of sequence response");
+ }
insert_result result = new insert_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -798,12 +901,12 @@ public class Cassandra {
public void send_remove(byte[] key, ColumnPath column_path, Clock clock, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("remove", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("remove", TMessageType.CALL, ++seqid_));
remove_args args = new remove_args();
- args.key = key;
- args.column_path = column_path;
- args.clock = clock;
- args.consistency_level = consistency_level;
+ args.setKey(key);
+ args.setColumn_path(column_path);
+ args.setClock(clock);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -817,6 +920,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "remove failed: out of sequence response");
+ }
remove_result result = new remove_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -840,10 +946,10 @@ public class Cassandra {
public void send_batch_mutate(Map<byte[],Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws TException
{
- oprot_.writeMessageBegin(new TMessage("batch_mutate", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("batch_mutate", TMessageType.CALL, ++seqid_));
batch_mutate_args args = new batch_mutate_args();
- args.mutation_map = mutation_map;
- args.consistency_level = consistency_level;
+ args.setMutation_map(mutation_map);
+ args.setConsistency_level(consistency_level);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -857,6 +963,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "batch_mutate failed: out of sequence response");
+ }
batch_mutate_result result = new batch_mutate_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -880,9 +989,9 @@ public class Cassandra {
public void send_truncate(String cfname) throws TException
{
- oprot_.writeMessageBegin(new TMessage("truncate", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("truncate", TMessageType.CALL, ++seqid_));
truncate_args args = new truncate_args();
- args.cfname = cfname;
+ args.setCfname(cfname);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -896,6 +1005,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "truncate failed: out of sequence response");
+ }
truncate_result result = new truncate_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -916,7 +1028,7 @@ public class Cassandra {
public void send_check_schema_agreement() throws TException
{
- oprot_.writeMessageBegin(new TMessage("check_schema_agreement", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("check_schema_agreement", TMessageType.CALL, ++seqid_));
check_schema_agreement_args args = new check_schema_agreement_args();
args.write(oprot_);
oprot_.writeMessageEnd();
@@ -931,6 +1043,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "check_schema_agreement failed: out of sequence response");
+ }
check_schema_agreement_result result = new check_schema_agreement_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -951,7 +1066,7 @@ public class Cassandra {
public void send_describe_keyspaces() throws TException
{
- oprot_.writeMessageBegin(new TMessage("describe_keyspaces", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("describe_keyspaces", TMessageType.CALL, ++seqid_));
describe_keyspaces_args args = new describe_keyspaces_args();
args.write(oprot_);
oprot_.writeMessageEnd();
@@ -966,6 +1081,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "describe_keyspaces failed: out of sequence response");
+ }
describe_keyspaces_result result = new describe_keyspaces_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -983,7 +1101,7 @@ public class Cassandra {
public void send_describe_cluster_name() throws TException
{
- oprot_.writeMessageBegin(new TMessage("describe_cluster_name", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("describe_cluster_name", TMessageType.CALL, ++seqid_));
describe_cluster_name_args args = new describe_cluster_name_args();
args.write(oprot_);
oprot_.writeMessageEnd();
@@ -998,6 +1116,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(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();
@@ -1015,7 +1136,7 @@ public class Cassandra {
public void send_describe_version() throws TException
{
- oprot_.writeMessageBegin(new TMessage("describe_version", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("describe_version", TMessageType.CALL, ++seqid_));
describe_version_args args = new describe_version_args();
args.write(oprot_);
oprot_.writeMessageEnd();
@@ -1030,6 +1151,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "describe_version failed: out of sequence response");
+ }
describe_version_result result = new describe_version_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -1047,9 +1171,9 @@ public class Cassandra {
public void send_describe_ring(String keyspace) throws TException
{
- oprot_.writeMessageBegin(new TMessage("describe_ring", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("describe_ring", TMessageType.CALL, ++seqid_));
describe_ring_args args = new describe_ring_args();
- args.keyspace = keyspace;
+ args.setKeyspace(keyspace);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1063,6 +1187,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "describe_ring failed: out of sequence response");
+ }
describe_ring_result result = new describe_ring_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -1083,9 +1210,9 @@ public class Cassandra {
public void send_describe_keyspace(String keyspace) throws TException
{
- oprot_.writeMessageBegin(new TMessage("describe_keyspace", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("describe_keyspace", TMessageType.CALL, ++seqid_));
describe_keyspace_args args = new describe_keyspace_args();
- args.keyspace = keyspace;
+ args.setKeyspace(keyspace);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1099,6 +1226,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "describe_keyspace failed: out of sequence response");
+ }
describe_keyspace_result result = new describe_keyspace_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -1119,13 +1249,13 @@ public class Cassandra {
public void send_describe_splits(String keyspace, String cfName, String start_token, String end_token, int keys_per_split) throws TException
{
- oprot_.writeMessageBegin(new TMessage("describe_splits", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("describe_splits", TMessageType.CALL, ++seqid_));
describe_splits_args args = new describe_splits_args();
- args.keyspace = keyspace;
- args.cfName = cfName;
- args.start_token = start_token;
- args.end_token = end_token;
- args.keys_per_split = keys_per_split;
+ args.setKeyspace(keyspace);
+ 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();
@@ -1139,6 +1269,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "describe_splits failed: out of sequence response");
+ }
describe_splits_result result = new describe_splits_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -1156,9 +1289,9 @@ public class Cassandra {
public void send_system_add_column_family(CfDef cf_def) throws TException
{
- oprot_.writeMessageBegin(new TMessage("system_add_column_family", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("system_add_column_family", TMessageType.CALL, ++seqid_));
system_add_column_family_args args = new system_add_column_family_args();
- args.cf_def = cf_def;
+ args.setCf_def(cf_def);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1172,6 +1305,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(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();
@@ -1192,9 +1328,9 @@ public class Cassandra {
public void send_system_drop_column_family(String column_family) throws TException
{
- oprot_.writeMessageBegin(new TMessage("system_drop_column_family", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("system_drop_column_family", TMessageType.CALL, ++seqid_));
system_drop_column_family_args args = new system_drop_column_family_args();
- args.column_family = column_family;
+ args.setColumn_family(column_family);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1208,6 +1344,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(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();
@@ -1228,10 +1367,10 @@ public class Cassandra {
public void send_system_rename_column_family(String old_name, String new_name) throws TException
{
- oprot_.writeMessageBegin(new TMessage("system_rename_column_family", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("system_rename_column_family", TMessageType.CALL, ++seqid_));
system_rename_column_family_args args = new system_rename_column_family_args();
- args.old_name = old_name;
- args.new_name = new_name;
+ args.setOld_name(old_name);
+ args.setNew_name(new_name);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1245,6 +1384,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "system_rename_column_family failed: out of sequence response");
+ }
system_rename_column_family_result result = new system_rename_column_family_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -1265,9 +1407,9 @@ public class Cassandra {
public void send_system_add_keyspace(KsDef ks_def) throws TException
{
- oprot_.writeMessageBegin(new TMessage("system_add_keyspace", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("system_add_keyspace", TMessageType.CALL, ++seqid_));
system_add_keyspace_args args = new system_add_keyspace_args();
- args.ks_def = ks_def;
+ args.setKs_def(ks_def);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1281,6 +1423,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(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();
@@ -1301,9 +1446,9 @@ public class Cassandra {
public void send_system_drop_keyspace(String keyspace) throws TException
{
- oprot_.writeMessageBegin(new TMessage("system_drop_keyspace", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("system_drop_keyspace", TMessageType.CALL, ++seqid_));
system_drop_keyspace_args args = new system_drop_keyspace_args();
- args.keyspace = keyspace;
+ args.setKeyspace(keyspace);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1317,6 +1462,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(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();
@@ -1337,10 +1485,10 @@ public class Cassandra {
public void send_system_rename_keyspace(String old_name, String new_name) throws TException
{
- oprot_.writeMessageBegin(new TMessage("system_rename_keyspace", TMessageType.CALL, seqid_));
+ oprot_.writeMessageBegin(new TMessage("system_rename_keyspace", TMessageType.CALL, ++seqid_));
system_rename_keyspace_args args = new system_rename_keyspace_args();
- args.old_name = old_name;
- args.new_name = new_name;
+ args.setOld_name(old_name);
+ args.setNew_name(new_name);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -1354,6 +1502,9 @@ public class Cassandra {
iprot_.readMessageEnd();
throw x;
}
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "system_rename_keyspace failed: out of sequence response");
+ }
system_rename_keyspace_result result = new system_rename_keyspace_result();
result.read(iprot_);
iprot_.readMessageEnd();
@@ -1367,6 +1518,961 @@ public class Cassandra {
}
}
+ public static class AsyncClient extends TAsyncClient implements AsyncIface {
+ public static class Factory implements TAsyncClientFactory<AsyncClient> {
+ private TAsyncClientManager clientManager;
+ private TProtocolFactory protocolFactory;
+ public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void login(AuthenticationRequest auth_request, AsyncMethodCallback<login_call> resultHandler) throws TException {
+ checkReady();
+ login_call method_call = new login_call(auth_request, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class login_call extends TAsyncMethodCall {
+ private AuthenticationRequest auth_request;
+ public login_call(AuthenticationRequest auth_request, AsyncMethodCallback<login_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.auth_request = auth_request;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("login", TMessageType.CALL, 0));
+ login_args args = new login_args();
+ args.setAuth_request(auth_request);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public AccessLevel getResult() throws AuthenticationException, AuthorizationException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_login();
+ }
+ }
+
+ public void set_keyspace(String keyspace, AsyncMethodCallback<set_keyspace_call> resultHandler) throws TException {
+ checkReady();
+ set_keyspace_call method_call = new set_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class set_keyspace_call extends TAsyncMethodCall {
+ private String keyspace;
+ public set_keyspace_call(String keyspace, AsyncMethodCallback<set_keyspace_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keyspace = keyspace;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("set_keyspace", TMessageType.CALL, 0));
+ set_keyspace_args args = new set_keyspace_args();
+ args.setKeyspace(keyspace);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_set_keyspace();
+ }
+ }
+
+ public void get(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level, AsyncMethodCallback<get_call> resultHandler) throws TException {
+ checkReady();
+ get_call method_call = new get_call(key, column_path, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class get_call extends TAsyncMethodCall {
+ private byte[] key;
+ private ColumnPath column_path;
+ private ConsistencyLevel consistency_level;
+ public get_call(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level, AsyncMethodCallback<get_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.key = key;
+ this.column_path = column_path;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("get", TMessageType.CALL, 0));
+ get_args args = new get_args();
+ args.setKey(key);
+ args.setColumn_path(column_path);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ColumnOrSuperColumn getResult() throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_get();
+ }
+ }
+
+ public void get_slice(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<get_slice_call> resultHandler) throws TException {
+ checkReady();
+ get_slice_call method_call = new get_slice_call(key, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class get_slice_call extends TAsyncMethodCall {
+ private byte[] key;
+ private ColumnParent column_parent;
+ private SlicePredicate predicate;
+ private ConsistencyLevel consistency_level;
+ public get_slice_call(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<get_slice_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.key = key;
+ this.column_parent = column_parent;
+ this.predicate = predicate;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("get_slice", TMessageType.CALL, 0));
+ 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(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<ColumnOrSuperColumn> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_get_slice();
+ }
+ }
+
+ public void multiget_slice(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<multiget_slice_call> resultHandler) throws TException {
+ checkReady();
+ multiget_slice_call method_call = new multiget_slice_call(keys, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class multiget_slice_call extends TAsyncMethodCall {
+ private List<byte[]> keys;
+ private ColumnParent column_parent;
+ private SlicePredicate predicate;
+ private ConsistencyLevel consistency_level;
+ public multiget_slice_call(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<multiget_slice_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keys = keys;
+ this.column_parent = column_parent;
+ this.predicate = predicate;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("multiget_slice", TMessageType.CALL, 0));
+ 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(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<byte[],List<ColumnOrSuperColumn>> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_multiget_slice();
+ }
+ }
+
+ public void get_count(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<get_count_call> resultHandler) throws TException {
+ checkReady();
+ get_count_call method_call = new get_count_call(key, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class get_count_call extends TAsyncMethodCall {
+ private byte[] key;
+ private ColumnParent column_parent;
+ private SlicePredicate predicate;
+ private ConsistencyLevel consistency_level;
+ public get_count_call(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<get_count_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.key = key;
+ this.column_parent = column_parent;
+ this.predicate = predicate;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("get_count", TMessageType.CALL, 0));
+ 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(prot);
+ prot.writeMessageEnd();
+ }
+
+ public int getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_get_count();
+ }
+ }
+
+ public void multiget_count(String keyspace, List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<multiget_count_call> resultHandler) throws TException {
+ checkReady();
+ multiget_count_call method_call = new multiget_count_call(keyspace, keys, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class multiget_count_call extends TAsyncMethodCall {
+ private String keyspace;
+ private List<byte[]> keys;
+ private ColumnParent column_parent;
+ private SlicePredicate predicate;
+ private ConsistencyLevel consistency_level;
+ public multiget_count_call(String keyspace, List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<multiget_count_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keyspace = keyspace;
+ this.keys = keys;
+ this.column_parent = column_parent;
+ this.predicate = predicate;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("multiget_count", TMessageType.CALL, 0));
+ multiget_count_args args = new multiget_count_args();
+ args.setKeyspace(keyspace);
+ args.setKeys(keys);
+ args.setColumn_parent(column_parent);
+ args.setPredicate(predicate);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<byte[],Integer> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_multiget_count();
+ }
+ }
+
+ public void get_range_slices(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, AsyncMethodCallback<get_range_slices_call> resultHandler) throws TException {
+ checkReady();
+ get_range_slices_call method_call = new get_range_slices_call(column_parent, predicate, range, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class get_range_slices_call extends TAsyncMethodCall {
+ private ColumnParent column_parent;
+ private SlicePredicate predicate;
+ private KeyRange range;
+ private ConsistencyLevel consistency_level;
+ public get_range_slices_call(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, AsyncMethodCallback<get_range_slices_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.column_parent = column_parent;
+ this.predicate = predicate;
+ this.range = range;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("get_range_slices", TMessageType.CALL, 0));
+ 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(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<KeySlice> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_get_range_slices();
+ }
+ }
+
+ public void scan(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<scan_call> resultHandler) throws TException {
+ checkReady();
+ scan_call method_call = new scan_call(column_parent, row_predicate, column_predicate, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class scan_call extends TAsyncMethodCall {
+ private ColumnParent column_parent;
+ private RowPredicate row_predicate;
+ private SlicePredicate column_predicate;
+ private ConsistencyLevel consistency_level;
+ public scan_call(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<scan_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.column_parent = column_parent;
+ this.row_predicate = row_predicate;
+ this.column_predicate = column_predicate;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("scan", TMessageType.CALL, 0));
+ scan_args args = new scan_args();
+ args.setColumn_parent(column_parent);
+ args.setRow_predicate(row_predicate);
+ args.setColumn_predicate(column_predicate);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<KeySlice> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_scan();
+ }
+ }
+
+ public void scan_count(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<scan_count_call> resultHandler) throws TException {
+ checkReady();
+ scan_count_call method_call = new scan_count_call(column_parent, row_predicate, column_predicate, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class scan_count_call extends TAsyncMethodCall {
+ private ColumnParent column_parent;
+ private RowPredicate row_predicate;
+ private SlicePredicate column_predicate;
+ private ConsistencyLevel consistency_level;
+ public scan_count_call(ColumnParent column_parent, RowPredicate row_predicate, SlicePredicate column_predicate, ConsistencyLevel consistency_level, AsyncMethodCallback<scan_count_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.column_parent = column_parent;
+ this.row_predicate = row_predicate;
+ this.column_predicate = column_predicate;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("scan_count", TMessageType.CALL, 0));
+ scan_count_args args = new scan_count_args();
+ args.setColumn_parent(column_parent);
+ args.setRow_predicate(row_predicate);
+ args.setColumn_predicate(column_predicate);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<KeyCount> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_scan_count();
+ }
+ }
+
+ public void insert(byte[] key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level, AsyncMethodCallback<insert_call> resultHandler) throws TException {
+ checkReady();
+ insert_call method_call = new insert_call(key, column_parent, column, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class insert_call extends TAsyncMethodCall {
+ private byte[] key;
+ private ColumnParent column_parent;
+ private Column column;
+ private ConsistencyLevel consistency_level;
+ public insert_call(byte[] key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level, AsyncMethodCallback<insert_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.key = key;
+ this.column_parent = column_parent;
+ this.column = column;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("insert", TMessageType.CALL, 0));
+ insert_args args = new insert_args();
+ args.setKey(key);
+ args.setColumn_parent(column_parent);
+ args.setColumn(column);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_insert();
+ }
+ }
+
+ public void remove(byte[] key, ColumnPath column_path, Clock clock, ConsistencyLevel consistency_level, AsyncMethodCallback<remove_call> resultHandler) throws TException {
+ checkReady();
+ remove_call method_call = new remove_call(key, column_path, clock, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class remove_call extends TAsyncMethodCall {
+ private byte[] key;
+ private ColumnPath column_path;
+ private Clock clock;
+ private ConsistencyLevel consistency_level;
+ public remove_call(byte[] key, ColumnPath column_path, Clock clock, ConsistencyLevel consistency_level, AsyncMethodCallback<remove_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.key = key;
+ this.column_path = column_path;
+ this.clock = clock;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("remove", TMessageType.CALL, 0));
+ remove_args args = new remove_args();
+ args.setKey(key);
+ args.setColumn_path(column_path);
+ args.setClock(clock);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_remove();
+ }
+ }
+
+ public void batch_mutate(Map<byte[],Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, AsyncMethodCallback<batch_mutate_call> resultHandler) throws TException {
+ checkReady();
+ batch_mutate_call method_call = new batch_mutate_call(mutation_map, consistency_level, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class batch_mutate_call extends TAsyncMethodCall {
+ private Map<byte[],Map<String,List<Mutation>>> mutation_map;
+ private ConsistencyLevel consistency_level;
+ public batch_mutate_call(Map<byte[],Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, AsyncMethodCallback<batch_mutate_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.mutation_map = mutation_map;
+ this.consistency_level = consistency_level;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("batch_mutate", TMessageType.CALL, 0));
+ batch_mutate_args args = new batch_mutate_args();
+ args.setMutation_map(mutation_map);
+ args.setConsistency_level(consistency_level);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_batch_mutate();
+ }
+ }
+
+ public void truncate(String cfname, AsyncMethodCallback<truncate_call> resultHandler) throws TException {
+ checkReady();
+ truncate_call method_call = new truncate_call(cfname, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class truncate_call extends TAsyncMethodCall {
+ private String cfname;
+ public truncate_call(String cfname, AsyncMethodCallback<truncate_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.cfname = cfname;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("truncate", TMessageType.CALL, 0));
+ truncate_args args = new truncate_args();
+ args.setCfname(cfname);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws InvalidRequestException, UnavailableException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_truncate();
+ }
+ }
+
+ public void check_schema_agreement(AsyncMethodCallback<check_schema_agreement_call> resultHandler) throws TException {
+ checkReady();
+ check_schema_agreement_call method_call = new check_schema_agreement_call(resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class check_schema_agreement_call extends TAsyncMethodCall {
+ public check_schema_agreement_call(AsyncMethodCallback<check_schema_agreement_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("check_schema_agreement", TMessageType.CALL, 0));
+ check_schema_agreement_args args = new check_schema_agreement_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,List<String>> getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_check_schema_agreement();
+ }
+ }
+
+ public void describe_keyspaces(AsyncMethodCallback<describe_keyspaces_call> resultHandler) throws TException {
+ checkReady();
+ describe_keyspaces_call method_call = new describe_keyspaces_call(resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class describe_keyspaces_call extends TAsyncMethodCall {
+ public describe_keyspaces_call(AsyncMethodCallback<describe_keyspaces_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("describe_keyspaces", TMessageType.CALL, 0));
+ describe_keyspaces_args args = new describe_keyspaces_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Set<String> getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_keyspaces();
+ }
+ }
+
+ public void describe_cluster_name(AsyncMethodCallback<describe_cluster_name_call> resultHandler) throws TException {
+ checkReady();
+ describe_cluster_name_call method_call = new describe_cluster_name_call(resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class describe_cluster_name_call extends TAsyncMethodCall {
+ public describe_cluster_name_call(AsyncMethodCallback<describe_cluster_name_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("describe_cluster_name", TMessageType.CALL, 0));
+ describe_cluster_name_args args = new describe_cluster_name_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_cluster_name();
+ }
+ }
+
+ public void describe_version(AsyncMethodCallback<describe_version_call> resultHandler) throws TException {
+ checkReady();
+ describe_version_call method_call = new describe_version_call(resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class describe_version_call extends TAsyncMethodCall {
+ public describe_version_call(AsyncMethodCallback<describe_version_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("describe_version", TMessageType.CALL, 0));
+ describe_version_args args = new describe_version_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_version();
+ }
+ }
+
+ public void describe_ring(String keyspace, AsyncMethodCallback<describe_ring_call> resultHandler) throws TException {
+ checkReady();
+ describe_ring_call method_call = new describe_ring_call(keyspace, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class describe_ring_call extends TAsyncMethodCall {
+ private String keyspace;
+ public describe_ring_call(String keyspace, AsyncMethodCallback<describe_ring_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keyspace = keyspace;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("describe_ring", TMessageType.CALL, 0));
+ describe_ring_args args = new describe_ring_args();
+ args.setKeyspace(keyspace);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<TokenRange> getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_ring();
+ }
+ }
+
+ public void describe_keyspace(String keyspace, AsyncMethodCallback<describe_keyspace_call> resultHandler) throws TException {
+ checkReady();
+ describe_keyspace_call method_call = new describe_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class describe_keyspace_call extends TAsyncMethodCall {
+ private String keyspace;
+ public describe_keyspace_call(String keyspace, AsyncMethodCallback<describe_keyspace_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keyspace = keyspace;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("describe_keyspace", TMessageType.CALL, 0));
+ describe_keyspace_args args = new describe_keyspace_args();
+ args.setKeyspace(keyspace);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,Map<String,String>> getResult() throws NotFoundException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_keyspace();
+ }
+ }
+
+ public void describe_splits(String keyspace, String cfName, String start_token, String end_token, int keys_per_split, AsyncMethodCallback<describe_splits_call> resultHandler) throws TException {
+ checkReady();
+ describe_splits_call method_call = new describe_splits_call(keyspace, cfName, start_token, end_token, keys_per_split, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class describe_splits_call extends TAsyncMethodCall {
+ private String keyspace;
+ private String cfName;
+ private String start_token;
+ private String end_token;
+ private int keys_per_split;
+ public describe_splits_call(String keyspace, String cfName, String start_token, String end_token, int keys_per_split, AsyncMethodCallback<describe_splits_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keyspace = keyspace;
+ this.cfName = cfName;
+ this.start_token = start_token;
+ this.end_token = end_token;
+ this.keys_per_split = keys_per_split;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("describe_splits", TMessageType.CALL, 0));
+ describe_splits_args args = new describe_splits_args();
+ args.setKeyspace(keyspace);
+ args.setCfName(cfName);
+ args.setStart_token(start_token);
+ args.setEnd_token(end_token);
+ args.setKeys_per_split(keys_per_split);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<String> getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_splits();
+ }
+ }
+
+ public void system_add_column_family(CfDef cf_def, AsyncMethodCallback<system_add_column_family_call> resultHandler) throws TException {
+ checkReady();
+ system_add_column_family_call method_call = new system_add_column_family_call(cf_def, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class system_add_column_family_call extends TAsyncMethodCall {
+ private CfDef cf_def;
+ public system_add_column_family_call(CfDef cf_def, AsyncMethodCallback<system_add_column_family_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.cf_def = cf_def;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("system_add_column_family", TMessageType.CALL, 0));
+ system_add_column_family_args args = new system_add_column_family_args();
+ args.setCf_def(cf_def);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_system_add_column_family();
+ }
+ }
+
+ public void system_drop_column_family(String column_family, AsyncMethodCallback<system_drop_column_family_call> resultHandler) throws TException {
+ checkReady();
+ system_drop_column_family_call method_call = new system_drop_column_family_call(column_family, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class system_drop_column_family_call extends TAsyncMethodCall {
+ private String column_family;
+ public system_drop_column_family_call(String column_family, AsyncMethodCallback<system_drop_column_family_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.column_family = column_family;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("system_drop_column_family", TMessageType.CALL, 0));
+ system_drop_column_family_args args = new system_drop_column_family_args();
+ args.setColumn_family(column_family);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_system_drop_column_family();
+ }
+ }
+
+ public void system_rename_column_family(String old_name, String new_name, AsyncMethodCallback<system_rename_column_family_call> resultHandler) throws TException {
+ checkReady();
+ system_rename_column_family_call method_call = new system_rename_column_family_call(old_name, new_name, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class system_rename_column_family_call extends TAsyncMethodCall {
+ private String old_name;
+ private String new_name;
+ public system_rename_column_family_call(String old_name, String new_name, AsyncMethodCallback<system_rename_column_family_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.old_name = old_name;
+ this.new_name = new_name;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("system_rename_column_family", TMessageType.CALL, 0));
+ system_rename_column_family_args args = new system_rename_column_family_args();
+ args.setOld_name(old_name);
+ args.setNew_name(new_name);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_system_rename_column_family();
+ }
+ }
+
+ public void system_add_keyspace(KsDef ks_def, AsyncMethodCallback<system_add_keyspace_call> resultHandler) throws TException {
+ checkReady();
+ system_add_keyspace_call method_call = new system_add_keyspace_call(ks_def, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class system_add_keyspace_call extends TAsyncMethodCall {
+ private KsDef ks_def;
+ public system_add_keyspace_call(KsDef ks_def, AsyncMethodCallback<system_add_keyspace_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.ks_def = ks_def;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("system_add_keyspace", TMessageType.CALL, 0));
+ system_add_keyspace_args args = new system_add_keyspace_args();
+ args.setKs_def(ks_def);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_system_add_keyspace();
+ }
+ }
+
+ public void system_drop_keyspace(String keyspace, AsyncMethodCallback<system_drop_keyspace_call> resultHandler) throws TException {
+ checkReady();
+ system_drop_keyspace_call method_call = new system_drop_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class system_drop_keyspace_call extends TAsyncMethodCall {
+ private String keyspace;
+ public system_drop_keyspace_call(String keyspace, AsyncMethodCallback<system_drop_keyspace_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.keyspace = keyspace;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("system_drop_keyspace", TMessageType.CALL, 0));
+ system_drop_keyspace_args args = new system_drop_keyspace_args();
+ args.setKeyspace(keyspace);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_system_drop_keyspace();
+ }
+ }
+
+ public void system_rename_keyspace(String old_name, String new_name, AsyncMethodCallback<system_rename_keyspace_call> resultHandler) throws TException {
+ checkReady();
+ system_rename_keyspace_call method_call = new system_rename_keyspace_call(old_name, new_name, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class system_rename_keyspace_call extends TAsyncMethodCall {
+ private String old_name;
+ private String new_name;
+ public system_rename_keyspace_call(String old_name, String new_name, AsyncMethodCallback<system_rename_keyspace_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.old_name = old_name;
+ this.new_name = new_name;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("system_rename_keyspace", TMessageType.CALL, 0));
+ system_rename_keyspace_args args = new system_rename_keyspace_args();
+ args.setOld_name(old_name);
+ args.setNew_name(new_name);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws InvalidRequestException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_system_rename_keyspace();
+ }
+ }
+
+ }
+
public static class Processor implements TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(Iface iface)
@@ -2457,7 +3563,7 @@ public class Cassandra {
}
- public static class login_args implements TBase<login_args._Fields>, java.io.Serializable, Cloneable {
+ public static class login_args implements TBase<login_args, login_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("login_args");
private static final TField AUTH_REQUEST_FIELD_DESC = new TField("auth_request", TType.STRUCT, (short)1);
@@ -2468,12 +3574,10 @@ public class Cassandra {
public enum _Fields implements TFieldIdEnum {
AUTH_REQUEST((short)1, "auth_request");
- private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
@@ -2482,7 +3586,12 @@ public class Cassandra {
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- return byId.get(fieldId);
+ switch(fieldId) {
+ case 1: // AUTH_REQUEST
+ return AUTH_REQUEST;
+ default:
+ return null;
+ }
}
/**
@@ -2521,12 +3630,12 @@ public class Cassandra {
// isset id assignments
- public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
- put(_Fields.AUTH_REQUEST, new FieldMetaData("auth_request", TFieldRequirementType.REQUIRED,
- new StructMetaData(TType.STRUCT, AuthenticationRequest.class)));
- }});
-
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.AUTH_REQUEST, new FieldMetaData("auth_request", TFieldRequirementType.REQUIRED,
+ new StructMetaData(TType.STRUCT, AuthenticationRequest.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(login_args.class, metaDataMap);
}
@@ -2655,6 +3764,26 @@ public class Cassandra {
return 0;
}
+ public int compareTo(login_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ login_args typedOther = (login_args)other;
+
+ lastComparison = Boolean.valueOf(isSetAuth_request()).compareTo(typedOther.isSetAuth_request());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuth_request()) { lastComparison = TBaseHelper.compareTo(this.auth_request, typedOther.auth_request);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -2722,7 +3851,7 @@ public class Cassandra {
}
- public static class login_result implements TBase<login_result._Fields>, java.io.Serializable, Cloneable, Comparable<login_result> {
+ public static class login_result implements TBase<login_result, login_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("login_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
@@ -2747,12 +3876,10 @@ public class Cassandra {
AUTHNX((short)1, "authnx"),
AUTHZX((short)2, "authzx");
[... 4533 lines stripped ...]