upgrade to latest thrift. patch by Nate McCall; reviewed by jbellis for CASSANDRA-1266

git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@963928 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Ellis 2010-07-14 02:47:03 +00:00
parent b22c91127f
commit d849c697a5
31 changed files with 3073 additions and 1187 deletions

View File

@ -41,13 +41,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* invalid authentication request (invalid keyspace, user does not exist, or credentials invalid)
*/
public class AuthenticationException extends Exception implements TBase<AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
public class AuthenticationException extends Exception implements TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("AuthenticationException");
private static final TField WHY_FIELD_DESC = new TField("why", TType.STRING, (short)1);
@ -58,12 +60,10 @@ public class AuthenticationException extends Exception implements TBase<Authenti
public enum _Fields implements TFieldIdEnum {
WHY((short)1, "why");
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);
}
}
@ -72,7 +72,12 @@ public class AuthenticationException extends Exception implements TBase<Authenti
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // WHY
return WHY;
default:
return null;
}
}
/**
@ -111,12 +116,12 @@ public class AuthenticationException extends Exception implements TBase<Authenti
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap);
}
@ -257,7 +262,7 @@ public class AuthenticationException extends Exception implements TBase<Authenti
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWhy()) { lastComparison = TBaseHelper.compareTo(why, typedOther.why);
if (isSetWhy()) { lastComparison = TBaseHelper.compareTo(this.why, typedOther.why);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,13 +41,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* Authentication requests can contain any data, dependent on the AuthenticationBackend used
*/
public class AuthenticationRequest implements TBase<AuthenticationRequest._Fields>, java.io.Serializable, Cloneable {
public class AuthenticationRequest implements TBase<AuthenticationRequest, AuthenticationRequest._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("AuthenticationRequest");
private static final TField CREDENTIALS_FIELD_DESC = new TField("credentials", TType.MAP, (short)1);
@ -58,12 +60,10 @@ public class AuthenticationRequest implements TBase<AuthenticationRequest._Field
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);
}
}
@ -72,7 +72,12 @@ public class AuthenticationRequest implements TBase<AuthenticationRequest._Field
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // CREDENTIALS
return CREDENTIALS;
default:
return null;
}
}
/**
@ -111,14 +116,14 @@ public class AuthenticationRequest implements TBase<AuthenticationRequest._Field
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.CREDENTIALS, new FieldMetaData("credentials", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CREDENTIALS, new FieldMetaData("credentials", TFieldRequirementType.REQUIRED,
new MapMetaData(TType.MAP,
new FieldValueMetaData(TType.STRING),
new FieldValueMetaData(TType.STRING))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(AuthenticationRequest.class, metaDataMap);
}
@ -270,6 +275,26 @@ public class AuthenticationRequest implements TBase<AuthenticationRequest._Field
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 = TBaseHelper.compareTo(this.credentials, typedOther.credentials);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();

View File

@ -41,13 +41,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* invalid authorization request (user does not have access to keyspace)
*/
public class AuthorizationException extends Exception implements TBase<AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
public class AuthorizationException extends Exception implements TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("AuthorizationException");
private static final TField WHY_FIELD_DESC = new TField("why", TType.STRING, (short)1);
@ -58,12 +60,10 @@ public class AuthorizationException extends Exception implements TBase<Authoriza
public enum _Fields implements TFieldIdEnum {
WHY((short)1, "why");
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);
}
}
@ -72,7 +72,12 @@ public class AuthorizationException extends Exception implements TBase<Authoriza
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // WHY
return WHY;
default:
return null;
}
}
/**
@ -111,12 +116,12 @@ public class AuthorizationException extends Exception implements TBase<Authoriza
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
}
@ -257,7 +262,7 @@ public class AuthorizationException extends Exception implements TBase<Authoriza
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWhy()) { lastComparison = TBaseHelper.compareTo(why, typedOther.why);
if (isSetWhy()) { lastComparison = TBaseHelper.compareTo(this.why, typedOther.why);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Cloneable, Comparable<CfDef> {
public class CfDef implements TBase<CfDef, CfDef._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("CfDef");
private static final TField TABLE_FIELD_DESC = new TField("table", TType.STRING, (short)1);
@ -91,12 +93,10 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
READ_REPAIR_CHANCE((short)12, "read_repair_chance"),
COLUMN_METADATA((short)13, "column_metadata");
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);
}
}
@ -105,7 +105,36 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // NAME
return NAME;
case 3: // COLUMN_TYPE
return COLUMN_TYPE;
case 4: // CLOCK_TYPE
return CLOCK_TYPE;
case 5: // COMPARATOR_TYPE
return COMPARATOR_TYPE;
case 6: // SUBCOMPARATOR_TYPE
return SUBCOMPARATOR_TYPE;
case 7: // RECONCILER
return RECONCILER;
case 8: // COMMENT
return COMMENT;
case 9: // ROW_CACHE_SIZE
return ROW_CACHE_SIZE;
case 10: // PRELOAD_ROW_CACHE
return PRELOAD_ROW_CACHE;
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;
default:
return null;
}
}
/**
@ -149,37 +178,37 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
private static final int __READ_REPAIR_CHANCE_ISSET_ID = 3;
private BitSet __isset_bit_vector = new BitSet(4);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.TABLE, new FieldMetaData("table", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new FieldMetaData("table", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COLUMN_TYPE, new FieldMetaData("column_type", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.COLUMN_TYPE, new FieldMetaData("column_type", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.CLOCK_TYPE, new FieldMetaData("clock_type", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.CLOCK_TYPE, new FieldMetaData("clock_type", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COMPARATOR_TYPE, new FieldMetaData("comparator_type", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.COMPARATOR_TYPE, new FieldMetaData("comparator_type", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.SUBCOMPARATOR_TYPE, new FieldMetaData("subcomparator_type", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.SUBCOMPARATOR_TYPE, new FieldMetaData("subcomparator_type", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.RECONCILER, new FieldMetaData("reconciler", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.RECONCILER, new FieldMetaData("reconciler", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.ROW_CACHE_SIZE, new FieldMetaData("row_cache_size", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.ROW_CACHE_SIZE, new FieldMetaData("row_cache_size", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.DOUBLE)));
put(_Fields.PRELOAD_ROW_CACHE, new FieldMetaData("preload_row_cache", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.PRELOAD_ROW_CACHE, new FieldMetaData("preload_row_cache", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.BOOL)));
put(_Fields.KEY_CACHE_SIZE, new FieldMetaData("key_cache_size", TFieldRequirementType.OPTIONAL,
tmpMap.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,
tmpMap.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,
tmpMap.put(_Fields.COLUMN_METADATA, new FieldMetaData("column_metadata", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, ColumnDef.class))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(CfDef.class, metaDataMap);
}
@ -939,7 +968,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) { lastComparison = TBaseHelper.compareTo(table, typedOther.table);
if (isSetTable()) { lastComparison = TBaseHelper.compareTo(this.table, typedOther.table);
if (lastComparison != 0) {
return lastComparison;
}
@ -948,7 +977,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) { lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (isSetName()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -957,7 +986,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_type()) { lastComparison = TBaseHelper.compareTo(column_type, typedOther.column_type);
if (isSetColumn_type()) { lastComparison = TBaseHelper.compareTo(this.column_type, typedOther.column_type);
if (lastComparison != 0) {
return lastComparison;
}
@ -966,7 +995,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClock_type()) { lastComparison = TBaseHelper.compareTo(clock_type, typedOther.clock_type);
if (isSetClock_type()) { lastComparison = TBaseHelper.compareTo(this.clock_type, typedOther.clock_type);
if (lastComparison != 0) {
return lastComparison;
}
@ -975,7 +1004,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetComparator_type()) { lastComparison = TBaseHelper.compareTo(comparator_type, typedOther.comparator_type);
if (isSetComparator_type()) { lastComparison = TBaseHelper.compareTo(this.comparator_type, typedOther.comparator_type);
if (lastComparison != 0) {
return lastComparison;
}
@ -984,7 +1013,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSubcomparator_type()) { lastComparison = TBaseHelper.compareTo(subcomparator_type, typedOther.subcomparator_type);
if (isSetSubcomparator_type()) { lastComparison = TBaseHelper.compareTo(this.subcomparator_type, typedOther.subcomparator_type);
if (lastComparison != 0) {
return lastComparison;
}
@ -993,7 +1022,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReconciler()) { lastComparison = TBaseHelper.compareTo(reconciler, typedOther.reconciler);
if (isSetReconciler()) { lastComparison = TBaseHelper.compareTo(this.reconciler, typedOther.reconciler);
if (lastComparison != 0) {
return lastComparison;
}
@ -1002,7 +1031,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetComment()) { lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
if (isSetComment()) { lastComparison = TBaseHelper.compareTo(this.comment, typedOther.comment);
if (lastComparison != 0) {
return lastComparison;
}
@ -1011,7 +1040,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow_cache_size()) { lastComparison = TBaseHelper.compareTo(row_cache_size, typedOther.row_cache_size);
if (isSetRow_cache_size()) { lastComparison = TBaseHelper.compareTo(this.row_cache_size, typedOther.row_cache_size);
if (lastComparison != 0) {
return lastComparison;
}
@ -1020,7 +1049,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPreload_row_cache()) { lastComparison = TBaseHelper.compareTo(preload_row_cache, typedOther.preload_row_cache);
if (isSetPreload_row_cache()) { lastComparison = TBaseHelper.compareTo(this.preload_row_cache, typedOther.preload_row_cache);
if (lastComparison != 0) {
return lastComparison;
}
@ -1029,7 +1058,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKey_cache_size()) { lastComparison = TBaseHelper.compareTo(key_cache_size, typedOther.key_cache_size);
if (isSetKey_cache_size()) { lastComparison = TBaseHelper.compareTo(this.key_cache_size, typedOther.key_cache_size);
if (lastComparison != 0) {
return lastComparison;
}
@ -1038,7 +1067,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRead_repair_chance()) { lastComparison = TBaseHelper.compareTo(read_repair_chance, typedOther.read_repair_chance);
if (isSetRead_repair_chance()) { lastComparison = TBaseHelper.compareTo(this.read_repair_chance, typedOther.read_repair_chance);
if (lastComparison != 0) {
return lastComparison;
}
@ -1047,7 +1076,7 @@ public class CfDef implements TBase<CfDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_metadata()) { lastComparison = TBaseHelper.compareTo(column_metadata, typedOther.column_metadata);
if (isSetColumn_metadata()) { lastComparison = TBaseHelper.compareTo(this.column_metadata, typedOther.column_metadata);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -51,7 +53,7 @@ import org.apache.thrift.protocol.*;
* highest timestamp is the one whose value the system will converge to. No other assumptions
* are made about what the timestamp represents, but using microseconds-since-epoch is customary.
*/
public class Clock implements TBase<Clock._Fields>, java.io.Serializable, Cloneable, Comparable<Clock> {
public class Clock implements TBase<Clock, Clock._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("Clock");
private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)1);
@ -62,12 +64,10 @@ public class Clock implements TBase<Clock._Fields>, java.io.Serializable, Clonea
public enum _Fields implements TFieldIdEnum {
TIMESTAMP((short)1, "timestamp");
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);
}
}
@ -76,7 +76,12 @@ public class Clock implements TBase<Clock._Fields>, java.io.Serializable, Clonea
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // TIMESTAMP
return TIMESTAMP;
default:
return null;
}
}
/**
@ -117,12 +122,12 @@ public class Clock implements TBase<Clock._Fields>, java.io.Serializable, Clonea
private static final int __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I64)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Clock.class, metaDataMap);
}
@ -263,7 +268,7 @@ public class Clock implements TBase<Clock._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) { lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
if (isSetTimestamp()) { lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -51,7 +53,7 @@ import org.apache.thrift.protocol.*;
* @param clock. The clock is used for conflict detection/resolution when two columns with same name need to be compared.
* @param ttl. An optional, positive delay (in seconds) after which the column will be automatically deleted.
*/
public class Column implements TBase<Column._Fields>, java.io.Serializable, Cloneable, Comparable<Column> {
public class Column implements TBase<Column, Column._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("Column");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
@ -71,12 +73,10 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
CLOCK((short)3, "clock"),
TTL((short)4, "ttl");
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);
}
}
@ -85,7 +85,18 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // NAME
return NAME;
case 2: // VALUE
return VALUE;
case 3: // CLOCK
return CLOCK;
case 4: // TTL
return TTL;
default:
return null;
}
}
/**
@ -126,18 +137,18 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
private static final int __TTL_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.CLOCK, new FieldMetaData("clock", TFieldRequirementType.REQUIRED,
new StructMetaData(TType.STRUCT, Clock.class)));
put(_Fields.TTL, new FieldMetaData("ttl", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.I32)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.CLOCK, new FieldMetaData("clock", TFieldRequirementType.REQUIRED,
new StructMetaData(TType.STRUCT, Clock.class)));
tmpMap.put(_Fields.TTL, new FieldMetaData("ttl", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Column.class, metaDataMap);
}
@ -430,7 +441,7 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) { lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (isSetName()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -439,7 +450,7 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) { lastComparison = TBaseHelper.compareTo(value, typedOther.value);
if (isSetValue()) { lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
if (lastComparison != 0) {
return lastComparison;
}
@ -448,7 +459,7 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClock()) { lastComparison = TBaseHelper.compareTo(clock, typedOther.clock);
if (isSetClock()) { lastComparison = TBaseHelper.compareTo(this.clock, typedOther.clock);
if (lastComparison != 0) {
return lastComparison;
}
@ -457,7 +468,7 @@ public class Column implements TBase<Column._Fields>, java.io.Serializable, Clon
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTtl()) { lastComparison = TBaseHelper.compareTo(ttl, typedOther.ttl);
if (isSetTtl()) { lastComparison = TBaseHelper.compareTo(this.ttl, typedOther.ttl);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnDef> {
public class ColumnDef implements TBase<ColumnDef, ColumnDef._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ColumnDef");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
@ -72,12 +74,10 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
INDEX_TYPE((short)3, "index_type"),
INDEX_NAME((short)4, "index_name");
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);
}
}
@ -86,7 +86,18 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // NAME
return NAME;
case 2: // VALIDATION_CLASS
return VALIDATION_CLASS;
case 3: // INDEX_TYPE
return INDEX_TYPE;
case 4: // INDEX_NAME
return INDEX_NAME;
default:
return null;
}
}
/**
@ -125,18 +136,18 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.VALIDATION_CLASS, new FieldMetaData("validation_class", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.INDEX_TYPE, new FieldMetaData("index_type", TFieldRequirementType.OPTIONAL,
new EnumMetaData(TType.ENUM, IndexType.class)));
put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.VALIDATION_CLASS, new FieldMetaData("validation_class", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.INDEX_TYPE, new FieldMetaData("index_type", TFieldRequirementType.OPTIONAL,
new EnumMetaData(TType.ENUM, IndexType.class)));
tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnDef.class, metaDataMap);
}
@ -435,7 +446,7 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) { lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (isSetName()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -444,7 +455,7 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValidation_class()) { lastComparison = TBaseHelper.compareTo(validation_class, typedOther.validation_class);
if (isSetValidation_class()) { lastComparison = TBaseHelper.compareTo(this.validation_class, typedOther.validation_class);
if (lastComparison != 0) {
return lastComparison;
}
@ -453,7 +464,7 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndex_type()) { lastComparison = TBaseHelper.compareTo(index_type, typedOther.index_type);
if (isSetIndex_type()) { lastComparison = TBaseHelper.compareTo(this.index_type, typedOther.index_type);
if (lastComparison != 0) {
return lastComparison;
}
@ -462,7 +473,7 @@ public class ColumnDef implements TBase<ColumnDef._Fields>, java.io.Serializable
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndex_name()) { lastComparison = TBaseHelper.compareTo(index_name, typedOther.index_name);
if (isSetIndex_name()) { lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -54,7 +56,7 @@ import org.apache.thrift.protocol.*;
* @param column. The Column returned by get() or get_slice().
* @param super_column. The SuperColumn returned by get() or get_slice().
*/
public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnOrSuperColumn> {
public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn, ColumnOrSuperColumn._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ColumnOrSuperColumn");
private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRUCT, (short)1);
@ -68,12 +70,10 @@ public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn._Fields>,
COLUMN((short)1, "column"),
SUPER_COLUMN((short)2, "super_column");
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);
}
}
@ -82,7 +82,14 @@ public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn._Fields>,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // COLUMN
return COLUMN;
case 2: // SUPER_COLUMN
return SUPER_COLUMN;
default:
return null;
}
}
/**
@ -121,14 +128,14 @@ public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn._Fields>,
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, Column.class)));
put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SuperColumn.class)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, Column.class)));
tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SuperColumn.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnOrSuperColumn.class, metaDataMap);
}
@ -311,7 +318,7 @@ public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn._Fields>,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) { lastComparison = TBaseHelper.compareTo(column, typedOther.column);
if (isSetColumn()) { lastComparison = TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
@ -320,7 +327,7 @@ public class ColumnOrSuperColumn implements TBase<ColumnOrSuperColumn._Fields>,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -50,7 +52,7 @@ import org.apache.thrift.protocol.*;
*
* See also <a href="cassandra.html#Struct_ColumnPath">ColumnPath</a>
*/
public class ColumnParent implements TBase<ColumnParent._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnParent> {
public class ColumnParent implements TBase<ColumnParent, ColumnParent._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ColumnParent");
private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("column_family", TType.STRING, (short)3);
@ -64,12 +66,10 @@ public class ColumnParent implements TBase<ColumnParent._Fields>, java.io.Serial
COLUMN_FAMILY((short)3, "column_family"),
SUPER_COLUMN((short)4, "super_column");
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);
}
}
@ -78,7 +78,14 @@ public class ColumnParent implements TBase<ColumnParent._Fields>, java.io.Serial
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 3: // COLUMN_FAMILY
return COLUMN_FAMILY;
case 4: // SUPER_COLUMN
return SUPER_COLUMN;
default:
return null;
}
}
/**
@ -117,14 +124,14 @@ public class ColumnParent implements TBase<ColumnParent._Fields>, java.io.Serial
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.COLUMN_FAMILY, new FieldMetaData("column_family", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_FAMILY, new FieldMetaData("column_family", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnParent.class, metaDataMap);
}
@ -315,7 +322,7 @@ public class ColumnParent implements TBase<ColumnParent._Fields>, java.io.Serial
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_family()) { lastComparison = TBaseHelper.compareTo(column_family, typedOther.column_family);
if (isSetColumn_family()) { lastComparison = TBaseHelper.compareTo(this.column_family, typedOther.column_family);
if (lastComparison != 0) {
return lastComparison;
}
@ -324,7 +331,7 @@ public class ColumnParent implements TBase<ColumnParent._Fields>, java.io.Serial
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -54,7 +56,7 @@ import org.apache.thrift.protocol.*;
* @param super_column. The super column name.
* @param column. The column name.
*/
public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnPath> {
public class ColumnPath implements TBase<ColumnPath, ColumnPath._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ColumnPath");
private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("column_family", TType.STRING, (short)3);
@ -71,12 +73,10 @@ public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializab
SUPER_COLUMN((short)4, "super_column"),
COLUMN((short)5, "column");
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);
}
}
@ -85,7 +85,16 @@ public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializab
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 3: // COLUMN_FAMILY
return COLUMN_FAMILY;
case 4: // SUPER_COLUMN
return SUPER_COLUMN;
case 5: // COLUMN
return COLUMN;
default:
return null;
}
}
/**
@ -124,16 +133,16 @@ public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializab
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.COLUMN_FAMILY, new FieldMetaData("column_family", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_FAMILY, new FieldMetaData("column_family", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnPath.class, metaDataMap);
}
@ -374,7 +383,7 @@ public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_family()) { lastComparison = TBaseHelper.compareTo(column_family, typedOther.column_family);
if (isSetColumn_family()) { lastComparison = TBaseHelper.compareTo(this.column_family, typedOther.column_family);
if (lastComparison != 0) {
return lastComparison;
}
@ -383,7 +392,7 @@ public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
if (lastComparison != 0) {
return lastComparison;
}
@ -392,7 +401,7 @@ public class ColumnPath implements TBase<ColumnPath._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) { lastComparison = TBaseHelper.compareTo(column, typedOther.column);
if (isSetColumn()) { lastComparison = TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable, Cloneable, Comparable<Deletion> {
public class Deletion implements TBase<Deletion, Deletion._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("Deletion");
private static final TField CLOCK_FIELD_DESC = new TField("clock", TType.STRUCT, (short)1);
@ -61,12 +63,10 @@ public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable,
SUPER_COLUMN((short)2, "super_column"),
PREDICATE((short)3, "predicate");
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);
}
}
@ -75,7 +75,16 @@ public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // CLOCK
return CLOCK;
case 2: // SUPER_COLUMN
return SUPER_COLUMN;
case 3: // PREDICATE
return PREDICATE;
default:
return null;
}
}
/**
@ -114,16 +123,16 @@ public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable,
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.CLOCK, new FieldMetaData("clock", TFieldRequirementType.REQUIRED,
new StructMetaData(TType.STRUCT, Clock.class)));
put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SlicePredicate.class)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CLOCK, new FieldMetaData("clock", TFieldRequirementType.REQUIRED,
new StructMetaData(TType.STRUCT, Clock.class)));
tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SlicePredicate.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Deletion.class, metaDataMap);
}
@ -363,7 +372,7 @@ public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClock()) { lastComparison = TBaseHelper.compareTo(clock, typedOther.clock);
if (isSetClock()) { lastComparison = TBaseHelper.compareTo(this.clock, typedOther.clock);
if (lastComparison != 0) {
return lastComparison;
}
@ -372,7 +381,7 @@ public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
if (isSetSuper_column()) { lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
if (lastComparison != 0) {
return lastComparison;
}
@ -381,7 +390,7 @@ public class Deletion implements TBase<Deletion._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPredicate()) { lastComparison = TBaseHelper.compareTo(predicate, typedOther.predicate);
if (isSetPredicate()) { lastComparison = TBaseHelper.compareTo(this.predicate, typedOther.predicate);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializable, Cloneable, Comparable<IndexClause> {
public class IndexClause implements TBase<IndexClause, IndexClause._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("IndexClause");
private static final TField EXPRESSIONS_FIELD_DESC = new TField("expressions", TType.LIST, (short)1);
@ -61,12 +63,10 @@ public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializ
COUNT((short)2, "count"),
START_KEY((short)3, "start_key");
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);
}
}
@ -75,7 +75,16 @@ public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializ
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // EXPRESSIONS
return EXPRESSIONS;
case 2: // COUNT
return COUNT;
case 3: // START_KEY
return START_KEY;
default:
return null;
}
}
/**
@ -116,17 +125,17 @@ public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializ
private static final int __COUNT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.EXPRESSIONS, new FieldMetaData("expressions", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXPRESSIONS, new FieldMetaData("expressions", TFieldRequirementType.REQUIRED,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, IndexExpression.class))));
put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(IndexClause.class, metaDataMap);
}
@ -389,7 +398,7 @@ public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializ
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpressions()) { lastComparison = TBaseHelper.compareTo(expressions, typedOther.expressions);
if (isSetExpressions()) { lastComparison = TBaseHelper.compareTo(this.expressions, typedOther.expressions);
if (lastComparison != 0) {
return lastComparison;
}
@ -398,7 +407,7 @@ public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializ
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(count, typedOther.count);
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
if (lastComparison != 0) {
return lastComparison;
}
@ -407,7 +416,7 @@ public class IndexClause implements TBase<IndexClause._Fields>, java.io.Serializ
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStart_key()) { lastComparison = TBaseHelper.compareTo(start_key, typedOther.start_key);
if (isSetStart_key()) { lastComparison = TBaseHelper.compareTo(this.start_key, typedOther.start_key);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.Serializable, Cloneable, Comparable<IndexExpression> {
public class IndexExpression implements TBase<IndexExpression, IndexExpression._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("IndexExpression");
private static final TField COLUMN_NAME_FIELD_DESC = new TField("column_name", TType.STRING, (short)1);
@ -69,12 +71,10 @@ public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.
OP((short)2, "op"),
VALUE((short)3, "value");
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);
}
}
@ -83,7 +83,16 @@ public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // COLUMN_NAME
return COLUMN_NAME;
case 2: // OP
return OP;
case 3: // VALUE
return VALUE;
default:
return null;
}
}
/**
@ -122,16 +131,16 @@ public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.OP, new FieldMetaData("op", TFieldRequirementType.REQUIRED,
new EnumMetaData(TType.ENUM, IndexOperator.class)));
put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.OP, new FieldMetaData("op", TFieldRequirementType.REQUIRED,
new EnumMetaData(TType.ENUM, IndexOperator.class)));
tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(IndexExpression.class, metaDataMap);
}
@ -384,7 +393,7 @@ public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_name()) { lastComparison = TBaseHelper.compareTo(column_name, typedOther.column_name);
if (isSetColumn_name()) { lastComparison = TBaseHelper.compareTo(this.column_name, typedOther.column_name);
if (lastComparison != 0) {
return lastComparison;
}
@ -393,7 +402,7 @@ public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOp()) { lastComparison = TBaseHelper.compareTo(op, typedOther.op);
if (isSetOp()) { lastComparison = TBaseHelper.compareTo(this.op, typedOther.op);
if (lastComparison != 0) {
return lastComparison;
}
@ -402,7 +411,7 @@ public class IndexExpression implements TBase<IndexExpression._Fields>, java.io.
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) { lastComparison = TBaseHelper.compareTo(value, typedOther.value);
if (isSetValue()) { lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,14 +41,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
* why contains an associated error message.
*/
public class InvalidRequestException extends Exception implements TBase<InvalidRequestException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidRequestException> {
public class InvalidRequestException extends Exception implements TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("InvalidRequestException");
private static final TField WHY_FIELD_DESC = new TField("why", TType.STRING, (short)1);
@ -59,12 +61,10 @@ public class InvalidRequestException extends Exception implements TBase<InvalidR
public enum _Fields implements TFieldIdEnum {
WHY((short)1, "why");
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);
}
}
@ -73,7 +73,12 @@ public class InvalidRequestException extends Exception implements TBase<InvalidR
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // WHY
return WHY;
default:
return null;
}
}
/**
@ -112,12 +117,12 @@ public class InvalidRequestException extends Exception implements TBase<InvalidR
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WHY, new FieldMetaData("why", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(InvalidRequestException.class, metaDataMap);
}
@ -258,7 +263,7 @@ public class InvalidRequestException extends Exception implements TBase<InvalidR
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWhy()) { lastComparison = TBaseHelper.compareTo(why, typedOther.why);
if (isSetWhy()) { lastComparison = TBaseHelper.compareTo(this.why, typedOther.why);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class KeyCount implements TBase<KeyCount._Fields>, java.io.Serializable, Cloneable, Comparable<KeyCount> {
public class KeyCount implements TBase<KeyCount, KeyCount._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("KeyCount");
private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)1);
@ -58,12 +60,10 @@ public class KeyCount implements TBase<KeyCount._Fields>, java.io.Serializable,
KEY((short)1, "key"),
COUNT((short)2, "count");
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);
}
}
@ -72,7 +72,14 @@ public class KeyCount implements TBase<KeyCount._Fields>, java.io.Serializable,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // KEY
return KEY;
case 2: // COUNT
return COUNT;
default:
return null;
}
}
/**
@ -113,14 +120,14 @@ public class KeyCount implements TBase<KeyCount._Fields>, java.io.Serializable,
private static final int __COUNT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.KEY, new FieldMetaData("key", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEY, new FieldMetaData("key", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(KeyCount.class, metaDataMap);
}
@ -313,7 +320,7 @@ public class KeyCount implements TBase<KeyCount._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKey()) { lastComparison = TBaseHelper.compareTo(key, typedOther.key);
if (isSetKey()) { lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
if (lastComparison != 0) {
return lastComparison;
}
@ -322,7 +329,7 @@ public class KeyCount implements TBase<KeyCount._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(count, typedOther.count);
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -52,7 +54,7 @@ import org.apache.thrift.protocol.*;
* one-element range, but a range from tokenY to tokenY is the
* full ring.
*/
public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable, Cloneable, Comparable<KeyRange> {
public class KeyRange implements TBase<KeyRange, KeyRange._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("KeyRange");
private static final TField START_KEY_FIELD_DESC = new TField("start_key", TType.STRING, (short)1);
@ -75,12 +77,10 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
END_TOKEN((short)4, "end_token"),
COUNT((short)5, "count");
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);
}
}
@ -89,7 +89,20 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // START_KEY
return START_KEY;
case 2: // END_KEY
return END_KEY;
case 3: // START_TOKEN
return START_TOKEN;
case 4: // END_TOKEN
return END_TOKEN;
case 5: // COUNT
return COUNT;
default:
return null;
}
}
/**
@ -130,20 +143,20 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
private static final int __COUNT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.END_KEY, new FieldMetaData("end_key", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.END_KEY, new FieldMetaData("end_key", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(KeyRange.class, metaDataMap);
}
@ -484,7 +497,7 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStart_key()) { lastComparison = TBaseHelper.compareTo(start_key, typedOther.start_key);
if (isSetStart_key()) { lastComparison = TBaseHelper.compareTo(this.start_key, typedOther.start_key);
if (lastComparison != 0) {
return lastComparison;
}
@ -493,7 +506,7 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEnd_key()) { lastComparison = TBaseHelper.compareTo(end_key, typedOther.end_key);
if (isSetEnd_key()) { lastComparison = TBaseHelper.compareTo(this.end_key, typedOther.end_key);
if (lastComparison != 0) {
return lastComparison;
}
@ -502,7 +515,7 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStart_token()) { lastComparison = TBaseHelper.compareTo(start_token, typedOther.start_token);
if (isSetStart_token()) { lastComparison = TBaseHelper.compareTo(this.start_token, typedOther.start_token);
if (lastComparison != 0) {
return lastComparison;
}
@ -511,7 +524,7 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEnd_token()) { lastComparison = TBaseHelper.compareTo(end_token, typedOther.end_token);
if (isSetEnd_token()) { lastComparison = TBaseHelper.compareTo(this.end_token, typedOther.end_token);
if (lastComparison != 0) {
return lastComparison;
}
@ -520,7 +533,7 @@ public class KeyRange implements TBase<KeyRange._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(count, typedOther.count);
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -51,7 +53,7 @@ import org.apache.thrift.protocol.*;
* @param columns. List of data represented by the key. Typically, the list is pared down to only the columns specified by
* a SlicePredicate.
*/
public class KeySlice implements TBase<KeySlice._Fields>, java.io.Serializable, Cloneable, Comparable<KeySlice> {
public class KeySlice implements TBase<KeySlice, KeySlice._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("KeySlice");
private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)1);
@ -65,12 +67,10 @@ public class KeySlice implements TBase<KeySlice._Fields>, java.io.Serializable,
KEY((short)1, "key"),
COLUMNS((short)2, "columns");
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);
}
}
@ -79,7 +79,14 @@ public class KeySlice implements TBase<KeySlice._Fields>, java.io.Serializable,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // KEY
return KEY;
case 2: // COLUMNS
return COLUMNS;
default:
return null;
}
}
/**
@ -118,15 +125,15 @@ public class KeySlice implements TBase<KeySlice._Fields>, java.io.Serializable,
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.KEY, new FieldMetaData("key", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEY, new FieldMetaData("key", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.REQUIRED,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(KeySlice.class, metaDataMap);
}
@ -338,7 +345,7 @@ public class KeySlice implements TBase<KeySlice._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKey()) { lastComparison = TBaseHelper.compareTo(key, typedOther.key);
if (isSetKey()) { lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
if (lastComparison != 0) {
return lastComparison;
}
@ -347,7 +354,7 @@ public class KeySlice implements TBase<KeySlice._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) { lastComparison = TBaseHelper.compareTo(columns, typedOther.columns);
if (isSetColumns()) { lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Cloneable, Comparable<KsDef> {
public class KsDef implements TBase<KsDef, KsDef._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("KsDef");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
@ -64,12 +66,10 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
REPLICATION_FACTOR((short)3, "replication_factor"),
CF_DEFS((short)5, "cf_defs");
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);
}
}
@ -78,7 +78,18 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // NAME
return NAME;
case 2: // STRATEGY_CLASS
return STRATEGY_CLASS;
case 3: // REPLICATION_FACTOR
return REPLICATION_FACTOR;
case 5: // CF_DEFS
return CF_DEFS;
default:
return null;
}
}
/**
@ -119,19 +130,19 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
private static final int __REPLICATION_FACTOR_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.STRATEGY_CLASS, new FieldMetaData("strategy_class", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.STRATEGY_CLASS, new FieldMetaData("strategy_class", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.REPLICATION_FACTOR, new FieldMetaData("replication_factor", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.REPLICATION_FACTOR, new FieldMetaData("replication_factor", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
put(_Fields.CF_DEFS, new FieldMetaData("cf_defs", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.CF_DEFS, new FieldMetaData("cf_defs", TFieldRequirementType.REQUIRED,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, CfDef.class))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(KsDef.class, metaDataMap);
}
@ -444,7 +455,7 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) { lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (isSetName()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -453,7 +464,7 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStrategy_class()) { lastComparison = TBaseHelper.compareTo(strategy_class, typedOther.strategy_class);
if (isSetStrategy_class()) { lastComparison = TBaseHelper.compareTo(this.strategy_class, typedOther.strategy_class);
if (lastComparison != 0) {
return lastComparison;
}
@ -462,7 +473,7 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplication_factor()) { lastComparison = TBaseHelper.compareTo(replication_factor, typedOther.replication_factor);
if (isSetReplication_factor()) { lastComparison = TBaseHelper.compareTo(this.replication_factor, typedOther.replication_factor);
if (lastComparison != 0) {
return lastComparison;
}
@ -471,7 +482,7 @@ public class KsDef implements TBase<KsDef._Fields>, java.io.Serializable, Clonea
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCf_defs()) { lastComparison = TBaseHelper.compareTo(cf_defs, typedOther.cf_defs);
if (isSetCf_defs()) { lastComparison = TBaseHelper.compareTo(this.cf_defs, typedOther.cf_defs);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -49,7 +51,7 @@ import org.apache.thrift.protocol.*;
* @param column_or_supercolumn. An insert to a column or supercolumn
* @param deletion. A deletion of a column or supercolumn
*/
public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable, Cloneable, Comparable<Mutation> {
public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("Mutation");
private static final TField COLUMN_OR_SUPERCOLUMN_FIELD_DESC = new TField("column_or_supercolumn", TType.STRUCT, (short)1);
@ -63,12 +65,10 @@ public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable,
COLUMN_OR_SUPERCOLUMN((short)1, "column_or_supercolumn"),
DELETION((short)2, "deletion");
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);
}
}
@ -77,7 +77,14 @@ public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // COLUMN_OR_SUPERCOLUMN
return COLUMN_OR_SUPERCOLUMN;
case 2: // DELETION
return DELETION;
default:
return null;
}
}
/**
@ -116,14 +123,14 @@ public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable,
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.COLUMN_OR_SUPERCOLUMN, new FieldMetaData("column_or_supercolumn", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class)));
put(_Fields.DELETION, new FieldMetaData("deletion", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, Deletion.class)));
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_OR_SUPERCOLUMN, new FieldMetaData("column_or_supercolumn", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class)));
tmpMap.put(_Fields.DELETION, new FieldMetaData("deletion", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, Deletion.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap);
}
@ -306,7 +313,7 @@ public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_or_supercolumn()) { lastComparison = TBaseHelper.compareTo(column_or_supercolumn, typedOther.column_or_supercolumn);
if (isSetColumn_or_supercolumn()) { lastComparison = TBaseHelper.compareTo(this.column_or_supercolumn, typedOther.column_or_supercolumn);
if (lastComparison != 0) {
return lastComparison;
}
@ -315,7 +322,7 @@ public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable,
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeletion()) { lastComparison = TBaseHelper.compareTo(deletion, typedOther.deletion);
if (isSetDeletion()) { lastComparison = TBaseHelper.compareTo(this.deletion, typedOther.deletion);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,13 +41,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* A specific column was requested that does not exist.
*/
public class NotFoundException extends Exception implements TBase<NotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<NotFoundException> {
public class NotFoundException extends Exception implements TBase<NotFoundException, NotFoundException._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("NotFoundException");
@ -56,12 +58,10 @@ public class NotFoundException extends Exception implements TBase<NotFoundExcept
public enum _Fields implements TFieldIdEnum {
;
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);
}
}
@ -70,7 +70,10 @@ public class NotFoundException extends Exception implements TBase<NotFoundExcept
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
default:
return null;
}
}
/**
@ -106,10 +109,10 @@ public class NotFoundException extends Exception implements TBase<NotFoundExcept
return _fieldName;
}
}
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(NotFoundException.class, metaDataMap);
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serializable, Cloneable, Comparable<RowPredicate> {
public class RowPredicate implements TBase<RowPredicate, RowPredicate._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("RowPredicate");
private static final TField KEYS_FIELD_DESC = new TField("keys", TType.LIST, (short)1);
@ -61,12 +63,10 @@ public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serial
KEY_RANGE((short)2, "key_range"),
INDEX_CLAUSE((short)3, "index_clause");
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);
}
}
@ -75,7 +75,16 @@ public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serial
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // KEYS
return KEYS;
case 2: // KEY_RANGE
return KEY_RANGE;
case 3: // INDEX_CLAUSE
return INDEX_CLAUSE;
default:
return null;
}
}
/**
@ -114,17 +123,17 @@ public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serial
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.KEYS, new FieldMetaData("keys", TFieldRequirementType.OPTIONAL,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEYS, new FieldMetaData("keys", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING))));
put(_Fields.KEY_RANGE, new FieldMetaData("key_range", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.KEY_RANGE, new FieldMetaData("key_range", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, KeyRange.class)));
put(_Fields.INDEX_CLAUSE, new FieldMetaData("index_clause", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.INDEX_CLAUSE, new FieldMetaData("index_clause", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, IndexClause.class)));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(RowPredicate.class, metaDataMap);
}
@ -377,7 +386,7 @@ public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serial
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) { lastComparison = TBaseHelper.compareTo(keys, typedOther.keys);
if (isSetKeys()) { lastComparison = TBaseHelper.compareTo(this.keys, typedOther.keys);
if (lastComparison != 0) {
return lastComparison;
}
@ -386,7 +395,7 @@ public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serial
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKey_range()) { lastComparison = TBaseHelper.compareTo(key_range, typedOther.key_range);
if (isSetKey_range()) { lastComparison = TBaseHelper.compareTo(this.key_range, typedOther.key_range);
if (lastComparison != 0) {
return lastComparison;
}
@ -395,7 +404,7 @@ public class RowPredicate implements TBase<RowPredicate._Fields>, java.io.Serial
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndex_clause()) { lastComparison = TBaseHelper.compareTo(index_clause, typedOther.index_clause);
if (isSetIndex_clause()) { lastComparison = TBaseHelper.compareTo(this.index_clause, typedOther.index_clause);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -56,7 +58,7 @@ import org.apache.thrift.protocol.*;
* and 'Jim' you can pass those column names as a list to fetch all three at once.
* @param slice_range. A SliceRange describing how to range, order, and/or limit the slice.
*/
public class SlicePredicate implements TBase<SlicePredicate._Fields>, java.io.Serializable, Cloneable, Comparable<SlicePredicate> {
public class SlicePredicate implements TBase<SlicePredicate, SlicePredicate._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("SlicePredicate");
private static final TField COLUMN_NAMES_FIELD_DESC = new TField("column_names", TType.LIST, (short)1);
@ -70,12 +72,10 @@ public class SlicePredicate implements TBase<SlicePredicate._Fields>, java.io.Se
COLUMN_NAMES((short)1, "column_names"),
SLICE_RANGE((short)2, "slice_range");
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);
}
}
@ -84,7 +84,14 @@ public class SlicePredicate implements TBase<SlicePredicate._Fields>, java.io.Se
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // COLUMN_NAMES
return COLUMN_NAMES;
case 2: // SLICE_RANGE
return SLICE_RANGE;
default:
return null;
}
}
/**
@ -123,15 +130,15 @@ public class SlicePredicate implements TBase<SlicePredicate._Fields>, java.io.Se
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.COLUMN_NAMES, new FieldMetaData("column_names", TFieldRequirementType.OPTIONAL,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_NAMES, new FieldMetaData("column_names", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING))));
put(_Fields.SLICE_RANGE, new FieldMetaData("slice_range", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.SLICE_RANGE, new FieldMetaData("slice_range", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SliceRange.class)));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(SlicePredicate.class, metaDataMap);
}
@ -335,7 +342,7 @@ public class SlicePredicate implements TBase<SlicePredicate._Fields>, java.io.Se
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn_names()) { lastComparison = TBaseHelper.compareTo(column_names, typedOther.column_names);
if (isSetColumn_names()) { lastComparison = TBaseHelper.compareTo(this.column_names, typedOther.column_names);
if (lastComparison != 0) {
return lastComparison;
}
@ -344,7 +351,7 @@ public class SlicePredicate implements TBase<SlicePredicate._Fields>, java.io.Se
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSlice_range()) { lastComparison = TBaseHelper.compareTo(slice_range, typedOther.slice_range);
if (isSetSlice_range()) { lastComparison = TBaseHelper.compareTo(this.slice_range, typedOther.slice_range);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -61,7 +63,7 @@ import org.apache.thrift.protocol.*;
* of the next instead of increasing 'count' arbitrarily large.
* @param bitmasks. A list of OR-ed binary AND masks applied to the result set.
*/
public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializable, Cloneable, Comparable<SliceRange> {
public class SliceRange implements TBase<SliceRange, SliceRange._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("SliceRange");
private static final TField START_FIELD_DESC = new TField("start", TType.STRING, (short)1);
@ -84,12 +86,10 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
COUNT((short)4, "count"),
BITMASKS((short)5, "bitmasks");
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);
}
}
@ -98,7 +98,20 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // START
return START;
case 2: // FINISH
return FINISH;
case 3: // REVERSED
return REVERSED;
case 4: // COUNT
return COUNT;
case 5: // BITMASKS
return BITMASKS;
default:
return null;
}
}
/**
@ -140,21 +153,21 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
private static final int __COUNT_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.START, new FieldMetaData("start", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START, new FieldMetaData("start", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.FINISH, new FieldMetaData("finish", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.FINISH, new FieldMetaData("finish", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.REVERSED, new FieldMetaData("reversed", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.REVERSED, new FieldMetaData("reversed", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.BOOL)));
put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
put(_Fields.BITMASKS, new FieldMetaData("bitmasks", TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.BITMASKS, new FieldMetaData("bitmasks", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(SliceRange.class, metaDataMap);
}
@ -522,7 +535,7 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStart()) { lastComparison = TBaseHelper.compareTo(start, typedOther.start);
if (isSetStart()) { lastComparison = TBaseHelper.compareTo(this.start, typedOther.start);
if (lastComparison != 0) {
return lastComparison;
}
@ -531,7 +544,7 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFinish()) { lastComparison = TBaseHelper.compareTo(finish, typedOther.finish);
if (isSetFinish()) { lastComparison = TBaseHelper.compareTo(this.finish, typedOther.finish);
if (lastComparison != 0) {
return lastComparison;
}
@ -540,7 +553,7 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReversed()) { lastComparison = TBaseHelper.compareTo(reversed, typedOther.reversed);
if (isSetReversed()) { lastComparison = TBaseHelper.compareTo(this.reversed, typedOther.reversed);
if (lastComparison != 0) {
return lastComparison;
}
@ -549,7 +562,7 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(count, typedOther.count);
if (isSetCount()) { lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
if (lastComparison != 0) {
return lastComparison;
}
@ -558,7 +571,7 @@ public class SliceRange implements TBase<SliceRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBitmasks()) { lastComparison = TBaseHelper.compareTo(bitmasks, typedOther.bitmasks);
if (isSetBitmasks()) { lastComparison = TBaseHelper.compareTo(this.bitmasks, typedOther.bitmasks);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@ -50,7 +52,7 @@ import org.apache.thrift.protocol.*;
* @param columns. A collection of standard Columns. The columns within a super column are defined in an adhoc manner.
* Columns within a super column do not have to have matching structures (similarly named child columns).
*/
public class SuperColumn implements TBase<SuperColumn._Fields>, java.io.Serializable, Cloneable, Comparable<SuperColumn> {
public class SuperColumn implements TBase<SuperColumn, SuperColumn._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("SuperColumn");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
@ -64,12 +66,10 @@ public class SuperColumn implements TBase<SuperColumn._Fields>, java.io.Serializ
NAME((short)1, "name"),
COLUMNS((short)2, "columns");
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);
}
}
@ -78,7 +78,14 @@ public class SuperColumn implements TBase<SuperColumn._Fields>, java.io.Serializ
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // NAME
return NAME;
case 2: // COLUMNS
return COLUMNS;
default:
return null;
}
}
/**
@ -117,15 +124,15 @@ public class SuperColumn implements TBase<SuperColumn._Fields>, java.io.Serializ
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.REQUIRED,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, Column.class))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(SuperColumn.class, metaDataMap);
}
@ -337,7 +344,7 @@ public class SuperColumn implements TBase<SuperColumn._Fields>, java.io.Serializ
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) { lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (isSetName()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -346,7 +353,7 @@ public class SuperColumn implements TBase<SuperColumn._Fields>, java.io.Serializ
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) { lastComparison = TBaseHelper.compareTo(columns, typedOther.columns);
if (isSetColumns()) { lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,13 +41,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large.
*/
public class TimedOutException extends Exception implements TBase<TimedOutException._Fields>, java.io.Serializable, Cloneable, Comparable<TimedOutException> {
public class TimedOutException extends Exception implements TBase<TimedOutException, TimedOutException._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("TimedOutException");
@ -56,12 +58,10 @@ public class TimedOutException extends Exception implements TBase<TimedOutExcept
public enum _Fields implements TFieldIdEnum {
;
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);
}
}
@ -70,7 +70,10 @@ public class TimedOutException extends Exception implements TBase<TimedOutExcept
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
default:
return null;
}
}
/**
@ -106,10 +109,10 @@ public class TimedOutException extends Exception implements TBase<TimedOutExcept
return _fieldName;
}
}
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(TimedOutException.class, metaDataMap);
}

View File

@ -41,10 +41,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializable, Cloneable, Comparable<TokenRange> {
public class TokenRange implements TBase<TokenRange, TokenRange._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("TokenRange");
private static final TField START_TOKEN_FIELD_DESC = new TField("start_token", TType.STRING, (short)1);
@ -61,12 +63,10 @@ public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializab
END_TOKEN((short)2, "end_token"),
ENDPOINTS((short)3, "endpoints");
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);
}
}
@ -75,7 +75,16 @@ public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializab
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
case 1: // START_TOKEN
return START_TOKEN;
case 2: // END_TOKEN
return END_TOKEN;
case 3: // ENDPOINTS
return ENDPOINTS;
default:
return null;
}
}
/**
@ -114,17 +123,17 @@ public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializab
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.REQUIRED,
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
put(_Fields.ENDPOINTS, new FieldMetaData("endpoints", TFieldRequirementType.REQUIRED,
tmpMap.put(_Fields.ENDPOINTS, new FieldMetaData("endpoints", TFieldRequirementType.REQUIRED,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING))));
}});
static {
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(TokenRange.class, metaDataMap);
}
@ -386,7 +395,7 @@ public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStart_token()) { lastComparison = TBaseHelper.compareTo(start_token, typedOther.start_token);
if (isSetStart_token()) { lastComparison = TBaseHelper.compareTo(this.start_token, typedOther.start_token);
if (lastComparison != 0) {
return lastComparison;
}
@ -395,7 +404,7 @@ public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEnd_token()) { lastComparison = TBaseHelper.compareTo(end_token, typedOther.end_token);
if (isSetEnd_token()) { lastComparison = TBaseHelper.compareTo(this.end_token, typedOther.end_token);
if (lastComparison != 0) {
return lastComparison;
}
@ -404,7 +413,7 @@ public class TokenRange implements TBase<TokenRange._Fields>, java.io.Serializab
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndpoints()) { lastComparison = TBaseHelper.compareTo(endpoints, typedOther.endpoints);
if (isSetEndpoints()) { lastComparison = TBaseHelper.compareTo(this.endpoints, typedOther.endpoints);
if (lastComparison != 0) {
return lastComparison;
}

View File

@ -41,13 +41,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* Not all the replicas required could be created and/or read.
*/
public class UnavailableException extends Exception implements TBase<UnavailableException._Fields>, java.io.Serializable, Cloneable, Comparable<UnavailableException> {
public class UnavailableException extends Exception implements TBase<UnavailableException, UnavailableException._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("UnavailableException");
@ -56,12 +58,10 @@ public class UnavailableException extends Exception implements TBase<Unavailable
public enum _Fields implements TFieldIdEnum {
;
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);
}
}
@ -70,7 +70,10 @@ public class UnavailableException extends Exception implements TBase<Unavailable
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
switch(fieldId) {
default:
return null;
}
}
/**
@ -106,10 +109,10 @@ public class UnavailableException extends Exception implements TBase<Unavailable
return _fieldName;
}
}
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
}});
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(UnavailableException.class, metaDataMap);
}

Binary file not shown.

BIN
lib/libthrift-r959516.jar Normal file

Binary file not shown.