diff --git a/CHANGES.txt b/CHANGES.txt
index d71b77c8c9..93d7ecde5e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,7 +3,7 @@
* add default_tim_to_live (CASSANDRA-3974)
* add memtable_flush_period_in_ms (CASSANDRA-4237)
* replace supercolumns internally by composites (CASSANDRA-3237)
-
+ * upgrade thrift to 0.9.0 (CASSANDRA-3719)
1.2.1
* add inter_dc_tcp_nodelay setting (CASSANDRA-5148)
diff --git a/build.xml b/build.xml
index eb681eb7fa..d73abc7750 100644
--- a/build.xml
+++ b/build.xml
@@ -356,7 +356,7 @@
-
+
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java
index 5d88cd98e8..8127883e31 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.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;
@@ -45,11 +55,17 @@ import org.slf4j.LoggerFactory;
/**
* invalid authentication request (invalid keyspace, user does not exist, or credentials invalid)
*/
-public class AuthenticationException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
+public class AuthenticationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AuthenticationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory());
+ }
+
public String why; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -111,7 +127,6 @@ public class AuthenticationException extends Exception implements org.apache.thr
}
// 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);
@@ -271,44 +286,11 @@ public class AuthenticationException extends Exception implements org.apache.thr
}
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: // WHY
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.why = 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.why != null) {
- oprot.writeFieldBegin(WHY_FIELD_DESC);
- oprot.writeString(this.why);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -332,6 +314,7 @@ public class AuthenticationException extends Exception implements org.apache.thr
if (why == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'why' was not present! Struct: " + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -350,5 +333,79 @@ public class AuthenticationException extends Exception implements org.apache.thr
}
}
+ private static class AuthenticationExceptionStandardSchemeFactory implements SchemeFactory {
+ public AuthenticationExceptionStandardScheme getScheme() {
+ return new AuthenticationExceptionStandardScheme();
+ }
+ }
+
+ private static class AuthenticationExceptionStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException 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: // WHY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.why = iprot.readString();
+ struct.setWhyIsSet(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, AuthenticationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.why != null) {
+ oprot.writeFieldBegin(WHY_FIELD_DESC);
+ oprot.writeString(struct.why);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory {
+ public AuthenticationExceptionTupleScheme getScheme() {
+ return new AuthenticationExceptionTupleScheme();
+ }
+ }
+
+ private static class AuthenticationExceptionTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.why);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.why = iprot.readString();
+ struct.setWhyIsSet(true);
+ }
+ }
+
}
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java
index 0f68426841..707c6b93f3 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.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;
@@ -50,6 +60,12 @@ public class AuthenticationRequest implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AuthenticationRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthenticationRequestTupleSchemeFactory());
+ }
+
public Map credentials; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -111,7 +127,6 @@ public class AuthenticationRequest implements org.apache.thrift.TBase metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -296,64 +311,11 @@ public class AuthenticationRequest implements org.apache.thrift.TBase(2*_map36.size);
- for (int _i37 = 0; _i37 < _map36.size; ++_i37)
- {
- String _key38; // required
- String _val39; // required
- _key38 = iprot.readString();
- _val39 = iprot.readString();
- this.credentials.put(_key38, _val39);
- }
- iprot.readMapEnd();
- }
- } 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.credentials != null) {
- oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.credentials.size()));
- for (Map.Entry _iter40 : this.credentials.entrySet())
- {
- oprot.writeString(_iter40.getKey());
- oprot.writeString(_iter40.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -377,6 +339,7 @@ public class AuthenticationRequest implements org.apache.thrift.TBase {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationRequest 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: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map72 = iprot.readMapBegin();
+ struct.credentials = new HashMap(2*_map72.size);
+ for (int _i73 = 0; _i73 < _map72.size; ++_i73)
+ {
+ String _key74; // required
+ String _val75; // required
+ _key74 = iprot.readString();
+ _val75 = iprot.readString();
+ struct.credentials.put(_key74, _val75);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setCredentialsIsSet(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, AuthenticationRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.credentials.size()));
+ for (Map.Entry _iter76 : struct.credentials.entrySet())
+ {
+ oprot.writeString(_iter76.getKey());
+ oprot.writeString(_iter76.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthenticationRequestTupleSchemeFactory implements SchemeFactory {
+ public AuthenticationRequestTupleScheme getScheme() {
+ return new AuthenticationRequestTupleScheme();
+ }
+ }
+
+ private static class AuthenticationRequestTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.credentials.size());
+ for (Map.Entry _iter77 : struct.credentials.entrySet())
+ {
+ oprot.writeString(_iter77.getKey());
+ oprot.writeString(_iter77.getValue());
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TMap _map78 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.credentials = new HashMap(2*_map78.size);
+ for (int _i79 = 0; _i79 < _map78.size; ++_i79)
+ {
+ String _key80; // required
+ String _val81; // required
+ _key80 = iprot.readString();
+ _val81 = iprot.readString();
+ struct.credentials.put(_key80, _val81);
+ }
+ }
+ struct.setCredentialsIsSet(true);
+ }
+ }
+
}
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthorizationException.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthorizationException.java
index 76bc0614e4..f3a8506112 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthorizationException.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthorizationException.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;
@@ -45,11 +55,17 @@ import org.slf4j.LoggerFactory;
/**
* invalid authorization request (user does not have access to keyspace)
*/
-public class AuthorizationException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
+public class AuthorizationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AuthorizationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory());
+ }
+
public String why; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -111,7 +127,6 @@ public class AuthorizationException extends Exception implements org.apache.thri
}
// 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);
@@ -271,44 +286,11 @@ public class AuthorizationException extends Exception implements org.apache.thri
}
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: // WHY
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.why = 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.why != null) {
- oprot.writeFieldBegin(WHY_FIELD_DESC);
- oprot.writeString(this.why);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -332,6 +314,7 @@ public class AuthorizationException extends Exception implements org.apache.thri
if (why == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'why' was not present! Struct: " + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -350,5 +333,79 @@ public class AuthorizationException extends Exception implements org.apache.thri
}
}
+ private static class AuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ public AuthorizationExceptionStandardScheme getScheme() {
+ return new AuthorizationExceptionStandardScheme();
+ }
+ }
+
+ private static class AuthorizationExceptionStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException 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: // WHY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.why = iprot.readString();
+ struct.setWhyIsSet(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, AuthorizationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.why != null) {
+ oprot.writeFieldBegin(WHY_FIELD_DESC);
+ oprot.writeString(struct.why);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ public AuthorizationExceptionTupleScheme getScheme() {
+ return new AuthorizationExceptionTupleScheme();
+ }
+ }
+
+ private static class AuthorizationExceptionTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.why);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.why = iprot.readString();
+ struct.setWhyIsSet(true);
+ }
+ }
+
}
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 8a2e66edc3..300068cd69 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 extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
+ public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
@@ -3274,16 +3284,20 @@ public class Cassandra {
return processMap;
}
- private static class login extends org.apache.thrift.ProcessFunction {
+ public static class login extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class set_keyspace extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class get extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class get_slice extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class get_count extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class multiget_slice extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class multiget_count extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class get_range_slices extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class get_paged_slice extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class get_indexed_slices extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class insert extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class add extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class remove extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class remove_counter extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class batch_mutate extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class atomic_batch_mutate extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class truncate extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_schema_versions extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_keyspaces extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_cluster_name extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_version extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_ring extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_token_map extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_partitioner extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_snitch extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_keyspace extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_splits extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class trace_next_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class describe_splits_ex extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class system_add_column_family extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class system_drop_column_family extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class system_add_keyspace extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class system_drop_keyspace extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class system_update_keyspace extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class system_update_column_family extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class execute_cql_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class execute_cql3_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class prepare_cql_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class prepare_cql3_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class execute_prepared_cql_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class execute_prepared_cql3_query extends org.apache.thrift.ProcessFunction {
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 extends org.apache.thrift.ProcessFunction {
+ public static class set_cql_version extends org.apache.thrift.ProcessFunction {
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, SchemeFactory> schemes = new HashMap, 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 {
+
+ 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 {
+
+ @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, 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, SchemeFactory> schemes = new HashMap, 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 {
+
+ 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 {
+
+ @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, 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, SchemeFactory> schemes = new HashMap, 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 {
+
+ 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 {
+
+ @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, 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, SchemeFactory> schemes = new HashMap, 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 {
+
+ 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 {
+
+ @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, 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, SchemeFactory> schemes = new HashMap, 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 {
+
+ 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 {
+
+ @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, 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, SchemeFactory> schemes = new HashMap, 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 {
+
+ 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, schemeField.type);
+ }
+ break;
+ case 2: // NFE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.nfe = new NotFoundException();
+ struct.nfe.read(iprot);
+ struct.setNfeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // UE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ue = new UnavailableException();
+ struct.ue.read(iprot);
+ struct.setUeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // TE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.te = new TimedOutException();
+ struct.te.read(iprot);
+ struct.setTeIsSet(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_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nfe != null) {
+ oprot.writeFieldBegin(NFE_FIELD_DESC);
+ struct.nfe.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ue != null) {
+ oprot.writeFieldBegin(UE_FIELD_DESC);
+ struct.ue.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.te != null) {
+ oprot.writeFieldBegin(TE_FIELD_DESC);
+ struct.te.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class get_resultTupleSchemeFactory implements SchemeFactory {
+ public get_resultTupleScheme getScheme() {
+ return new get_resultTupleScheme();
+ }
+ }
+
+ private static class get_resultTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIre()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNfe()) {
+ optionals.set(2);
+ }
+ if (struct.isSetUe()) {
+ optionals.set(3);
+ }
+ if (struct.isSetTe()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ if (struct.isSetNfe()) {
+ struct.nfe.write(oprot);
+ }
+ if (struct.isSetUe()) {
+ struct.ue.write(oprot);
+ }
+ if (struct.isSetTe()) {
+ struct.te.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.success = new ColumnOrSuperColumn();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ire = new InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.nfe = new NotFoundException();
+ struct.nfe.read(iprot);
+ struct.setNfeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ue = new UnavailableException();
+ struct.ue.read(iprot);
+ struct.setUeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.te = new TimedOutException();
+ struct.te.read(iprot);
+ struct.setTeIsSet(true);
+ }
+ }
+ }
+
}
public static class get_slice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
@@ -6736,6 +7316,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3);
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)4);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_slice_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_slice_argsTupleSchemeFactory());
+ }
+
public ByteBuffer key; // required
public ColumnParent column_parent; // required
public SlicePredicate predicate; // required
@@ -6817,7 +7403,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);
@@ -7206,82 +7791,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_PARENT
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.column_parent = new ColumnParent();
- this.column_parent.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // PREDICATE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.predicate = new SlicePredicate();
- this.predicate.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // 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_parent != null) {
- oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC);
- this.column_parent.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.predicate != null) {
- oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
- this.predicate.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
@@ -7338,6 +7852,13 @@ 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_parent != null) {
+ column_parent.validate();
+ }
+ if (predicate != null) {
+ predicate.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -7356,6 +7877,132 @@ public class Cassandra {
}
}
+ private static class get_slice_argsStandardSchemeFactory implements SchemeFactory {
+ public get_slice_argsStandardScheme getScheme() {
+ return new get_slice_argsStandardScheme();
+ }
+ }
+
+ private static class get_slice_argsStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_slice_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_PARENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.column_parent = new ColumnParent();
+ struct.column_parent.read(iprot);
+ struct.setColumn_parentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PREDICATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.predicate = new SlicePredicate();
+ struct.predicate.read(iprot);
+ struct.setPredicateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // 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_slice_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_parent != null) {
+ oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC);
+ struct.column_parent.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.predicate != null) {
+ oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
+ struct.predicate.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_slice_argsTupleSchemeFactory implements SchemeFactory {
+ public get_slice_argsTupleScheme getScheme() {
+ return new get_slice_argsTupleScheme();
+ }
+ }
+
+ private static class get_slice_argsTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_slice_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBinary(struct.key);
+ struct.column_parent.write(oprot);
+ struct.predicate.write(oprot);
+ oprot.writeI32(struct.consistency_level.getValue());
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_slice_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.key = iprot.readBinary();
+ struct.setKeyIsSet(true);
+ struct.column_parent = new ColumnParent();
+ struct.column_parent.read(iprot);
+ struct.setColumn_parentIsSet(true);
+ struct.predicate = new SlicePredicate();
+ struct.predicate.read(iprot);
+ struct.setPredicateIsSet(true);
+ struct.consistency_level = ConsistencyLevel.findByValue(iprot.readI32());
+ struct.setConsistency_levelIsSet(true);
+ }
+ }
+
}
public static class get_slice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
@@ -7366,6 +8013,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)2);
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)3);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_slice_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_slice_resultTupleSchemeFactory());
+ }
+
public List success; // required
public InvalidRequestException ire; // required
public UnavailableException ue; // required
@@ -7439,7 +8092,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);
@@ -7826,98 +8478,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.LIST) {
- {
- org.apache.thrift.protocol.TList _list95 = iprot.readListBegin();
- this.success = new ArrayList(_list95.size);
- for (int _i96 = 0; _i96 < _list95.size; ++_i96)
- {
- ColumnOrSuperColumn _elem97; // required
- _elem97 = new ColumnOrSuperColumn();
- _elem97.read(iprot);
- this.success.add(_elem97);
- }
- iprot.readListEnd();
- }
- } 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: // 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 3: // 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);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
- for (ColumnOrSuperColumn _iter98 : this.success)
- {
- _iter98.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- } else if (this.isSetIre()) {
- oprot.writeFieldBegin(IRE_FIELD_DESC);
- this.ire.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() {
@@ -7961,6 +8527,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 {
@@ -7979,6 +8546,199 @@ public class Cassandra {
}
}
+ private static class get_slice_resultStandardSchemeFactory implements SchemeFactory {
+ public get_slice_resultStandardScheme getScheme() {
+ return new get_slice_resultStandardScheme();
+ }
+ }
+
+ private static class get_slice_resultStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_slice_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.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list190 = iprot.readListBegin();
+ struct.success = new ArrayList(_list190.size);
+ for (int _i191 = 0; _i191 < _list190.size; ++_i191)
+ {
+ ColumnOrSuperColumn _elem192; // required
+ _elem192 = new ColumnOrSuperColumn();
+ _elem192.read(iprot);
+ struct.success.add(_elem192);
+ }
+ iprot.readListEnd();
+ }
+ 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, schemeField.type);
+ }
+ break;
+ case 2: // UE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ue = new UnavailableException();
+ struct.ue.read(iprot);
+ struct.setUeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.te = new TimedOutException();
+ struct.te.read(iprot);
+ struct.setTeIsSet(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_slice_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+ for (ColumnOrSuperColumn _iter193 : struct.success)
+ {
+ _iter193.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ue != null) {
+ oprot.writeFieldBegin(UE_FIELD_DESC);
+ struct.ue.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.te != null) {
+ oprot.writeFieldBegin(TE_FIELD_DESC);
+ struct.te.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class get_slice_resultTupleSchemeFactory implements SchemeFactory {
+ public get_slice_resultTupleScheme getScheme() {
+ return new get_slice_resultTupleScheme();
+ }
+ }
+
+ private static class get_slice_resultTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_slice_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIre()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUe()) {
+ optionals.set(2);
+ }
+ if (struct.isSetTe()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (ColumnOrSuperColumn _iter194 : struct.success)
+ {
+ _iter194.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ if (struct.isSetUe()) {
+ struct.ue.write(oprot);
+ }
+ if (struct.isSetTe()) {
+ struct.te.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_slice_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList(_list195.size);
+ for (int _i196 = 0; _i196 < _list195.size; ++_i196)
+ {
+ ColumnOrSuperColumn _elem197; // required
+ _elem197 = new ColumnOrSuperColumn();
+ _elem197.read(iprot);
+ struct.success.add(_elem197);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ire = new InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.ue = new UnavailableException();
+ struct.ue.read(iprot);
+ struct.setUeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.te = new TimedOutException();
+ struct.te.read(iprot);
+ struct.setTeIsSet(true);
+ }
+ }
+ }
+
}
public static class get_count_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
@@ -7989,6 +8749,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3);
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)4);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_count_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_count_argsTupleSchemeFactory());
+ }
+
public ByteBuffer key; // required
public ColumnParent column_parent; // required
public SlicePredicate predicate; // required
@@ -8070,7 +8836,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);
@@ -8459,82 +9224,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_PARENT
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.column_parent = new ColumnParent();
- this.column_parent.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // PREDICATE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.predicate = new SlicePredicate();
- this.predicate.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // 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_parent != null) {
- oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC);
- this.column_parent.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.predicate != null) {
- oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
- this.predicate.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
@@ -8591,6 +9285,13 @@ 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_parent != null) {
+ column_parent.validate();
+ }
+ if (predicate != null) {
+ predicate.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -8609,6 +9310,132 @@ public class Cassandra {
}
}
+ private static class get_count_argsStandardSchemeFactory implements SchemeFactory {
+ public get_count_argsStandardScheme getScheme() {
+ return new get_count_argsStandardScheme();
+ }
+ }
+
+ private static class get_count_argsStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_count_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_PARENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.column_parent = new ColumnParent();
+ struct.column_parent.read(iprot);
+ struct.setColumn_parentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PREDICATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.predicate = new SlicePredicate();
+ struct.predicate.read(iprot);
+ struct.setPredicateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // 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_count_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_parent != null) {
+ oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC);
+ struct.column_parent.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.predicate != null) {
+ oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
+ struct.predicate.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_count_argsTupleSchemeFactory implements SchemeFactory {
+ public get_count_argsTupleScheme getScheme() {
+ return new get_count_argsTupleScheme();
+ }
+ }
+
+ private static class get_count_argsTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_count_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBinary(struct.key);
+ struct.column_parent.write(oprot);
+ struct.predicate.write(oprot);
+ oprot.writeI32(struct.consistency_level.getValue());
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_count_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.key = iprot.readBinary();
+ struct.setKeyIsSet(true);
+ struct.column_parent = new ColumnParent();
+ struct.column_parent.read(iprot);
+ struct.setColumn_parentIsSet(true);
+ struct.predicate = new SlicePredicate();
+ struct.predicate.read(iprot);
+ struct.setPredicateIsSet(true);
+ struct.consistency_level = ConsistencyLevel.findByValue(iprot.readI32());
+ struct.setConsistency_levelIsSet(true);
+ }
+ }
+
}
public static class get_count_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
@@ -8619,6 +9446,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)2);
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)3);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_count_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_count_resultTupleSchemeFactory());
+ }
+
public int success; // required
public InvalidRequestException ire; // required
public UnavailableException ue; // required
@@ -8693,8 +9526,7 @@ public class Cassandra {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
-
+ private byte __isset_bitfield = 0;
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);
@@ -8731,8 +9563,7 @@ public class Cassandra {
* Performs a deep copy on other.
*/
public get_count_result(get_count_result other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIre()) {
this.ire = new InvalidRequestException(other.ire);
@@ -8769,16 +9600,16 @@ public class Cassandra {
}
public void unsetSuccess() {
- __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public InvalidRequestException getIre() {
@@ -9062,81 +9893,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.I32) {
- this.success = iprot.readI32();
- setSuccessIsSet(true);
- } 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: // 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 3: // 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);
- oprot.writeI32(this.success);
- oprot.writeFieldEnd();
- } else if (this.isSetIre()) {
- oprot.writeFieldBegin(IRE_FIELD_DESC);
- this.ire.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() {
@@ -9176,6 +9938,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 {
@@ -9189,13 +9952,172 @@ public class Cassandra {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
+ private static class get_count_resultStandardSchemeFactory implements SchemeFactory {
+ public get_count_resultStandardScheme getScheme() {
+ return new get_count_resultStandardScheme();
+ }
+ }
+
+ private static class get_count_resultStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_count_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.I32) {
+ struct.success = iprot.readI32();
+ 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, schemeField.type);
+ }
+ break;
+ case 2: // UE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ue = new UnavailableException();
+ struct.ue.read(iprot);
+ struct.setUeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.te = new TimedOutException();
+ struct.te.read(iprot);
+ struct.setTeIsSet(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_count_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ue != null) {
+ oprot.writeFieldBegin(UE_FIELD_DESC);
+ struct.ue.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.te != null) {
+ oprot.writeFieldBegin(TE_FIELD_DESC);
+ struct.te.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class get_count_resultTupleSchemeFactory implements SchemeFactory {
+ public get_count_resultTupleScheme getScheme() {
+ return new get_count_resultTupleScheme();
+ }
+ }
+
+ private static class get_count_resultTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_count_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIre()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUe()) {
+ optionals.set(2);
+ }
+ if (struct.isSetTe()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ if (struct.isSetUe()) {
+ struct.ue.write(oprot);
+ }
+ if (struct.isSetTe()) {
+ struct.te.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_count_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ire = new InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.ue = new UnavailableException();
+ struct.ue.read(iprot);
+ struct.setUeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.te = new TimedOutException();
+ struct.te.read(iprot);
+ struct.setTeIsSet(true);
+ }
+ }
+ }
+
}
public static class multiget_slice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
@@ -9206,6 +10128,12 @@ public class Cassandra {
private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3);
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)4);
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new multiget_slice_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new multiget_slice_argsTupleSchemeFactory());
+ }
+
public List keys; // required
public ColumnParent column_parent; // required
public SlicePredicate predicate; // required
@@ -9287,7 +10215,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);
@@ -9687,99 +10614,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: // KEYS
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list99 = iprot.readListBegin();
- this.keys = new ArrayList(_list99.size);
- for (int _i100 = 0; _i100 < _list99.size; ++_i100)
- {
- ByteBuffer _elem101; // required
- _elem101 = iprot.readBinary();
- this.keys.add(_elem101);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // COLUMN_PARENT
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.column_parent = new ColumnParent();
- this.column_parent.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // PREDICATE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.predicate = new SlicePredicate();
- this.predicate.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // 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.keys != null) {
- oprot.writeFieldBegin(KEYS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.keys.size()));
- for (ByteBuffer _iter102 : this.keys)
- {
- oprot.writeBinary(_iter102);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.column_parent != null) {
- oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC);
- this.column_parent.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.predicate != null) {
- oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
- this.predicate.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
@@ -9836,6 +10675,13 @@ 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_parent != null) {
+ column_parent.validate();
+ }
+ if (predicate != null) {
+ predicate.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -9854,6 +10700,164 @@ public class Cassandra {
}
}
+ private static class multiget_slice_argsStandardSchemeFactory implements SchemeFactory {
+ public multiget_slice_argsStandardScheme getScheme() {
+ return new multiget_slice_argsStandardScheme();
+ }
+ }
+
+ private static class multiget_slice_argsStandardScheme extends StandardScheme