Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Old Bindings

  • Loading branch information...
commit 22051a3cc29edd51f6e16d652ce347f8563eb98c 1 parent 95e8bc2
swillis authored
Showing with 11,513 additions and 19,969 deletions.
  1. +93 −104 src/java/org/apache/cassandra/thrift/AuthenticationException.java
  2. +69 −99 src/java/org/apache/cassandra/thrift/AuthenticationRequest.java
  3. +93 −104 src/java/org/apache/cassandra/thrift/AuthorizationException.java
  4. +8,741 −15,719 src/java/org/apache/cassandra/thrift/Cassandra.java
  5. +361 −940 src/java/org/apache/cassandra/thrift/CfDef.java
  6. +158 −194 src/java/org/apache/cassandra/thrift/Column.java
  7. +125 −148 src/java/org/apache/cassandra/thrift/ColumnDef.java
  8. +71 −276 src/java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java
  9. +85 −106 src/java/org/apache/cassandra/thrift/ColumnParent.java
  10. +112 −143 src/java/org/apache/cassandra/thrift/ColumnPath.java
  11. +25 −58 src/java/org/apache/cassandra/thrift/ConsistencyLevel.java
  12. +1 −2  src/java/org/apache/cassandra/thrift/Constants.java
  13. +121 −145 src/java/org/apache/cassandra/thrift/Deletion.java
  14. +116 −145 src/java/org/apache/cassandra/thrift/IndexClause.java
  15. +124 −147 src/java/org/apache/cassandra/thrift/IndexExpression.java
  16. +12 −20 src/java/org/apache/cassandra/thrift/IndexOperator.java
  17. +8 −8 src/java/org/apache/cassandra/thrift/IndexType.java
  18. +93 −104 src/java/org/apache/cassandra/thrift/InvalidRequestException.java
  19. +88 −112 src/java/org/apache/cassandra/thrift/KeyCount.java
  20. +143 −187 src/java/org/apache/cassandra/thrift/KeyRange.java
  21. +99 −120 src/java/org/apache/cassandra/thrift/KeySlice.java
  22. +146 −327 src/java/org/apache/cassandra/thrift/KsDef.java
  23. +76 −92 src/java/org/apache/cassandra/thrift/Mutation.java
  24. +42 −48 src/java/org/apache/cassandra/thrift/NotFoundException.java
  25. +95 −111 src/java/org/apache/cassandra/thrift/SlicePredicate.java
  26. +134 −174 src/java/org/apache/cassandra/thrift/SliceRange.java
  27. +97 −118 src/java/org/apache/cassandra/thrift/SuperColumn.java
  28. +42 −48 src/java/org/apache/cassandra/thrift/TimedOutException.java
  29. +101 −122 src/java/org/apache/cassandra/thrift/TokenRange.java
  30. +42 −48 src/java/org/apache/cassandra/thrift/UnavailableException.java
View
197 src/java/org/apache/cassandra/thrift/AuthenticationException.java
@@ -15,29 +15,34 @@
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
-import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
/**
* invalid authentication request (invalid keyspace, user does not exist, or credentials invalid)
*/
-public class AuthenticationException extends Exception implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
+public class AuthenticationException extends Exception implements TBase<AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
+ private static final TStruct STRUCT_DESC = new 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 TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
- public String why;
+ public String message;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- WHY((short)1, "why");
+ public enum _Fields implements TFieldIdEnum {
+ MESSAGE((short)1, "message");
+ private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
@@ -46,12 +51,7 @@
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // WHY
- return WHY;
- default:
- return null;
- }
+ return byId.get(fieldId);
}
/**
@@ -90,31 +90,31 @@ public String getFieldName() {
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
+ put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.REQUIRED,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.WHY, new org.apache.thrift.meta_data.FieldMetaData("why", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap);
}
public AuthenticationException() {
}
public AuthenticationException(
- String why)
+ String message)
{
this();
- this.why = why;
+ this.message = message;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public AuthenticationException(AuthenticationException other) {
- if (other.isSetWhy()) {
- this.why = other.why;
+ if (other.isSetMessage()) {
+ this.message = other.message;
}
}
@@ -122,70 +122,78 @@ public AuthenticationException deepCopy() {
return new AuthenticationException(this);
}
- @Override
- public void clear() {
- this.why = null;
+ @Deprecated
+ public AuthenticationException clone() {
+ return new AuthenticationException(this);
}
- public String getWhy() {
- return this.why;
+ public String getMessage() {
+ return this.message;
}
- public AuthenticationException setWhy(String why) {
- this.why = why;
+ public AuthenticationException setMessage(String message) {
+ this.message = message;
return this;
}
- public void unsetWhy() {
- this.why = null;
+ public void unsetMessage() {
+ this.message = null;
}
- /** Returns true if field why is set (has been assigned a value) and false otherwise */
- public boolean isSetWhy() {
- return this.why != null;
+ /** Returns true if field message is set (has been asigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
}
- public void setWhyIsSet(boolean value) {
+ public void setMessageIsSet(boolean value) {
if (!value) {
- this.why = null;
+ this.message = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case WHY:
+ case MESSAGE:
if (value == null) {
- unsetWhy();
+ unsetMessage();
} else {
- setWhy((String)value);
+ setMessage((String)value);
}
break;
}
}
+ public void setFieldValue(int fieldID, Object value) {
+ setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
+ }
+
public Object getFieldValue(_Fields field) {
switch (field) {
- case WHY:
- return getWhy();
+ case MESSAGE:
+ return getMessage();
}
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
+ public Object getFieldValue(int fieldId) {
+ return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
+ }
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
switch (field) {
- case WHY:
- return isSetWhy();
+ case MESSAGE:
+ return isSetMessage();
}
throw new IllegalStateException();
}
+ public boolean isSet(int fieldID) {
+ return isSet(_Fields.findByThriftIdOrThrow(fieldID));
+ }
+
@Override
public boolean equals(Object that) {
if (that == null)
@@ -199,12 +207,12 @@ public boolean equals(AuthenticationException that) {
if (that == null)
return false;
- boolean this_present_why = true && this.isSetWhy();
- boolean that_present_why = true && that.isSetWhy();
- if (this_present_why || that_present_why) {
- if (!(this_present_why && that_present_why))
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
return false;
- if (!this.why.equals(that.why))
+ if (!this.message.equals(that.message))
return false;
}
@@ -224,44 +232,41 @@ public int compareTo(AuthenticationException other) {
int lastComparison = 0;
AuthenticationException typedOther = (AuthenticationException)other;
- lastComparison = Boolean.valueOf(isSetWhy()).compareTo(typedOther.isSetWhy());
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetWhy()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.why, typedOther.why);
- if (lastComparison != 0) {
- return lastComparison;
- }
+ lastComparison = TBaseHelper.compareTo(message, typedOther.message);
+ if (lastComparison != 0) {
+ return lastComparison;
}
return 0;
}
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
+ public void read(TProtocol iprot) throws TException {
+ TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
+ if (field.type == 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);
+ _Fields fieldId = _Fields.findByThriftId(field.id);
+ if (fieldId == null) {
+ TProtocolUtil.skip(iprot, field.type);
+ } else {
+ switch (fieldId) {
+ case MESSAGE:
+ if (field.type == TType.STRING) {
+ this.message = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ }
+ iprot.readFieldEnd();
}
- iprot.readFieldEnd();
}
iprot.readStructEnd();
@@ -269,13 +274,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.why != null) {
- oprot.writeFieldBegin(WHY_FIELD_DESC);
- oprot.writeString(this.why);
+ if (this.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(this.message);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -287,37 +292,21 @@ public String toString() {
StringBuilder sb = new StringBuilder("AuthenticationException(");
boolean first = true;
- sb.append("why:");
- if (this.why == null) {
+ sb.append("message:");
+ if (this.message == null) {
sb.append("null");
} else {
- sb.append(this.why);
+ sb.append(this.message);
}
first = false;
sb.append(")");
return sb.toString();
}
- public void validate() throws org.apache.thrift.TException {
+ public void validate() throws TException {
// check for required fields
- if (why == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'why' was not present! Struct: " + toString());
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
+ if (message == null) {
+ throw new TProtocolException("Required field 'message' was not present! Struct: " + toString());
}
}
View
168 src/java/org/apache/cassandra/thrift/AuthenticationRequest.java
@@ -15,29 +15,34 @@
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
-import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
/**
* Authentication requests can contain any data, dependent on the IAuthenticator used
*/
-public class AuthenticationRequest implements org.apache.thrift.TBase<AuthenticationRequest, AuthenticationRequest._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationRequest");
+public class AuthenticationRequest implements TBase<AuthenticationRequest._Fields>, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("AuthenticationRequest");
- private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.MAP, (short)1);
+ private static final TField CREDENTIALS_FIELD_DESC = new TField("credentials", TType.MAP, (short)1);
public Map<String,String> credentials;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ public enum _Fields implements TFieldIdEnum {
CREDENTIALS((short)1, "credentials");
+ private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
@@ -46,12 +51,7 @@
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // CREDENTIALS
- return CREDENTIALS;
- default:
- return null;
- }
+ return byId.get(fieldId);
}
/**
@@ -90,15 +90,15 @@ public String getFieldName() {
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
+ put(_Fields.CREDENTIALS, new FieldMetaData("credentials", TFieldRequirementType.REQUIRED,
+ new MapMetaData(TType.MAP,
+ new FieldValueMetaData(TType.STRING),
+ new FieldValueMetaData(TType.STRING))));
+ }});
+
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationRequest.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(AuthenticationRequest.class, metaDataMap);
}
public AuthenticationRequest() {
@@ -136,9 +136,9 @@ public AuthenticationRequest deepCopy() {
return new AuthenticationRequest(this);
}
- @Override
- public void clear() {
- this.credentials = null;
+ @Deprecated
+ public AuthenticationRequest clone() {
+ return new AuthenticationRequest(this);
}
public int getCredentialsSize() {
@@ -165,7 +165,7 @@ public void unsetCredentials() {
this.credentials = null;
}
- /** Returns true if field credentials is set (has been assigned a value) and false otherwise */
+ /** Returns true if field credentials is set (has been asigned a value) and false otherwise */
public boolean isSetCredentials() {
return this.credentials != null;
}
@@ -189,6 +189,10 @@ public void setFieldValue(_Fields field, Object value) {
}
}
+ public void setFieldValue(int fieldID, Object value) {
+ setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
+ }
+
public Object getFieldValue(_Fields field) {
switch (field) {
case CREDENTIALS:
@@ -198,12 +202,12 @@ public Object getFieldValue(_Fields field) {
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
+ public Object getFieldValue(int fieldId) {
+ return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
+ }
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
switch (field) {
case CREDENTIALS:
return isSetCredentials();
@@ -211,6 +215,10 @@ public boolean isSet(_Fields field) {
throw new IllegalStateException();
}
+ public boolean isSet(int fieldID) {
+ return isSet(_Fields.findByThriftIdOrThrow(fieldID));
+ }
+
@Override
public boolean equals(Object that) {
if (that == null)
@@ -241,64 +249,42 @@ public int hashCode() {
return 0;
}
- public int compareTo(AuthenticationRequest other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- AuthenticationRequest typedOther = (AuthenticationRequest)other;
-
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(typedOther.isSetCredentials());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCredentials()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, typedOther.credentials);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
+ public void read(TProtocol iprot) throws TException {
+ TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
+ if (field.type == TType.STOP) {
break;
}
- switch (field.id) {
- case 1: // CREDENTIALS
- if (field.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
- this.credentials = new HashMap<String,String>(2*_map24.size);
- for (int _i25 = 0; _i25 < _map24.size; ++_i25)
+ _Fields fieldId = _Fields.findByThriftId(field.id);
+ if (fieldId == null) {
+ TProtocolUtil.skip(iprot, field.type);
+ } else {
+ switch (fieldId) {
+ case CREDENTIALS:
+ if (field.type == TType.MAP) {
{
- String _key26;
- String _val27;
- _key26 = iprot.readString();
- _val27 = iprot.readString();
- this.credentials.put(_key26, _val27);
+ TMap _map20 = iprot.readMapBegin();
+ this.credentials = new HashMap<String,String>(2*_map20.size);
+ for (int _i21 = 0; _i21 < _map20.size; ++_i21)
+ {
+ String _key22;
+ String _val23;
+ _key22 = iprot.readString();
+ _val23 = iprot.readString();
+ this.credentials.put(_key22, _val23);
+ }
+ iprot.readMapEnd();
}
- iprot.readMapEnd();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
}
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
}
- iprot.readFieldEnd();
}
iprot.readStructEnd();
@@ -306,18 +292,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(TProtocol oprot) throws 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<String, String> _iter28 : this.credentials.entrySet())
+ oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.credentials.size()));
+ for (Map.Entry<String, String> _iter24 : this.credentials.entrySet())
{
- oprot.writeString(_iter28.getKey());
- oprot.writeString(_iter28.getValue());
+ oprot.writeString(_iter24.getKey());
+ oprot.writeString(_iter24.getValue());
}
oprot.writeMapEnd();
}
@@ -343,26 +329,10 @@ public String toString() {
return sb.toString();
}
- public void validate() throws org.apache.thrift.TException {
+ public void validate() throws TException {
// check for required fields
if (credentials == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'credentials' was not present! Struct: " + toString());
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
+ throw new TProtocolException("Required field 'credentials' was not present! Struct: " + toString());
}
}
View
197 src/java/org/apache/cassandra/thrift/AuthorizationException.java
@@ -15,29 +15,34 @@
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
-import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
/**
* invalid authorization request (user does not have access to keyspace)
*/
-public class AuthorizationException extends Exception implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
+public class AuthorizationException extends Exception implements TBase<AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
+ private static final TStruct STRUCT_DESC = new 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 TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
- public String why;
+ public String message;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- WHY((short)1, "why");
+ public enum _Fields implements TFieldIdEnum {
+ MESSAGE((short)1, "message");
+ private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
@@ -46,12 +51,7 @@
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // WHY
- return WHY;
- default:
- return null;
- }
+ return byId.get(fieldId);
}
/**
@@ -90,31 +90,31 @@ public String getFieldName() {
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
+ put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.REQUIRED,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.WHY, new org.apache.thrift.meta_data.FieldMetaData("why", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
}
public AuthorizationException() {
}
public AuthorizationException(
- String why)
+ String message)
{
this();
- this.why = why;
+ this.message = message;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public AuthorizationException(AuthorizationException other) {
- if (other.isSetWhy()) {
- this.why = other.why;
+ if (other.isSetMessage()) {
+ this.message = other.message;
}
}
@@ -122,70 +122,78 @@ public AuthorizationException deepCopy() {
return new AuthorizationException(this);
}
- @Override
- public void clear() {
- this.why = null;
+ @Deprecated
+ public AuthorizationException clone() {
+ return new AuthorizationException(this);
}
- public String getWhy() {
- return this.why;
+ public String getMessage() {
+ return this.message;
}
- public AuthorizationException setWhy(String why) {
- this.why = why;
+ public AuthorizationException setMessage(String message) {
+ this.message = message;
return this;
}
- public void unsetWhy() {
- this.why = null;
+ public void unsetMessage() {
+ this.message = null;
}
- /** Returns true if field why is set (has been assigned a value) and false otherwise */
- public boolean isSetWhy() {
- return this.why != null;
+ /** Returns true if field message is set (has been asigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
}
- public void setWhyIsSet(boolean value) {
+ public void setMessageIsSet(boolean value) {
if (!value) {
- this.why = null;
+ this.message = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case WHY:
+ case MESSAGE:
if (value == null) {
- unsetWhy();
+ unsetMessage();
} else {
- setWhy((String)value);
+ setMessage((String)value);
}
break;
}
}
+ public void setFieldValue(int fieldID, Object value) {
+ setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
+ }
+
public Object getFieldValue(_Fields field) {
switch (field) {
- case WHY:
- return getWhy();
+ case MESSAGE:
+ return getMessage();
}
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
+ public Object getFieldValue(int fieldId) {
+ return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
+ }
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
switch (field) {
- case WHY:
- return isSetWhy();
+ case MESSAGE:
+ return isSetMessage();
}
throw new IllegalStateException();
}
+ public boolean isSet(int fieldID) {
+ return isSet(_Fields.findByThriftIdOrThrow(fieldID));
+ }
+
@Override
public boolean equals(Object that) {
if (that == null)
@@ -199,12 +207,12 @@ public boolean equals(AuthorizationException that) {
if (that == null)
return false;
- boolean this_present_why = true && this.isSetWhy();
- boolean that_present_why = true && that.isSetWhy();
- if (this_present_why || that_present_why) {
- if (!(this_present_why && that_present_why))
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
return false;
- if (!this.why.equals(that.why))
+ if (!this.message.equals(that.message))
return false;
}
@@ -224,44 +232,41 @@ public int compareTo(AuthorizationException other) {
int lastComparison = 0;
AuthorizationException typedOther = (AuthorizationException)other;
- lastComparison = Boolean.valueOf(isSetWhy()).compareTo(typedOther.isSetWhy());
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetWhy()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.why, typedOther.why);
- if (lastComparison != 0) {
- return lastComparison;
- }
+ lastComparison = TBaseHelper.compareTo(message, typedOther.message);
+ if (lastComparison != 0) {
+ return lastComparison;
}
return 0;
}
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
+ public void read(TProtocol iprot) throws TException {
+ TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
+ if (field.type == 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);
+ _Fields fieldId = _Fields.findByThriftId(field.id);
+ if (fieldId == null) {
+ TProtocolUtil.skip(iprot, field.type);
+ } else {
+ switch (fieldId) {
+ case MESSAGE:
+ if (field.type == TType.STRING) {
+ this.message = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ }
+ iprot.readFieldEnd();
}
- iprot.readFieldEnd();
}
iprot.readStructEnd();
@@ -269,13 +274,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.why != null) {
- oprot.writeFieldBegin(WHY_FIELD_DESC);
- oprot.writeString(this.why);
+ if (this.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(this.message);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -287,37 +292,21 @@ public String toString() {
StringBuilder sb = new StringBuilder("AuthorizationException(");
boolean first = true;
- sb.append("why:");
- if (this.why == null) {
+ sb.append("message:");
+ if (this.message == null) {
sb.append("null");
} else {
- sb.append(this.why);
+ sb.append(this.message);
}
first = false;
sb.append(")");
return sb.toString();
}
- public void validate() throws org.apache.thrift.TException {
+ public void validate() throws TException {
// check for required fields
- if (why == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'why' was not present! Struct: " + toString());
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
+ if (message == null) {
+ throw new TProtocolException("Required field 'message' was not present! Struct: " + toString());
}
}
View
24,460 src/java/org/apache/cassandra/thrift/Cassandra.java
8,741 additions, 15,719 deletions not shown
View
1,301 src/java/org/apache/cassandra/thrift/CfDef.java
@@ -15,39 +15,37 @@
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
-import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CfDef");
-
- 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 org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField COLUMN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("column_type", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField COMPARATOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("comparator_type", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField SUBCOMPARATOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("subcomparator_type", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField ROW_CACHE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_size", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
- private static final org.apache.thrift.protocol.TField KEY_CACHE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("key_cache_size", org.apache.thrift.protocol.TType.DOUBLE, (short)11);
- private static final org.apache.thrift.protocol.TField READ_REPAIR_CHANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("read_repair_chance", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
- private static final org.apache.thrift.protocol.TField COLUMN_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("column_metadata", org.apache.thrift.protocol.TType.LIST, (short)13);
- private static final org.apache.thrift.protocol.TField GC_GRACE_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("gc_grace_seconds", org.apache.thrift.protocol.TType.I32, (short)14);
- private static final org.apache.thrift.protocol.TField DEFAULT_VALIDATION_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("default_validation_class", org.apache.thrift.protocol.TType.STRING, (short)15);
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)16);
- private static final org.apache.thrift.protocol.TField MIN_COMPACTION_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField("min_compaction_threshold", org.apache.thrift.protocol.TType.I32, (short)17);
- private static final org.apache.thrift.protocol.TField MAX_COMPACTION_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField("max_compaction_threshold", org.apache.thrift.protocol.TType.I32, (short)18);
- private static final org.apache.thrift.protocol.TField ROW_CACHE_SAVE_PERIOD_IN_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_save_period_in_seconds", org.apache.thrift.protocol.TType.I32, (short)19);
- private static final org.apache.thrift.protocol.TField KEY_CACHE_SAVE_PERIOD_IN_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("key_cache_save_period_in_seconds", org.apache.thrift.protocol.TType.I32, (short)20);
- private static final org.apache.thrift.protocol.TField MEMTABLE_FLUSH_AFTER_MINS_FIELD_DESC = new org.apache.thrift.protocol.TField("memtable_flush_after_mins", org.apache.thrift.protocol.TType.I32, (short)21);
- private static final org.apache.thrift.protocol.TField MEMTABLE_THROUGHPUT_IN_MB_FIELD_DESC = new org.apache.thrift.protocol.TField("memtable_throughput_in_mb", org.apache.thrift.protocol.TType.I32, (short)22);
- private static final org.apache.thrift.protocol.TField MEMTABLE_OPERATIONS_IN_MILLIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("memtable_operations_in_millions", org.apache.thrift.protocol.TType.DOUBLE, (short)23);
- private static final org.apache.thrift.protocol.TField REPLICATE_ON_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("replicate_on_write", org.apache.thrift.protocol.TType.BOOL, (short)24);
- private static final org.apache.thrift.protocol.TField MERGE_SHARDS_CHANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("merge_shards_chance", org.apache.thrift.protocol.TType.DOUBLE, (short)25);
- private static final org.apache.thrift.protocol.TField KEY_VALIDATION_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("key_validation_class", org.apache.thrift.protocol.TType.STRING, (short)26);
- private static final org.apache.thrift.protocol.TField ROW_CACHE_PROVIDER_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_provider", org.apache.thrift.protocol.TType.STRING, (short)27);
- private static final org.apache.thrift.protocol.TField KEY_ALIAS_FIELD_DESC = new org.apache.thrift.protocol.TField("key_alias", org.apache.thrift.protocol.TType.STRING, (short)28);
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Cloneable, Comparable<CfDef> {
+ private static final TStruct STRUCT_DESC = new TStruct("CfDef");
+
+ private static final TField KEYSPACE_FIELD_DESC = new TField("keyspace", TType.STRING, (short)1);
+ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2);
+ private static final TField COLUMN_TYPE_FIELD_DESC = new TField("column_type", TType.STRING, (short)3);
+ private static final TField COMPARATOR_TYPE_FIELD_DESC = new TField("comparator_type", TType.STRING, (short)5);
+ private static final TField SUBCOMPARATOR_TYPE_FIELD_DESC = new TField("subcomparator_type", TType.STRING, (short)6);
+ private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)8);
+ private static final TField ROW_CACHE_SIZE_FIELD_DESC = new TField("row_cache_size", TType.DOUBLE, (short)9);
+ private static final TField KEY_CACHE_SIZE_FIELD_DESC = new TField("key_cache_size", TType.DOUBLE, (short)11);
+ private static final TField READ_REPAIR_CHANCE_FIELD_DESC = new TField("read_repair_chance", TType.DOUBLE, (short)12);
+ private static final TField COLUMN_METADATA_FIELD_DESC = new TField("column_metadata", TType.LIST, (short)13);
+ private static final TField GC_GRACE_SECONDS_FIELD_DESC = new TField("gc_grace_seconds", TType.I32, (short)14);
+ private static final TField DEFAULT_VALIDATION_CLASS_FIELD_DESC = new TField("default_validation_class", TType.STRING, (short)15);
+ private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)16);
+ private static final TField MIN_COMPACTION_THRESHOLD_FIELD_DESC = new TField("min_compaction_threshold", TType.I32, (short)17);
+ private static final TField MAX_COMPACTION_THRESHOLD_FIELD_DESC = new TField("max_compaction_threshold", TType.I32, (short)18);
+ private static final TField ROW_CACHE_SAVE_PERIOD_IN_SECONDS_FIELD_DESC = new TField("row_cache_save_period_in_seconds", TType.I32, (short)19);
+ private static final TField KEY_CACHE_SAVE_PERIOD_IN_SECONDS_FIELD_DESC = new TField("key_cache_save_period_in_seconds", TType.I32, (short)20);
+ private static final TField MEMTABLE_FLUSH_AFTER_MINS_FIELD_DESC = new TField("memtable_flush_after_mins", TType.I32, (short)21);
+ private static final TField MEMTABLE_THROUGHPUT_IN_MB_FIELD_DESC = new TField("memtable_throughput_in_mb", TType.I32, (short)22);
+ private static final TField MEMTABLE_OPERATIONS_IN_MILLIONS_FIELD_DESC = new TField("memtable_operations_in_millions", TType.DOUBLE, (short)23);
public String keyspace;
public String name;
@@ -69,14 +67,9 @@
public int memtable_flush_after_mins;
public int memtable_throughput_in_mb;
public double memtable_operations_in_millions;
- public boolean replicate_on_write;
- public double merge_shards_chance;
- public String key_validation_class;
- public String row_cache_provider;
- public ByteBuffer key_alias;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ public enum _Fields implements TFieldIdEnum {
KEYSPACE((short)1, "keyspace"),
NAME((short)2, "name"),
COLUMN_TYPE((short)3, "column_type"),
@@ -96,17 +89,14 @@
KEY_CACHE_SAVE_PERIOD_IN_SECONDS((short)20, "key_cache_save_period_in_seconds"),
MEMTABLE_FLUSH_AFTER_MINS((short)21, "memtable_flush_after_mins"),
MEMTABLE_THROUGHPUT_IN_MB((short)22, "memtable_throughput_in_mb"),
- MEMTABLE_OPERATIONS_IN_MILLIONS((short)23, "memtable_operations_in_millions"),
- REPLICATE_ON_WRITE((short)24, "replicate_on_write"),
- MERGE_SHARDS_CHANCE((short)25, "merge_shards_chance"),
- KEY_VALIDATION_CLASS((short)26, "key_validation_class"),
- ROW_CACHE_PROVIDER((short)27, "row_cache_provider"),
- KEY_ALIAS((short)28, "key_alias");
+ MEMTABLE_OPERATIONS_IN_MILLIONS((short)23, "memtable_operations_in_millions");
+ private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
@@ -115,60 +105,7 @@
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // KEYSPACE
- return KEYSPACE;
- case 2: // NAME
- return NAME;
- case 3: // COLUMN_TYPE
- return COLUMN_TYPE;
- case 5: // COMPARATOR_TYPE
- return COMPARATOR_TYPE;
- case 6: // SUBCOMPARATOR_TYPE
- return SUBCOMPARATOR_TYPE;
- case 8: // COMMENT
- return COMMENT;
- case 9: // ROW_CACHE_SIZE
- return ROW_CACHE_SIZE;
- case 11: // KEY_CACHE_SIZE
- return KEY_CACHE_SIZE;
- case 12: // READ_REPAIR_CHANCE
- return READ_REPAIR_CHANCE;
- case 13: // COLUMN_METADATA
- return COLUMN_METADATA;
- case 14: // GC_GRACE_SECONDS
- return GC_GRACE_SECONDS;
- case 15: // DEFAULT_VALIDATION_CLASS
- return DEFAULT_VALIDATION_CLASS;
- case 16: // ID
- return ID;
- case 17: // MIN_COMPACTION_THRESHOLD
- return MIN_COMPACTION_THRESHOLD;
- case 18: // MAX_COMPACTION_THRESHOLD
- return MAX_COMPACTION_THRESHOLD;
- case 19: // ROW_CACHE_SAVE_PERIOD_IN_SECONDS
- return ROW_CACHE_SAVE_PERIOD_IN_SECONDS;
- case 20: // KEY_CACHE_SAVE_PERIOD_IN_SECONDS
- return KEY_CACHE_SAVE_PERIOD_IN_SECONDS;
- case 21: // MEMTABLE_FLUSH_AFTER_MINS
- return MEMTABLE_FLUSH_AFTER_MINS;
- case 22: // MEMTABLE_THROUGHPUT_IN_MB
- return MEMTABLE_THROUGHPUT_IN_MB;
- case 23: // MEMTABLE_OPERATIONS_IN_MILLIONS
- return MEMTABLE_OPERATIONS_IN_MILLIONS;
- case 24: // REPLICATE_ON_WRITE
- return REPLICATE_ON_WRITE;
- case 25: // MERGE_SHARDS_CHANCE
- return MERGE_SHARDS_CHANCE;
- case 26: // KEY_VALIDATION_CLASS
- return KEY_VALIDATION_CLASS;
- case 27: // ROW_CACHE_PROVIDER
- return ROW_CACHE_PROVIDER;
- case 28: // KEY_ALIAS
- return KEY_ALIAS;
- default:
- return null;
- }
+ return byId.get(fieldId);
}
/**
@@ -218,66 +155,54 @@ public String getFieldName() {
private static final int __MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID = 9;
private static final int __MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID = 10;
private static final int __MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID = 11;
- private static final int __REPLICATE_ON_WRITE_ISSET_ID = 12;
- private static final int __MERGE_SHARDS_CHANCE_ISSET_ID = 13;
- private BitSet __isset_bit_vector = new BitSet(14);
+ private BitSet __isset_bit_vector = new BitSet(12);
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
+ put(_Fields.KEYSPACE, new FieldMetaData("keyspace", TFieldRequirementType.REQUIRED,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.COLUMN_TYPE, new FieldMetaData("column_type", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.COMPARATOR_TYPE, new FieldMetaData("comparator_type", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.SUBCOMPARATOR_TYPE, new FieldMetaData("subcomparator_type", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.ROW_CACHE_SIZE, new FieldMetaData("row_cache_size", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.DOUBLE)));
+ put(_Fields.KEY_CACHE_SIZE, new FieldMetaData("key_cache_size", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.DOUBLE)));
+ put(_Fields.READ_REPAIR_CHANCE, new FieldMetaData("read_repair_chance", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.DOUBLE)));
+ put(_Fields.COLUMN_METADATA, new FieldMetaData("column_metadata", TFieldRequirementType.OPTIONAL,
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, ColumnDef.class))));
+ put(_Fields.GC_GRACE_SECONDS, new FieldMetaData("gc_grace_seconds", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.DEFAULT_VALIDATION_CLASS, new FieldMetaData("default_validation_class", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.STRING)));
+ put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.MIN_COMPACTION_THRESHOLD, new FieldMetaData("min_compaction_threshold", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.MAX_COMPACTION_THRESHOLD, new FieldMetaData("max_compaction_threshold", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.ROW_CACHE_SAVE_PERIOD_IN_SECONDS, new FieldMetaData("row_cache_save_period_in_seconds", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.KEY_CACHE_SAVE_PERIOD_IN_SECONDS, new FieldMetaData("key_cache_save_period_in_seconds", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.MEMTABLE_FLUSH_AFTER_MINS, new FieldMetaData("memtable_flush_after_mins", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.MEMTABLE_THROUGHPUT_IN_MB, new FieldMetaData("memtable_throughput_in_mb", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.I32)));
+ put(_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS, new FieldMetaData("memtable_operations_in_millions", TFieldRequirementType.OPTIONAL,
+ new FieldValueMetaData(TType.DOUBLE)));
+ }});
- 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);
- tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.COLUMN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("column_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.COMPARATOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("comparator_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SUBCOMPARATOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("subcomparator_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ROW_CACHE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("row_cache_size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- tmpMap.put(_Fields.KEY_CACHE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("key_cache_size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- tmpMap.put(_Fields.READ_REPAIR_CHANCE, new org.apache.thrift.meta_data.FieldMetaData("read_repair_chance", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- tmpMap.put(_Fields.COLUMN_METADATA, new org.apache.thrift.meta_data.FieldMetaData("column_metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnDef.class))));
- tmpMap.put(_Fields.GC_GRACE_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("gc_grace_seconds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.DEFAULT_VALIDATION_CLASS, new org.apache.thrift.meta_data.FieldMetaData("default_validation_class", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MIN_COMPACTION_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("min_compaction_threshold", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MAX_COMPACTION_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("max_compaction_threshold", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.ROW_CACHE_SAVE_PERIOD_IN_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("row_cache_save_period_in_seconds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.KEY_CACHE_SAVE_PERIOD_IN_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("key_cache_save_period_in_seconds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MEMTABLE_FLUSH_AFTER_MINS, new org.apache.thrift.meta_data.FieldMetaData("memtable_flush_after_mins", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MEMTABLE_THROUGHPUT_IN_MB, new org.apache.thrift.meta_data.FieldMetaData("memtable_throughput_in_mb", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS, new org.apache.thrift.meta_data.FieldMetaData("memtable_operations_in_millions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- tmpMap.put(_Fields.REPLICATE_ON_WRITE, new org.apache.thrift.meta_data.FieldMetaData("replicate_on_write", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.MERGE_SHARDS_CHANCE, new org.apache.thrift.meta_data.FieldMetaData("merge_shards_chance", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- tmpMap.put(_Fields.KEY_VALIDATION_CLASS, new org.apache.thrift.meta_data.FieldMetaData("key_validation_class", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ROW_CACHE_PROVIDER, new org.apache.thrift.meta_data.FieldMetaData("row_cache_provider", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.KEY_ALIAS, new org.apache.thrift.meta_data.FieldMetaData("key_alias", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CfDef.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(CfDef.class, metaDataMap);
}
public CfDef() {
@@ -291,8 +216,6 @@ public CfDef() {
this.read_repair_chance = 1;
- this.row_cache_provider = "org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider";
-
}
public CfDef(
@@ -350,68 +273,15 @@ public CfDef(CfDef other) {
this.memtable_flush_after_mins = other.memtable_flush_after_mins;
this.memtable_throughput_in_mb = other.memtable_throughput_in_mb;
this.memtable_operations_in_millions = other.memtable_operations_in_millions;
- this.replicate_on_write = other.replicate_on_write;
- this.merge_shards_chance = other.merge_shards_chance;
- if (other.isSetKey_validation_class()) {
- this.key_validation_class = other.key_validation_class;
- }
- if (other.isSetRow_cache_provider()) {
- this.row_cache_provider = other.row_cache_provider;
- }
- if (other.isSetKey_alias()) {
- this.key_alias = org.apache.thrift.TBaseHelper.copyBinary(other.key_alias);
-;
- }
}
public CfDef deepCopy() {
return new CfDef(this);
}
- @Override
- public void clear() {
- this.keyspace = null;
- this.name = null;
- this.column_type = "Standard";
-
- this.comparator_type = "BytesType";
-
- this.subcomparator_type = null;
- this.comment = null;
- this.row_cache_size = (double)0;
-
- this.key_cache_size = (double)200000;
-
- this.read_repair_chance = 1;
-
- this.column_metadata = null;
- setGc_grace_secondsIsSet(false);
- this.gc_grace_seconds = 0;
- this.default_validation_class = null;
- setIdIsSet(false);
- this.id = 0;
- setMin_compaction_thresholdIsSet(false);
- this.min_compaction_threshold = 0;
- setMax_compaction_thresholdIsSet(false);
- this.max_compaction_threshold = 0;
- setRow_cache_save_period_in_secondsIsSet(false);
- this.row_cache_save_period_in_seconds = 0;
- setKey_cache_save_period_in_secondsIsSet(false);
- this.key_cache_save_period_in_seconds = 0;
- setMemtable_flush_after_minsIsSet(false);
- this.memtable_flush_after_mins = 0;
- setMemtable_throughput_in_mbIsSet(false);
- this.memtable_throughput_in_mb = 0;
- setMemtable_operations_in_millionsIsSet(false);
- this.memtable_operations_in_millions = 0.0;
- setReplicate_on_writeIsSet(false);
- this.replicate_on_write = false;
- setMerge_shards_chanceIsSet(false);
- this.merge_shards_chance = 0.0;
- this.key_validation_class = null;
- this.row_cache_provider = "org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider";
-
- this.key_alias = null;
+ @Deprecated
+ public CfDef clone() {
+ return new CfDef(this);
}
public String getKeyspace() {
@@ -427,7 +297,7 @@ public void unsetKeyspace() {
this.keyspace = null;
}
- /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */
+ /** Returns true if field keyspace is set (has been asigned a value) and false otherwise */
public boolean isSetKeyspace() {
return this.keyspace != null;
}
@@ -451,7 +321,7 @@ public void unsetName() {
this.name = null;
}
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ /** Returns true if field name is set (has been asigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
@@ -475,7 +345,7 @@ public void unsetColumn_type() {
this.column_type = null;
}
- /** Returns true if field column_type is set (has been assigned a value) and false otherwise */
+ /** Returns true if field column_type is set (has been asigned a value) and false otherwise */
public boolean isSetColumn_type() {
return this.column_type != null;
}
@@ -499,7 +369,7 @@ public void unsetComparator_type() {
this.comparator_type = null;
}
- /** Returns true if field comparator_type is set (has been assigned a value) and false otherwise */
+ /** Returns true if field comparator_type is set (has been asigned a value) and false otherwise */
public boolean isSetComparator_type() {
return this.comparator_type != null;
}
@@ -523,7 +393,7 @@ public void unsetSubcomparator_type() {
this.subcomparator_type = null;
}
- /** Returns true if field subcomparator_type is set (has been assigned a value) and false otherwise */
+ /** Returns true if field subcomparator_type is set (has been asigned a value) and false otherwise */
public boolean isSetSubcomparator_type() {
return this.subcomparator_type != null;
}
@@ -547,7 +417,7 @@ public void unsetComment() {
this.comment = null;
}
- /** Returns true if field comment is set (has been assigned a value) and false otherwise */
+ /** Returns true if field comment is set (has been asigned a value) and false otherwise */
public boolean isSetComment() {
return this.comment != null;
}
@@ -572,7 +442,7 @@ public void unsetRow_cache_size() {
__isset_bit_vector.clear(__ROW_CACHE_SIZE_ISSET_ID);
}
- /** Returns true if field row_cache_size is set (has been assigned a value) and false otherwise */
+ /** Returns true if field row_cache_size is set (has been asigned a value) and false otherwise */
public boolean isSetRow_cache_size() {
return __isset_bit_vector.get(__ROW_CACHE_SIZE_ISSET_ID);
}
@@ -595,7 +465,7 @@ public void unsetKey_cache_size() {
__isset_bit_vector.clear(__KEY_CACHE_SIZE_ISSET_ID);
}
- /** Returns true if field key_cache_size is set (has been assigned a value) and false otherwise */
+ /** Returns true if field key_cache_size is set (has been asigned a value) and false otherwise */
public boolean isSetKey_cache_size() {
return __isset_bit_vector.get(__KEY_CACHE_SIZE_ISSET_ID);
}
@@ -618,7 +488,7 @@ public void unsetRead_repair_chance() {
__isset_bit_vector.clear(__READ_REPAIR_CHANCE_ISSET_ID);
}
- /** Returns true if field read_repair_chance is set (has been assigned a value) and false otherwise */
+ /** Returns true if field read_repair_chance is set (has been asigned a value) and false otherwise */
public boolean isSetRead_repair_chance() {
return __isset_bit_vector.get(__READ_REPAIR_CHANCE_ISSET_ID);
}
@@ -655,7 +525,7 @@ public void unsetColumn_metadata() {
this.column_metadata = null;
}
- /** Returns true if field column_metadata is set (has been assigned a value) and false otherwise */
+ /** Returns true if field column_metadata is set (has been asigned a value) and false otherwise */
public boolean isSetColumn_metadata() {
return this.column_metadata != null;
}
@@ -680,7 +550,7 @@ public void unsetGc_grace_seconds() {
__isset_bit_vector.clear(__GC_GRACE_SECONDS_ISSET_ID);
}
- /** Returns true if field gc_grace_seconds is set (has been assigned a value) and false otherwise */
+ /** Returns true if field gc_grace_seconds is set (has been asigned a value) and false otherwise */
public boolean isSetGc_grace_seconds() {
return __isset_bit_vector.get(__GC_GRACE_SECONDS_ISSET_ID);
}
@@ -702,7 +572,7 @@ public void unsetDefault_validation_class() {
this.default_validation_class = null;
}
- /** Returns true if field default_validation_class is set (has been assigned a value) and false otherwise */
+ /** Returns true if field default_validation_class is set (has been asigned a value) and false otherwise */
public boolean isSetDefault_validation_class() {
return this.default_validation_class != null;
}
@@ -727,7 +597,7 @@ public void unsetId() {
__isset_bit_vector.clear(__ID_ISSET_ID);
}
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
+ /** Returns true if field id is set (has been asigned a value) and false otherwise */
public boolean isSetId() {
return __isset_bit_vector.get(__ID_ISSET_ID);
}
@@ -750,7 +620,7 @@ public void unsetMin_compaction_threshold() {
__isset_bit_vector.clear(__MIN_COMPACTION_THRESHOLD_ISSET_ID);
}
- /** Returns true if field min_compaction_threshold is set (has been assigned a value) and false otherwise */
+ /** Returns true if field min_compaction_threshold is set (has been asigned a value) and false otherwise */
public boolean isSetMin_compaction_threshold() {
return __isset_bit_vector.get(__MIN_COMPACTION_THRESHOLD_ISSET_ID);
}
@@ -773,7 +643,7 @@ public void unsetMax_compaction_threshold() {
__isset_bit_vector.clear(__MAX_COMPACTION_THRESHOLD_ISSET_ID);
}
- /** Returns true if field max_compaction_threshold is set (has been assigned a value) and false otherwise */
+ /** Returns true if field max_compaction_threshold is set (has been asigned a value) and false otherwise */
public boolean isSetMax_compaction_threshold() {
return __isset_bit_vector.get(__MAX_COMPACTION_THRESHOLD_ISSET_ID);
}
@@ -796,7 +666,7 @@ public void unsetRow_cache_save_period_in_seconds() {
__isset_bit_vector.clear(__ROW_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID);
}
- /** Returns true if field row_cache_save_period_in_seconds is set (has been assigned a value) and false otherwise */
+ /** Returns true if field row_cache_save_period_in_seconds is set (has been asigned a value) and false otherwise */
public boolean isSetRow_cache_save_period_in_seconds() {
return __isset_bit_vector.get(__ROW_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID);
}
@@ -819,7 +689,7 @@ public void unsetKey_cache_save_period_in_seconds() {
__isset_bit_vector.clear(__KEY_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID);
}
- /** Returns true if field key_cache_save_period_in_seconds is set (has been assigned a value) and false otherwise */
+ /** Returns true if field key_cache_save_period_in_seconds is set (has been asigned a value) and false otherwise */
public boolean isSetKey_cache_save_period_in_seconds() {
return __isset_bit_vector.get(__KEY_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID);
}
@@ -842,7 +712,7 @@ public void unsetMemtable_flush_after_mins() {
__isset_bit_vector.clear(__MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID);
}
- /** Returns true if field memtable_flush_after_mins is set (has been assigned a value) and false otherwise */
+ /** Returns true if field memtable_flush_after_mins is set (has been asigned a value) and false otherwise */
public boolean isSetMemtable_flush_after_mins() {
return __isset_bit_vector.get(__MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID);
}
@@ -865,7 +735,7 @@ public void unsetMemtable_throughput_in_mb() {
__isset_bit_vector.clear(__MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID);
}
- /** Returns true if field memtable_throughput_in_mb is set (has been assigned a value) and false otherwise */
+ /** Returns true if field memtable_throughput_in_mb is set (has been asigned a value) and false otherwise */
public boolean isSetMemtable_throughput_in_mb() {
return __isset_bit_vector.get(__MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID);
}
@@ -888,7 +758,7 @@ public void unsetMemtable_operations_in_millions() {
__isset_bit_vector.clear(__MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID);
}
- /** Returns true if field memtable_operations_in_millions is set (has been assigned a value) and false otherwise */
+ /** Returns true if field memtable_operations_in_millions is set (has been asigned a value) and false otherwise */
public boolean isSetMemtable_operations_in_millions() {
return __isset_bit_vector.get(__MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID);
}
@@ -897,134 +767,6 @@ public void setMemtable_operations_in_millionsIsSet(boolean value) {
__isset_bit_vector.set(__MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID, value);
}
- public boolean isReplicate_on_write() {
- return this.replicate_on_write;
- }
-
- public CfDef setReplicate_on_write(boolean replicate_on_write) {
- this.replicate_on_write = replicate_on_write;
- setReplicate_on_writeIsSet(true);
- return this;
- }
-
- public void unsetReplicate_on_write() {
- __isset_bit_vector.clear(__REPLICATE_ON_WRITE_ISSET_ID);
- }
-
- /** Returns true if field replicate_on_write is set (has been assigned a value) and false otherwise */
- public boolean isSetReplicate_on_write() {
- return __isset_bit_vector.get(__REPLICATE_ON_WRITE_ISSET_ID);
- }
-
- public void setReplicate_on_writeIsSet(boolean value) {
- __isset_bit_vector.set(__REPLICATE_ON_WRITE_ISSET_ID, value);
- }
-
- public double getMerge_shards_chance() {
- return this.merge_shards_chance;
- }
-
- public CfDef setMerge_shards_chance(double merge_shards_chance) {
- this.merge_shards_chance = merge_shards_chance;
- setMerge_shards_chanceIsSet(true);
- return this;
- }
-
- public void unsetMerge_shards_chance() {
- __isset_bit_vector.clear(__MERGE_SHARDS_CHANCE_ISSET_ID);
- }
-
- /** Returns true if field merge_shards_chance is set (has been assigned a value) and false otherwise */
- public boolean isSetMerge_shards_chance() {
- return __isset_bit_vector.get(__MERGE_SHARDS_CHANCE_ISSET_ID);
- }
-
- public void setMerge_shards_chanceIsSet(boolean value) {
- __isset_bit_vector.set(__MERGE_SHARDS_CHANCE_ISSET_ID, value);
- }
-
- public String getKey_validation_class() {
- return this.key_validation_class;
- }
-
- public CfDef setKey_validation_class(String key_validation_class) {
- this.key_validation_class = key_validation_class;
- return this;
- }
-
- public void unsetKey_validation_class() {
- this.key_validation_class = null;
- }
-
- /** Returns true if field key_validation_class is set (has been assigned a value) and false otherwise */
- public boolean isSetKey_validation_class() {
- return this.key_validation_class != null;
- }
-
- public void setKey_validation_classIsSet(boolean value) {
- if (!value) {
- this.key_validation_class = null;
- }
- }
-
- public String getRow_cache_provider() {
- return this.row_cache_provider;
- }
-
- public CfDef setRow_cache_provider(String row_cache_provider) {
- this.row_cache_provider = row_cache_provider;
- return this;
- }
-
- public void unsetRow_cache_provider() {
- this.row_cache_provider = null;
- }
-
- /** Returns true if field row_cache_provider is set (has been assigned a value) and false otherwise */
- public boolean isSetRow_cache_provider() {
- return this.row_cache_provider != null;
- }
-
- public void setRow_cache_providerIsSet(boolean value) {
- if (!value) {
- this.row_cache_provider = null;
- }
- }
-
- public byte[] getKey_alias() {
- setKey_alias(org.apache.thrift.TBaseHelper.rightSize(key_alias));
- return key_alias == null ? null : key_alias.array();
- }
-
- public ByteBuffer bufferForKey_alias() {
- return key_alias;
- }
-
- public CfDef setKey_alias(byte[] key_alias) {
- setKey_alias(key_alias == null ? (ByteBuffer)null : ByteBuffer.wrap(key_alias));
- return this;
- }
-
- public CfDef setKey_alias(ByteBuffer key_alias) {
- this.key_alias = key_alias;
- return this;
- }
-
- public void unsetKey_alias() {
- this.key_alias = null;
- }
-
- /** Returns true if field key_alias is set (has been assigned a value) and false otherwise */
- public boolean isSetKey_alias() {
- return this.key_alias != null;
- }
-
- public void setKey_aliasIsSet(boolean value) {
- if (!value) {
- this.key_alias = null;
- }
- }
-
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case KEYSPACE:
@@ -1187,49 +929,13 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
- case REPLICATE_ON_WRITE:
- if (value == null) {
- unsetReplicate_on_write();
- } else {
- setReplicate_on_write((Boolean)value);
- }
- break;
-
- case MERGE_SHARDS_CHANCE:
- if (value == null) {
- unsetMerge_shards_chance();
- } else {
- setMerge_shards_chance((Double)value);
- }
- break;
-
- case KEY_VALIDATION_CLASS:
- if (value == null) {
- unsetKey_validation_class();
- } else {
- setKey_validation_class((String)value);
- }
- break;
-
- case ROW_CACHE_PROVIDER:
- if (value == null) {
- unsetRow_cache_provider();
- } else {
- setRow_cache_provider((String)value);
- }
- break;
-
- case KEY_ALIAS:
- if (value == null) {
- unsetKey_alias();
- } else {
- setKey_alias((ByteBuffer)value);
- }
- break;
-
}
}
+ public void setFieldValue(int fieldID, Object value) {
+ setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
+ }
+
public Object getFieldValue(_Fields field) {
switch (field) {
case KEYSPACE:
@@ -1292,31 +998,16 @@ public Object getFieldValue(_Fields field) {
case MEMTABLE_OPERATIONS_IN_MILLIONS:
return new Double(getMemtable_operations_in_millions());
- case REPLICATE_ON_WRITE:
- return new Boolean(isReplicate_on_write());
-
- case MERGE_SHARDS_CHANCE:
- return new Double(getMerge_shards_chance());
-
- case KEY_VALIDATION_CLASS:
- return getKey_validation_class();
-
- case ROW_CACHE_PROVIDER:
- return getRow_cache_provider();
-
- case KEY_ALIAS:
- return getKey_alias();
-
}
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
+ public Object getFieldValue(int fieldId) {
+ return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
+ }
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
switch (field) {
case KEYSPACE:
return isSetKeyspace();
@@ -1358,20 +1049,14 @@ public boolean isSet(_Fields field) {
return isSetMemtable_throughput_in_mb();
case MEMTABLE_OPERATIONS_IN_MILLIONS:
return isSetMemtable_operations_in_millions();
- case REPLICATE_ON_WRITE:
- return isSetReplicate_on_write();
- case MERGE_SHARDS_CHANCE:
- return isSetMerge_shards_chance();
- case KEY_VALIDATION_CLASS:
- return isSetKey_validation_class();
- case ROW_CACHE_PROVIDER:
- return isSetRow_cache_provider();
- case KEY_ALIAS:
- return isSetKey_alias();
}
throw new IllegalStateException();
}
+ public boolean isSet(int fieldID) {
+ return isSet(_Fields.findByThriftIdOrThrow(fieldID));
+ }
+
@Override
public boolean equals(Object that) {
if (that == null)
@@ -1565,51 +1250,6 @@ public boolean equals(CfDef that) {
return false;
}
- boolean this_present_replicate_on_write = true && this.isSetReplicate_on_write();
- boolean that_present_replicate_on_write = true && that.isSetReplicate_on_write();
- if (this_present_replicate_on_write || that_present_replicate_on_write) {
- if (!(this_present_replicate_on_write && that_present_replicate_on_write))
- return false;
- if (this.replicate_on_write != that.replicate_on_write)
- return false;
- }
-
- boolean this_present_merge_shards_chance = true && this.isSetMerge_shards_chance();
- boolean that_present_merge_shards_chance = true && that.isSetMerge_shards_chance();
- if (this_present_merge_shards_chance || that_present_merge_shards_chance) {
- if (!(this_present_merge_shards_chance && that_present_merge_shards_chance))
- return false;
- if (this.merge_shards_chance != that.merge_shards_chance)
- return false;
- }
-
- boolean this_present_key_validation_class = true && this.isSetKey_validation_class();
- boolean that_present_key_validation_class = true && that.isSetKey_validation_class();
- if (this_present_key_validation_class || that_present_key_validation_class) {
- if (!(this_present_key_validation_class && that_present_key_validation_class))
- return false;
- if (!this.key_validation_class.equals(that.key_validation_class))
- return false;
- }
-
- boolean this_present_row_cache_provider = true && this.isSetRow_cache_provider();
- boolean that_present_row_cache_provider = true && that.isSetRow_cache_provider();
- if (this_present_row_cache_provider || that_present_row_cache_provider) {
- if (!(this_present_row_cache_provider && that_present_row_cache_provider))
- return false;
- if (!this.row_cache_provider.equals(that.row_cache_provider))
- return false;
- }
-
- boolean this_present_key_alias = true && this.isSetKey_alias();
- boolean that_present_key_alias = true && that.isSetKey_alias();
- if (this_present_key_alias || that_present_key_alias) {
- if (!(this_present_key_alias && that_present_key_alias))
- return false;
- if (!this.key_alias.equals(that.key_alias))
- return false;
- }
-
return true;
}
@@ -1626,477 +1266,349 @@ public int compareTo(CfDef other) {
int lastComparison = 0;
CfDef typedOther = (CfDef)other;
- lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace());
+ lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(isSetKeyspace());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetKeyspace()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ lastComparison = TBaseHelper.compareTo(keyspace, typedOther.keyspace);
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetColumn_type()).compareTo(typedOther.isSetColumn_type());
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetColumn_type()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_type, typedOther.column_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetComparator_type()).compareTo(typedOther.isSetComparator_type());
+ lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetComparator_type()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comparator_type, typedOther.comparator_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSubcomparator_type()).compareTo(typedOther.isSetSubcomparator_type());
+ lastComparison = Boolean.valueOf(isSetColumn_type()).compareTo(isSetColumn_type());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetSubcomparator_type()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subcomparator_type, typedOther.subcomparator_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment());
+ lastComparison = TBaseHelper.compareTo(column_type, typedOther.column_type);
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetComment()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, typedOther.comment);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRow_cache_size()).compareTo(typedOther.isSetRow_cache_size());
+ lastComparison = Boolean.valueOf(isSetComparator_type()).compareTo(isSetComparator_type());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetRow_cache_size()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_cache_size, typedOther.row_cache_size);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetKey_cache_size()).compareTo(typedOther.isSetKey_cache_size());
+ lastComparison = TBaseHelper.compareTo(comparator_type, typedOther.comparator_type);
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetKey_cache_size()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_cache_size, typedOther.key_cache_size);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRead_repair_chance()).compareTo(typedOther.isSetRead_repair_chance());
+ lastComparison = Boolean.valueOf(isSetSubcomparator_type()).compareTo(isSetSubcomparator_type());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetRead_repair_chance()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.read_repair_chance, typedOther.read_repair_chance);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetColumn_metadata()).compareTo(typedOther.isSetColumn_metadata());
+ lastComparison = TBaseHelper.compareTo(subcomparator_type, typedOther.subcomparator_type);
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetColumn_metadata()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_metadata, typedOther.column_metadata);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGc_grace_seconds()).compareTo(typedOther.isSetGc_grace_seconds());
+ lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetGc_grace_seconds()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc_grace_seconds, typedOther.gc_grace_seconds);
- if (lastComparison != 0) {
- return lastComparison;
- }
+ lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
+ if (lastComparison != 0) {
+ return lastComparison;
}
- lastComparison = Boolean.valueOf(isSetDefault_validation_class()).compareTo(typedOther.isSetDefault_validation_class());
+ lastComparison = Boolean.valueOf(isSetRow_cache_size()).compareTo(isSetRow_cache_size());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetDefault_validation_class()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.default_validation_class, typedOther.default_validation_class);
- if (lastComparison != 0) {
- return lastComparison;
- }
+ lastComparison = TBaseHelper.compareTo(row_cache_size, typedOther.row_cache_size);
+ if (lastComparison != 0) {
+ return lastComparison;
}
- lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
+ lastComparison = Boolean.valueOf(isSetKey_cache_size()).compareTo(isSetKey_cache_size());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
+ lastComparison = TBaseHelper.compareTo(key_cache_size, typedOther.key_cache_size);
+ if (lastComparison != 0) {
+ return lastComparison;
}
- lastComparison = Boolean.valueOf(isSetMin_compaction_threshold()).compareTo(typedOther.isSetMin_compaction_threshold());
+ lastComparison = Boolean.valueOf(isSetRead_repair_chance()).compareTo(