You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2013/01/14 21:30:11 UTC
[8/9] Upgrade thrift version to 0.9.0
http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/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 8a2e66e..300068c 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
@@ -1,7 +1,8 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.cassandra.thrift;
/*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -3218,7 +3228,7 @@ public class Cassandra {
}
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
@@ -3274,16 +3284,20 @@ public class Cassandra {
return processMap;
}
- private static class login<I extends Iface> extends org.apache.thrift.ProcessFunction<I, login_args> {
+ public static class login<I extends Iface> extends org.apache.thrift.ProcessFunction<I, login_args> {
public login() {
super("login");
}
- protected login_args getEmptyArgsInstance() {
+ public login_args getEmptyArgsInstance() {
return new login_args();
}
- protected login_result getResult(I iface, login_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public 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);
@@ -3296,16 +3310,20 @@ public class Cassandra {
}
}
- private static class set_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_keyspace_args> {
+ public static class set_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_keyspace_args> {
public set_keyspace() {
super("set_keyspace");
}
- protected set_keyspace_args getEmptyArgsInstance() {
+ public set_keyspace_args getEmptyArgsInstance() {
return new set_keyspace_args();
}
- protected set_keyspace_result getResult(I iface, set_keyspace_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public set_keyspace_result getResult(I iface, set_keyspace_args args) throws org.apache.thrift.TException {
set_keyspace_result result = new set_keyspace_result();
try {
iface.set_keyspace(args.keyspace);
@@ -3316,16 +3334,20 @@ public class Cassandra {
}
}
- private static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> {
+ public static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> {
public get() {
super("get");
}
- protected get_args getEmptyArgsInstance() {
+ public get_args getEmptyArgsInstance() {
return new get_args();
}
- protected get_result getResult(I iface, get_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException {
get_result result = new get_result();
try {
result.success = iface.get(args.key, args.column_path, args.consistency_level);
@@ -3342,16 +3364,20 @@ public class Cassandra {
}
}
- private static class get_slice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_slice_args> {
+ public static class get_slice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_slice_args> {
public get_slice() {
super("get_slice");
}
- protected get_slice_args getEmptyArgsInstance() {
+ public get_slice_args getEmptyArgsInstance() {
return new get_slice_args();
}
- protected get_slice_result getResult(I iface, get_slice_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_slice_result getResult(I iface, get_slice_args args) throws org.apache.thrift.TException {
get_slice_result result = new get_slice_result();
try {
result.success = iface.get_slice(args.key, args.column_parent, args.predicate, args.consistency_level);
@@ -3366,16 +3392,20 @@ public class Cassandra {
}
}
- private static class get_count<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_count_args> {
+ public static class get_count<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_count_args> {
public get_count() {
super("get_count");
}
- protected get_count_args getEmptyArgsInstance() {
+ public get_count_args getEmptyArgsInstance() {
return new get_count_args();
}
- protected get_count_result getResult(I iface, get_count_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_count_result getResult(I iface, get_count_args args) throws org.apache.thrift.TException {
get_count_result result = new get_count_result();
try {
result.success = iface.get_count(args.key, args.column_parent, args.predicate, args.consistency_level);
@@ -3391,16 +3421,20 @@ public class Cassandra {
}
}
- private static class multiget_slice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, multiget_slice_args> {
+ public static class multiget_slice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, multiget_slice_args> {
public multiget_slice() {
super("multiget_slice");
}
- protected multiget_slice_args getEmptyArgsInstance() {
+ public multiget_slice_args getEmptyArgsInstance() {
return new multiget_slice_args();
}
- protected multiget_slice_result getResult(I iface, multiget_slice_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public multiget_slice_result getResult(I iface, multiget_slice_args args) throws org.apache.thrift.TException {
multiget_slice_result result = new multiget_slice_result();
try {
result.success = iface.multiget_slice(args.keys, args.column_parent, args.predicate, args.consistency_level);
@@ -3415,16 +3449,20 @@ public class Cassandra {
}
}
- private static class multiget_count<I extends Iface> extends org.apache.thrift.ProcessFunction<I, multiget_count_args> {
+ public static class multiget_count<I extends Iface> extends org.apache.thrift.ProcessFunction<I, multiget_count_args> {
public multiget_count() {
super("multiget_count");
}
- protected multiget_count_args getEmptyArgsInstance() {
+ public multiget_count_args getEmptyArgsInstance() {
return new multiget_count_args();
}
- protected multiget_count_result getResult(I iface, multiget_count_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public multiget_count_result getResult(I iface, multiget_count_args args) throws org.apache.thrift.TException {
multiget_count_result result = new multiget_count_result();
try {
result.success = iface.multiget_count(args.keys, args.column_parent, args.predicate, args.consistency_level);
@@ -3439,16 +3477,20 @@ public class Cassandra {
}
}
- private static class get_range_slices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_range_slices_args> {
+ public static class get_range_slices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_range_slices_args> {
public get_range_slices() {
super("get_range_slices");
}
- protected get_range_slices_args getEmptyArgsInstance() {
+ public get_range_slices_args getEmptyArgsInstance() {
return new get_range_slices_args();
}
- protected get_range_slices_result getResult(I iface, get_range_slices_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_range_slices_result getResult(I iface, get_range_slices_args args) throws org.apache.thrift.TException {
get_range_slices_result result = new get_range_slices_result();
try {
result.success = iface.get_range_slices(args.column_parent, args.predicate, args.range, args.consistency_level);
@@ -3463,16 +3505,20 @@ public class Cassandra {
}
}
- private static class get_paged_slice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_paged_slice_args> {
+ public static class get_paged_slice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_paged_slice_args> {
public get_paged_slice() {
super("get_paged_slice");
}
- protected get_paged_slice_args getEmptyArgsInstance() {
+ public get_paged_slice_args getEmptyArgsInstance() {
return new get_paged_slice_args();
}
- protected get_paged_slice_result getResult(I iface, get_paged_slice_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_paged_slice_result getResult(I iface, get_paged_slice_args args) throws org.apache.thrift.TException {
get_paged_slice_result result = new get_paged_slice_result();
try {
result.success = iface.get_paged_slice(args.column_family, args.range, args.start_column, args.consistency_level);
@@ -3487,16 +3533,20 @@ public class Cassandra {
}
}
- private static class get_indexed_slices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_indexed_slices_args> {
+ public static class get_indexed_slices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_indexed_slices_args> {
public get_indexed_slices() {
super("get_indexed_slices");
}
- protected get_indexed_slices_args getEmptyArgsInstance() {
+ public get_indexed_slices_args getEmptyArgsInstance() {
return new get_indexed_slices_args();
}
- protected get_indexed_slices_result getResult(I iface, get_indexed_slices_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_indexed_slices_result getResult(I iface, get_indexed_slices_args args) throws org.apache.thrift.TException {
get_indexed_slices_result result = new get_indexed_slices_result();
try {
result.success = iface.get_indexed_slices(args.column_parent, args.index_clause, args.column_predicate, args.consistency_level);
@@ -3511,16 +3561,20 @@ public class Cassandra {
}
}
- private static class insert<I extends Iface> extends org.apache.thrift.ProcessFunction<I, insert_args> {
+ public static class insert<I extends Iface> extends org.apache.thrift.ProcessFunction<I, insert_args> {
public insert() {
super("insert");
}
- protected insert_args getEmptyArgsInstance() {
+ public insert_args getEmptyArgsInstance() {
return new insert_args();
}
- protected insert_result getResult(I iface, insert_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public insert_result getResult(I iface, insert_args args) throws org.apache.thrift.TException {
insert_result result = new insert_result();
try {
iface.insert(args.key, args.column_parent, args.column, args.consistency_level);
@@ -3535,16 +3589,20 @@ public class Cassandra {
}
}
- private static class add<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_args> {
+ public static class add<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_args> {
public add() {
super("add");
}
- protected add_args getEmptyArgsInstance() {
+ public add_args getEmptyArgsInstance() {
return new add_args();
}
- protected add_result getResult(I iface, add_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public add_result getResult(I iface, add_args args) throws org.apache.thrift.TException {
add_result result = new add_result();
try {
iface.add(args.key, args.column_parent, args.column, args.consistency_level);
@@ -3559,16 +3617,20 @@ public class Cassandra {
}
}
- private static class remove<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_args> {
+ public static class remove<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_args> {
public remove() {
super("remove");
}
- protected remove_args getEmptyArgsInstance() {
+ public remove_args getEmptyArgsInstance() {
return new remove_args();
}
- protected remove_result getResult(I iface, remove_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public remove_result getResult(I iface, remove_args args) throws org.apache.thrift.TException {
remove_result result = new remove_result();
try {
iface.remove(args.key, args.column_path, args.timestamp, args.consistency_level);
@@ -3583,16 +3645,20 @@ public class Cassandra {
}
}
- private static class remove_counter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_counter_args> {
+ public static class remove_counter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_counter_args> {
public remove_counter() {
super("remove_counter");
}
- protected remove_counter_args getEmptyArgsInstance() {
+ public remove_counter_args getEmptyArgsInstance() {
return new remove_counter_args();
}
- protected remove_counter_result getResult(I iface, remove_counter_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public remove_counter_result getResult(I iface, remove_counter_args args) throws org.apache.thrift.TException {
remove_counter_result result = new remove_counter_result();
try {
iface.remove_counter(args.key, args.path, args.consistency_level);
@@ -3607,16 +3673,20 @@ public class Cassandra {
}
}
- private static class batch_mutate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, batch_mutate_args> {
+ public static class batch_mutate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, batch_mutate_args> {
public batch_mutate() {
super("batch_mutate");
}
- protected batch_mutate_args getEmptyArgsInstance() {
+ public batch_mutate_args getEmptyArgsInstance() {
return new batch_mutate_args();
}
- protected batch_mutate_result getResult(I iface, batch_mutate_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public batch_mutate_result getResult(I iface, batch_mutate_args args) throws org.apache.thrift.TException {
batch_mutate_result result = new batch_mutate_result();
try {
iface.batch_mutate(args.mutation_map, args.consistency_level);
@@ -3631,16 +3701,20 @@ public class Cassandra {
}
}
- private static class atomic_batch_mutate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, atomic_batch_mutate_args> {
+ public static class atomic_batch_mutate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, atomic_batch_mutate_args> {
public atomic_batch_mutate() {
super("atomic_batch_mutate");
}
- protected atomic_batch_mutate_args getEmptyArgsInstance() {
+ public atomic_batch_mutate_args getEmptyArgsInstance() {
return new atomic_batch_mutate_args();
}
- protected atomic_batch_mutate_result getResult(I iface, atomic_batch_mutate_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public atomic_batch_mutate_result getResult(I iface, atomic_batch_mutate_args args) throws org.apache.thrift.TException {
atomic_batch_mutate_result result = new atomic_batch_mutate_result();
try {
iface.atomic_batch_mutate(args.mutation_map, args.consistency_level);
@@ -3655,16 +3729,20 @@ public class Cassandra {
}
}
- private static class truncate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, truncate_args> {
+ public static class truncate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, truncate_args> {
public truncate() {
super("truncate");
}
- protected truncate_args getEmptyArgsInstance() {
+ public truncate_args getEmptyArgsInstance() {
return new truncate_args();
}
- protected truncate_result getResult(I iface, truncate_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public truncate_result getResult(I iface, truncate_args args) throws org.apache.thrift.TException {
truncate_result result = new truncate_result();
try {
iface.truncate(args.cfname);
@@ -3679,16 +3757,20 @@ public class Cassandra {
}
}
- private static class describe_schema_versions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_schema_versions_args> {
+ public static class describe_schema_versions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_schema_versions_args> {
public describe_schema_versions() {
super("describe_schema_versions");
}
- protected describe_schema_versions_args getEmptyArgsInstance() {
+ public describe_schema_versions_args getEmptyArgsInstance() {
return new describe_schema_versions_args();
}
- protected describe_schema_versions_result getResult(I iface, describe_schema_versions_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_schema_versions_result getResult(I iface, describe_schema_versions_args args) throws org.apache.thrift.TException {
describe_schema_versions_result result = new describe_schema_versions_result();
try {
result.success = iface.describe_schema_versions();
@@ -3699,16 +3781,20 @@ public class Cassandra {
}
}
- private static class describe_keyspaces<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_keyspaces_args> {
+ public static class describe_keyspaces<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_keyspaces_args> {
public describe_keyspaces() {
super("describe_keyspaces");
}
- protected describe_keyspaces_args getEmptyArgsInstance() {
+ public describe_keyspaces_args getEmptyArgsInstance() {
return new describe_keyspaces_args();
}
- protected describe_keyspaces_result getResult(I iface, describe_keyspaces_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_keyspaces_result getResult(I iface, describe_keyspaces_args args) throws org.apache.thrift.TException {
describe_keyspaces_result result = new describe_keyspaces_result();
try {
result.success = iface.describe_keyspaces();
@@ -3719,48 +3805,60 @@ public class Cassandra {
}
}
- private static class describe_cluster_name<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_cluster_name_args> {
+ public static class describe_cluster_name<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_cluster_name_args> {
public describe_cluster_name() {
super("describe_cluster_name");
}
- protected describe_cluster_name_args getEmptyArgsInstance() {
+ public describe_cluster_name_args getEmptyArgsInstance() {
return new describe_cluster_name_args();
}
- protected describe_cluster_name_result getResult(I iface, describe_cluster_name_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_cluster_name_result getResult(I iface, describe_cluster_name_args args) throws org.apache.thrift.TException {
describe_cluster_name_result result = new describe_cluster_name_result();
result.success = iface.describe_cluster_name();
return result;
}
}
- private static class describe_version<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_version_args> {
+ public static class describe_version<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_version_args> {
public describe_version() {
super("describe_version");
}
- protected describe_version_args getEmptyArgsInstance() {
+ public describe_version_args getEmptyArgsInstance() {
return new describe_version_args();
}
- protected describe_version_result getResult(I iface, describe_version_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_version_result getResult(I iface, describe_version_args args) throws org.apache.thrift.TException {
describe_version_result result = new describe_version_result();
result.success = iface.describe_version();
return result;
}
}
- private static class describe_ring<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_ring_args> {
+ public static class describe_ring<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_ring_args> {
public describe_ring() {
super("describe_ring");
}
- protected describe_ring_args getEmptyArgsInstance() {
+ public describe_ring_args getEmptyArgsInstance() {
return new describe_ring_args();
}
- protected describe_ring_result getResult(I iface, describe_ring_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_ring_result getResult(I iface, describe_ring_args args) throws org.apache.thrift.TException {
describe_ring_result result = new describe_ring_result();
try {
result.success = iface.describe_ring(args.keyspace);
@@ -3771,16 +3869,20 @@ public class Cassandra {
}
}
- private static class describe_token_map<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_token_map_args> {
+ public static class describe_token_map<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_token_map_args> {
public describe_token_map() {
super("describe_token_map");
}
- protected describe_token_map_args getEmptyArgsInstance() {
+ public describe_token_map_args getEmptyArgsInstance() {
return new describe_token_map_args();
}
- protected describe_token_map_result getResult(I iface, describe_token_map_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_token_map_result getResult(I iface, describe_token_map_args args) throws org.apache.thrift.TException {
describe_token_map_result result = new describe_token_map_result();
try {
result.success = iface.describe_token_map();
@@ -3791,48 +3893,60 @@ public class Cassandra {
}
}
- private static class describe_partitioner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_partitioner_args> {
+ public static class describe_partitioner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_partitioner_args> {
public describe_partitioner() {
super("describe_partitioner");
}
- protected describe_partitioner_args getEmptyArgsInstance() {
+ public describe_partitioner_args getEmptyArgsInstance() {
return new describe_partitioner_args();
}
- protected describe_partitioner_result getResult(I iface, describe_partitioner_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_partitioner_result getResult(I iface, describe_partitioner_args args) throws org.apache.thrift.TException {
describe_partitioner_result result = new describe_partitioner_result();
result.success = iface.describe_partitioner();
return result;
}
}
- private static class describe_snitch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_snitch_args> {
+ public static class describe_snitch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_snitch_args> {
public describe_snitch() {
super("describe_snitch");
}
- protected describe_snitch_args getEmptyArgsInstance() {
+ public describe_snitch_args getEmptyArgsInstance() {
return new describe_snitch_args();
}
- protected describe_snitch_result getResult(I iface, describe_snitch_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_snitch_result getResult(I iface, describe_snitch_args args) throws org.apache.thrift.TException {
describe_snitch_result result = new describe_snitch_result();
result.success = iface.describe_snitch();
return result;
}
}
- private static class describe_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_keyspace_args> {
+ public static class describe_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_keyspace_args> {
public describe_keyspace() {
super("describe_keyspace");
}
- protected describe_keyspace_args getEmptyArgsInstance() {
+ public describe_keyspace_args getEmptyArgsInstance() {
return new describe_keyspace_args();
}
- protected describe_keyspace_result getResult(I iface, describe_keyspace_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_keyspace_result getResult(I iface, describe_keyspace_args args) throws org.apache.thrift.TException {
describe_keyspace_result result = new describe_keyspace_result();
try {
result.success = iface.describe_keyspace(args.keyspace);
@@ -3845,16 +3959,20 @@ public class Cassandra {
}
}
- private static class describe_splits<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_splits_args> {
+ public static class describe_splits<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_splits_args> {
public describe_splits() {
super("describe_splits");
}
- protected describe_splits_args getEmptyArgsInstance() {
+ public describe_splits_args getEmptyArgsInstance() {
return new describe_splits_args();
}
- protected describe_splits_result getResult(I iface, describe_splits_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_splits_result getResult(I iface, describe_splits_args args) throws org.apache.thrift.TException {
describe_splits_result result = new describe_splits_result();
try {
result.success = iface.describe_splits(args.cfName, args.start_token, args.end_token, args.keys_per_split);
@@ -3865,32 +3983,40 @@ public class Cassandra {
}
}
- private static class trace_next_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, trace_next_query_args> {
+ public static class trace_next_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, trace_next_query_args> {
public trace_next_query() {
super("trace_next_query");
}
- protected trace_next_query_args getEmptyArgsInstance() {
+ public trace_next_query_args getEmptyArgsInstance() {
return new trace_next_query_args();
}
- protected trace_next_query_result getResult(I iface, trace_next_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public trace_next_query_result getResult(I iface, trace_next_query_args args) throws org.apache.thrift.TException {
trace_next_query_result result = new trace_next_query_result();
result.success = iface.trace_next_query();
return result;
}
}
- private static class describe_splits_ex<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_splits_ex_args> {
+ public static class describe_splits_ex<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_splits_ex_args> {
public describe_splits_ex() {
super("describe_splits_ex");
}
- protected describe_splits_ex_args getEmptyArgsInstance() {
+ public describe_splits_ex_args getEmptyArgsInstance() {
return new describe_splits_ex_args();
}
- protected describe_splits_ex_result getResult(I iface, describe_splits_ex_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public describe_splits_ex_result getResult(I iface, describe_splits_ex_args args) throws org.apache.thrift.TException {
describe_splits_ex_result result = new describe_splits_ex_result();
try {
result.success = iface.describe_splits_ex(args.cfName, args.start_token, args.end_token, args.keys_per_split);
@@ -3901,16 +4027,20 @@ public class Cassandra {
}
}
- private static class system_add_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_add_column_family_args> {
+ public static class system_add_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_add_column_family_args> {
public system_add_column_family() {
super("system_add_column_family");
}
- protected system_add_column_family_args getEmptyArgsInstance() {
+ public system_add_column_family_args getEmptyArgsInstance() {
return new system_add_column_family_args();
}
- protected system_add_column_family_result getResult(I iface, system_add_column_family_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public system_add_column_family_result getResult(I iface, system_add_column_family_args args) throws org.apache.thrift.TException {
system_add_column_family_result result = new system_add_column_family_result();
try {
result.success = iface.system_add_column_family(args.cf_def);
@@ -3923,16 +4053,20 @@ public class Cassandra {
}
}
- private static class system_drop_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_drop_column_family_args> {
+ public static class system_drop_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_drop_column_family_args> {
public system_drop_column_family() {
super("system_drop_column_family");
}
- protected system_drop_column_family_args getEmptyArgsInstance() {
+ public system_drop_column_family_args getEmptyArgsInstance() {
return new system_drop_column_family_args();
}
- protected system_drop_column_family_result getResult(I iface, system_drop_column_family_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public system_drop_column_family_result getResult(I iface, system_drop_column_family_args args) throws org.apache.thrift.TException {
system_drop_column_family_result result = new system_drop_column_family_result();
try {
result.success = iface.system_drop_column_family(args.column_family);
@@ -3945,16 +4079,20 @@ public class Cassandra {
}
}
- private static class system_add_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_add_keyspace_args> {
+ public static class system_add_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_add_keyspace_args> {
public system_add_keyspace() {
super("system_add_keyspace");
}
- protected system_add_keyspace_args getEmptyArgsInstance() {
+ public system_add_keyspace_args getEmptyArgsInstance() {
return new system_add_keyspace_args();
}
- protected system_add_keyspace_result getResult(I iface, system_add_keyspace_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public system_add_keyspace_result getResult(I iface, system_add_keyspace_args args) throws org.apache.thrift.TException {
system_add_keyspace_result result = new system_add_keyspace_result();
try {
result.success = iface.system_add_keyspace(args.ks_def);
@@ -3967,16 +4105,20 @@ public class Cassandra {
}
}
- private static class system_drop_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_drop_keyspace_args> {
+ public static class system_drop_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_drop_keyspace_args> {
public system_drop_keyspace() {
super("system_drop_keyspace");
}
- protected system_drop_keyspace_args getEmptyArgsInstance() {
+ public system_drop_keyspace_args getEmptyArgsInstance() {
return new system_drop_keyspace_args();
}
- protected system_drop_keyspace_result getResult(I iface, system_drop_keyspace_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public system_drop_keyspace_result getResult(I iface, system_drop_keyspace_args args) throws org.apache.thrift.TException {
system_drop_keyspace_result result = new system_drop_keyspace_result();
try {
result.success = iface.system_drop_keyspace(args.keyspace);
@@ -3989,16 +4131,20 @@ public class Cassandra {
}
}
- private static class system_update_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_update_keyspace_args> {
+ public static class system_update_keyspace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_update_keyspace_args> {
public system_update_keyspace() {
super("system_update_keyspace");
}
- protected system_update_keyspace_args getEmptyArgsInstance() {
+ public system_update_keyspace_args getEmptyArgsInstance() {
return new system_update_keyspace_args();
}
- protected system_update_keyspace_result getResult(I iface, system_update_keyspace_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public system_update_keyspace_result getResult(I iface, system_update_keyspace_args args) throws org.apache.thrift.TException {
system_update_keyspace_result result = new system_update_keyspace_result();
try {
result.success = iface.system_update_keyspace(args.ks_def);
@@ -4011,16 +4157,20 @@ public class Cassandra {
}
}
- private static class system_update_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_update_column_family_args> {
+ public static class system_update_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_update_column_family_args> {
public system_update_column_family() {
super("system_update_column_family");
}
- protected system_update_column_family_args getEmptyArgsInstance() {
+ public system_update_column_family_args getEmptyArgsInstance() {
return new system_update_column_family_args();
}
- protected system_update_column_family_result getResult(I iface, system_update_column_family_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public system_update_column_family_result getResult(I iface, system_update_column_family_args args) throws org.apache.thrift.TException {
system_update_column_family_result result = new system_update_column_family_result();
try {
result.success = iface.system_update_column_family(args.cf_def);
@@ -4033,16 +4183,20 @@ public class Cassandra {
}
}
- private static class execute_cql_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_cql_query_args> {
+ public static class execute_cql_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_cql_query_args> {
public execute_cql_query() {
super("execute_cql_query");
}
- protected execute_cql_query_args getEmptyArgsInstance() {
+ public execute_cql_query_args getEmptyArgsInstance() {
return new execute_cql_query_args();
}
- protected execute_cql_query_result getResult(I iface, execute_cql_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public execute_cql_query_result getResult(I iface, execute_cql_query_args args) throws org.apache.thrift.TException {
execute_cql_query_result result = new execute_cql_query_result();
try {
result.success = iface.execute_cql_query(args.query, args.compression);
@@ -4059,16 +4213,20 @@ public class Cassandra {
}
}
- private static class execute_cql3_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_cql3_query_args> {
+ public static class execute_cql3_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_cql3_query_args> {
public execute_cql3_query() {
super("execute_cql3_query");
}
- protected execute_cql3_query_args getEmptyArgsInstance() {
+ public execute_cql3_query_args getEmptyArgsInstance() {
return new execute_cql3_query_args();
}
- protected execute_cql3_query_result getResult(I iface, execute_cql3_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public execute_cql3_query_result getResult(I iface, execute_cql3_query_args args) throws org.apache.thrift.TException {
execute_cql3_query_result result = new execute_cql3_query_result();
try {
result.success = iface.execute_cql3_query(args.query, args.compression, args.consistency);
@@ -4085,16 +4243,20 @@ public class Cassandra {
}
}
- private static class prepare_cql_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, prepare_cql_query_args> {
+ public static class prepare_cql_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, prepare_cql_query_args> {
public prepare_cql_query() {
super("prepare_cql_query");
}
- protected prepare_cql_query_args getEmptyArgsInstance() {
+ public prepare_cql_query_args getEmptyArgsInstance() {
return new prepare_cql_query_args();
}
- protected prepare_cql_query_result getResult(I iface, prepare_cql_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public prepare_cql_query_result getResult(I iface, prepare_cql_query_args args) throws org.apache.thrift.TException {
prepare_cql_query_result result = new prepare_cql_query_result();
try {
result.success = iface.prepare_cql_query(args.query, args.compression);
@@ -4105,16 +4267,20 @@ public class Cassandra {
}
}
- private static class prepare_cql3_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, prepare_cql3_query_args> {
+ public static class prepare_cql3_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, prepare_cql3_query_args> {
public prepare_cql3_query() {
super("prepare_cql3_query");
}
- protected prepare_cql3_query_args getEmptyArgsInstance() {
+ public prepare_cql3_query_args getEmptyArgsInstance() {
return new prepare_cql3_query_args();
}
- protected prepare_cql3_query_result getResult(I iface, prepare_cql3_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public prepare_cql3_query_result getResult(I iface, prepare_cql3_query_args args) throws org.apache.thrift.TException {
prepare_cql3_query_result result = new prepare_cql3_query_result();
try {
result.success = iface.prepare_cql3_query(args.query, args.compression);
@@ -4125,16 +4291,20 @@ public class Cassandra {
}
}
- private static class execute_prepared_cql_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_prepared_cql_query_args> {
+ public static class execute_prepared_cql_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_prepared_cql_query_args> {
public execute_prepared_cql_query() {
super("execute_prepared_cql_query");
}
- protected execute_prepared_cql_query_args getEmptyArgsInstance() {
+ public execute_prepared_cql_query_args getEmptyArgsInstance() {
return new execute_prepared_cql_query_args();
}
- protected execute_prepared_cql_query_result getResult(I iface, execute_prepared_cql_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public execute_prepared_cql_query_result getResult(I iface, execute_prepared_cql_query_args args) throws org.apache.thrift.TException {
execute_prepared_cql_query_result result = new execute_prepared_cql_query_result();
try {
result.success = iface.execute_prepared_cql_query(args.itemId, args.values);
@@ -4151,16 +4321,20 @@ public class Cassandra {
}
}
- private static class execute_prepared_cql3_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_prepared_cql3_query_args> {
+ public static class execute_prepared_cql3_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_prepared_cql3_query_args> {
public execute_prepared_cql3_query() {
super("execute_prepared_cql3_query");
}
- protected execute_prepared_cql3_query_args getEmptyArgsInstance() {
+ public execute_prepared_cql3_query_args getEmptyArgsInstance() {
return new execute_prepared_cql3_query_args();
}
- protected execute_prepared_cql3_query_result getResult(I iface, execute_prepared_cql3_query_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public execute_prepared_cql3_query_result getResult(I iface, execute_prepared_cql3_query_args args) throws org.apache.thrift.TException {
execute_prepared_cql3_query_result result = new execute_prepared_cql3_query_result();
try {
result.success = iface.execute_prepared_cql3_query(args.itemId, args.values, args.consistency);
@@ -4177,16 +4351,20 @@ public class Cassandra {
}
}
- private static class set_cql_version<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_cql_version_args> {
+ public static class set_cql_version<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_cql_version_args> {
public set_cql_version() {
super("set_cql_version");
}
- protected set_cql_version_args getEmptyArgsInstance() {
+ public set_cql_version_args getEmptyArgsInstance() {
return new set_cql_version_args();
}
- protected set_cql_version_result getResult(I iface, set_cql_version_args args) throws org.apache.thrift.TException {
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public set_cql_version_result getResult(I iface, set_cql_version_args args) throws org.apache.thrift.TException {
set_cql_version_result result = new set_cql_version_result();
try {
iface.set_cql_version(args.version);
@@ -4204,6 +4382,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField AUTH_REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("auth_request", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new login_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new login_argsTupleSchemeFactory());
+ }
+
public AuthenticationRequest auth_request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -4265,7 +4449,6 @@ public class Cassandra {
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -4425,45 +4608,11 @@ public class Cassandra {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // AUTH_REQUEST
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.auth_request = new AuthenticationRequest();
- this.auth_request.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.auth_request != null) {
- oprot.writeFieldBegin(AUTH_REQUEST_FIELD_DESC);
- this.auth_request.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -4487,6 +4636,10 @@ public class Cassandra {
if (auth_request == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'auth_request' was not present! Struct: " + toString());
}
+ // check for sub-struct validity
+ if (auth_request != null) {
+ auth_request.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -4505,6 +4658,82 @@ public class Cassandra {
}
}
+ private static class login_argsStandardSchemeFactory implements SchemeFactory {
+ public login_argsStandardScheme getScheme() {
+ return new login_argsStandardScheme();
+ }
+ }
+
+ private static class login_argsStandardScheme extends StandardScheme<login_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, login_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AUTH_REQUEST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.auth_request = new AuthenticationRequest();
+ struct.auth_request.read(iprot);
+ struct.setAuth_requestIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, login_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.auth_request != null) {
+ oprot.writeFieldBegin(AUTH_REQUEST_FIELD_DESC);
+ struct.auth_request.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class login_argsTupleSchemeFactory implements SchemeFactory {
+ public login_argsTupleScheme getScheme() {
+ return new login_argsTupleScheme();
+ }
+ }
+
+ private static class login_argsTupleScheme extends TupleScheme<login_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, login_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.auth_request.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, login_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.auth_request = new AuthenticationRequest();
+ struct.auth_request.read(iprot);
+ struct.setAuth_requestIsSet(true);
+ }
+ }
+
}
public static class login_result implements org.apache.thrift.TBase<login_result, login_result._Fields>, java.io.Serializable, Cloneable {
@@ -4513,6 +4742,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField AUTHNX_FIELD_DESC = new org.apache.thrift.protocol.TField("authnx", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AUTHZX_FIELD_DESC = new org.apache.thrift.protocol.TField("authzx", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new login_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new login_resultTupleSchemeFactory());
+ }
+
public AuthenticationException authnx; // required
public AuthorizationException authzx; // required
@@ -4578,7 +4813,6 @@ public class Cassandra {
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -4807,57 +5041,12 @@ public class Cassandra {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // AUTHNX
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.authnx = new AuthenticationException();
- this.authnx.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // AUTHZX
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.authzx = new AuthorizationException();
- this.authzx.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- oprot.writeStructBegin(STRUCT_DESC);
-
- if (this.isSetAuthnx()) {
- oprot.writeFieldBegin(AUTHNX_FIELD_DESC);
- this.authnx.write(oprot);
- oprot.writeFieldEnd();
- } else if (this.isSetAuthzx()) {
- oprot.writeFieldBegin(AUTHZX_FIELD_DESC);
- this.authzx.write(oprot);
- oprot.writeFieldEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
@Override
public String toString() {
@@ -4885,6 +5074,7 @@ public class Cassandra {
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -4903,6 +5093,117 @@ public class Cassandra {
}
}
+ private static class login_resultStandardSchemeFactory implements SchemeFactory {
+ public login_resultStandardScheme getScheme() {
+ return new login_resultStandardScheme();
+ }
+ }
+
+ private static class login_resultStandardScheme extends StandardScheme<login_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, login_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AUTHNX
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authnx = new AuthenticationException();
+ struct.authnx.read(iprot);
+ struct.setAuthnxIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // AUTHZX
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authzx = new AuthorizationException();
+ struct.authzx.read(iprot);
+ struct.setAuthzxIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, login_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.authnx != null) {
+ oprot.writeFieldBegin(AUTHNX_FIELD_DESC);
+ struct.authnx.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authzx != null) {
+ oprot.writeFieldBegin(AUTHZX_FIELD_DESC);
+ struct.authzx.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class login_resultTupleSchemeFactory implements SchemeFactory {
+ public login_resultTupleScheme getScheme() {
+ return new login_resultTupleScheme();
+ }
+ }
+
+ private static class login_resultTupleScheme extends TupleScheme<login_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, login_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAuthnx()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthzx()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetAuthnx()) {
+ struct.authnx.write(oprot);
+ }
+ if (struct.isSetAuthzx()) {
+ struct.authzx.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, login_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.authnx = new AuthenticationException();
+ struct.authnx.read(iprot);
+ struct.setAuthnxIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authzx = new AuthorizationException();
+ struct.authzx.read(iprot);
+ struct.setAuthzxIsSet(true);
+ }
+ }
+ }
+
}
public static class set_keyspace_args implements org.apache.thrift.TBase<set_keyspace_args, set_keyspace_args._Fields>, java.io.Serializable, Cloneable {
@@ -4910,6 +5211,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new set_keyspace_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new set_keyspace_argsTupleSchemeFactory());
+ }
+
public String keyspace; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -4971,7 +5278,6 @@ public class Cassandra {
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -5131,44 +5437,11 @@ public class Cassandra {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // KEYSPACE
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.keyspace = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.keyspace != null) {
- oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
- oprot.writeString(this.keyspace);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -5192,6 +5465,7 @@ public class Cassandra {
if (keyspace == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -5210,6 +5484,80 @@ public class Cassandra {
}
}
+ private static class set_keyspace_argsStandardSchemeFactory implements SchemeFactory {
+ public set_keyspace_argsStandardScheme getScheme() {
+ return new set_keyspace_argsStandardScheme();
+ }
+ }
+
+ private static class set_keyspace_argsStandardScheme extends StandardScheme<set_keyspace_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, set_keyspace_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // KEYSPACE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.keyspace = iprot.readString();
+ struct.setKeyspaceIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, set_keyspace_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.keyspace != null) {
+ oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
+ oprot.writeString(struct.keyspace);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class set_keyspace_argsTupleSchemeFactory implements SchemeFactory {
+ public set_keyspace_argsTupleScheme getScheme() {
+ return new set_keyspace_argsTupleScheme();
+ }
+ }
+
+ private static class set_keyspace_argsTupleScheme extends TupleScheme<set_keyspace_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, set_keyspace_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.keyspace);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, set_keyspace_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.keyspace = iprot.readString();
+ struct.setKeyspaceIsSet(true);
+ }
+ }
+
}
public static class set_keyspace_result implements org.apache.thrift.TBase<set_keyspace_result, set_keyspace_result._Fields>, java.io.Serializable, Cloneable {
@@ -5217,6 +5565,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new set_keyspace_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new set_keyspace_resultTupleSchemeFactory());
+ }
+
public InvalidRequestException ire; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -5278,7 +5632,6 @@ public class Cassandra {
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -5438,45 +5791,12 @@ public class Cassandra {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // IRE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.ire = new InvalidRequestException();
- this.ire.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- oprot.writeStructBegin(STRUCT_DESC);
-
- if (this.isSetIre()) {
- oprot.writeFieldBegin(IRE_FIELD_DESC);
- this.ire.write(oprot);
- oprot.writeFieldEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
@Override
public String toString() {
@@ -5496,6 +5816,7 @@ public class Cassandra {
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -5514,6 +5835,92 @@ public class Cassandra {
}
}
+ private static class set_keyspace_resultStandardSchemeFactory implements SchemeFactory {
+ public set_keyspace_resultStandardScheme getScheme() {
+ return new set_keyspace_resultStandardScheme();
+ }
+ }
+
+ private static class set_keyspace_resultStandardScheme extends StandardScheme<set_keyspace_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, set_keyspace_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ire = new InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, set_keyspace_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class set_keyspace_resultTupleSchemeFactory implements SchemeFactory {
+ public set_keyspace_resultTupleScheme getScheme() {
+ return new set_keyspace_resultTupleScheme();
+ }
+ }
+
+ private static class set_keyspace_resultTupleScheme extends TupleScheme<set_keyspace_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, set_keyspace_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIre()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, set_keyspace_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.ire = new InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ }
+ }
+
}
public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable {
@@ -5523,6 +5930,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("column_path", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory());
+ }
+
public ByteBuffer key; // required
public ColumnPath column_path; // required
/**
@@ -5600,7 +6013,6 @@ public class Cassandra {
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -5920,69 +6332,11 @@ public class Cassandra {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // KEY
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.key = iprot.readBinary();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // COLUMN_PATH
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.column_path = new ColumnPath();
- this.column_path.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // CONSISTENCY_LEVEL
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32());
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.key != null) {
- oprot.writeFieldBegin(KEY_FIELD_DESC);
- oprot.writeBinary(this.key);
- oprot.writeFieldEnd();
- }
- if (this.column_path != null) {
- oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC);
- this.column_path.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.consistency_level != null) {
- oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC);
- oprot.writeI32(this.consistency_level.getValue());
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -6028,6 +6382,10 @@ public class Cassandra {
if (consistency_level == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString());
}
+ // check for sub-struct validity
+ if (column_path != null) {
+ column_path.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -6046,6 +6404,114 @@ public class Cassandra {
}
}
+ private static class get_argsStandardSchemeFactory implements SchemeFactory {
+ public get_argsStandardScheme getScheme() {
+ return new get_argsStandardScheme();
+ }
+ }
+
+ private static class get_argsStandardScheme extends StandardScheme<get_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readBinary();
+ struct.setKeyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // COLUMN_PATH
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.column_path = new ColumnPath();
+ struct.column_path.read(iprot);
+ struct.setColumn_pathIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // CONSISTENCY_LEVEL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.consistency_level = ConsistencyLevel.findByValue(iprot.readI32());
+ struct.setConsistency_levelIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeBinary(struct.key);
+ oprot.writeFieldEnd();
+ }
+ if (struct.column_path != null) {
+ oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC);
+ struct.column_path.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.consistency_level != null) {
+ oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC);
+ oprot.writeI32(struct.consistency_level.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class get_argsTupleSchemeFactory implements SchemeFactory {
+ public get_argsTupleScheme getScheme() {
+ return new get_argsTupleScheme();
+ }
+ }
+
+ private static class get_argsTupleScheme extends TupleScheme<get_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBinary(struct.key);
+ struct.column_path.write(oprot);
+ oprot.writeI32(struct.consistency_level.getValue());
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.key = iprot.readBinary();
+ struct.setKeyIsSet(true);
+ struct.column_path = new ColumnPath();
+ struct.column_path.read(iprot);
+ struct.setColumn_pathIsSet(true);
+ struct.consistency_level = ConsistencyLevel.findByValue(iprot.readI32());
+ struct.setConsistency_levelIsSet(true);
+ }
+ }
+
}
public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable {
@@ -6057,6 +6523,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory());
+ }
+
public ColumnOrSuperColumn success; // required
public InvalidRequestException ire; // required
public NotFoundException nfe; // required
@@ -6134,7 +6606,6 @@ public class Cassandra {
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -6570,93 +7041,12 @@ public class Cassandra {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 0: // SUCCESS
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.success = new ColumnOrSuperColumn();
- this.success.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 1: // IRE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.ire = new InvalidRequestException();
- this.ire.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // NFE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.nfe = new NotFoundException();
- this.nfe.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // UE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.ue = new UnavailableException();
- this.ue.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // TE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.te = new TimedOutException();
- this.te.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- oprot.writeStructBegin(STRUCT_DESC);
-
- if (this.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- this.success.write(oprot);
- oprot.writeFieldEnd();
- } else if (this.isSetIre()) {
- oprot.writeFieldBegin(IRE_FIELD_DESC);
- this.ire.write(oprot);
- oprot.writeFieldEnd();
- } else if (this.isSetNfe()) {
- oprot.writeFieldBegin(NFE_FIELD_DESC);
- this.nfe.write(oprot);
- oprot.writeFieldEnd();
- } else if (this.isSetUe()) {
- oprot.writeFieldBegin(UE_FIELD_DESC);
- this.ue.write(oprot);
- oprot.writeFieldEnd();
- } else if (this.isSetTe()) {
- oprot.writeFieldBegin(TE_FIELD_DESC);
- this.te.write(oprot);
- oprot.writeFieldEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
@Override
public String toString() {
@@ -6708,6 +7098,10 @@ public class Cassandra {
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -6726,6 +7120,192 @@ public class Cassandra {
}
}
+ private static class get_resultStandardSchemeFactory implements SchemeFactory {
+ public get_resultStandardScheme getScheme() {
+ return new get_resultStandardScheme();
+ }
+ }
+
+ private static class get_resultStandardScheme extends StandardScheme<get_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new ColumnOrSuperColumn();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // IRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ire = new InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
<TRUNCATED>