You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2010/07/14 04:47:04 UTC
svn commit: r963928 [3/4] - in /cassandra/trunk: ./
interface/thrift/gen-java/org/apache/cassandra/thrift/ lib/ lib/licenses/
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java Wed Jul 14 02:47:03 2010
@@ -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<CfDe
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<CfDe
* 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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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<CfDe
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Clock.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Clock.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Clock.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Clock.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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<Cloc
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<Cloc
* 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<Cloc
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<Cloc
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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<Col
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<Col
* 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<Col
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,
+ 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.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.CLOCK, new FieldMetaData("clock", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.CLOCK, new FieldMetaData("clock", TFieldRequirementType.REQUIRED,
new StructMetaData(TType.STRUCT, Clock.class)));
- put(_Fields.TTL, new FieldMetaData("ttl", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.TTL, new FieldMetaData("ttl", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.I32)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Column.class, metaDataMap);
}
@@ -430,7 +441,7 @@ public class Column implements TBase<Col
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<Col
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<Col
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<Col
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java Wed Jul 14 02:47:03 2010
@@ -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<
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<
* 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<
// 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.VALIDATION_CLASS, new FieldMetaData("validation_class", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.VALIDATION_CLASS, new FieldMetaData("validation_class", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.INDEX_TYPE, new FieldMetaData("index_type", TFieldRequirementType.OPTIONAL,
+ tmpMap.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,
+ tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnDef.class, metaDataMap);
}
@@ -435,7 +446,7 @@ public class ColumnDef implements TBase<
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<
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<
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<
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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 impleme
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 impleme
* 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 impleme
// 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,
+ 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)));
- put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SuperColumn.class)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnOrSuperColumn.class, metaDataMap);
}
@@ -311,7 +318,7 @@ public class ColumnOrSuperColumn impleme
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 impleme
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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 TBa
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 TBa
* 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 TBa
// 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,
+ 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)));
- put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnParent.class, metaDataMap);
}
@@ -315,7 +322,7 @@ public class ColumnParent implements TBa
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 TBa
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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
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
* 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
// 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,
+ 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)));
- put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnPath.class, metaDataMap);
}
@@ -374,7 +383,7 @@ public class ColumnPath implements TBase
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
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
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java Wed Jul 14 02:47:03 2010
@@ -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<D
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<D
* 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<D
// 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,
+ 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)));
- put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, SlicePredicate.class)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Deletion.class, metaDataMap);
}
@@ -363,7 +372,7 @@ public class Deletion implements TBase<D
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<D
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<D
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java Wed Jul 14 02:47:03 2010
@@ -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 TBas
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 TBas
* 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 TBas
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 TBas
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 TBas
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 TBas
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java Wed Jul 14 02:47:03 2010
@@ -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
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
* 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
// 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,
+ 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)));
- put(_Fields.OP, new FieldMetaData("op", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.OP, new FieldMetaData("op", TFieldRequirementType.REQUIRED,
new EnumMetaData(TType.ENUM, IndexOperator.class)));
- put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.STRING)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(IndexExpression.class, metaDataMap);
}
@@ -384,7 +393,7 @@ public class IndexExpression implements
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
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
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java Wed Jul 14 02:47:03 2010
@@ -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 ext
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 ext
* 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 ext
// 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 ext
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java Wed Jul 14 02:47:03 2010
@@ -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<K
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<K
* 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<K
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,
+ 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.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(KeyCount.class, metaDataMap);
}
@@ -313,7 +320,7 @@ public class KeyCount implements TBase<K
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<K
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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<K
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<K
* 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<K
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,
+ 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)));
- put(_Fields.END_KEY, new FieldMetaData("end_key", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.END_KEY, new FieldMetaData("end_key", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.START_TOKEN, new FieldMetaData("start_token", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.END_TOKEN, new FieldMetaData("end_token", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.STRING)));
- put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(KeyRange.class, metaDataMap);
}
@@ -484,7 +497,7 @@ public class KeyRange implements TBase<K
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<K
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<K
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<K
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<K
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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<K
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<K
* 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<K
// 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<K
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<K
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java Wed Jul 14 02:47:03 2010
@@ -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<KsDe
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<KsDe
* 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<KsDe
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<KsDe
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<KsDe
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<KsDe
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<KsDe
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java Wed Jul 14 02:47:03 2010
@@ -41,7 +41,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
+import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
@@ -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<M
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<M
* 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<M
// 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,
+ 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)));
- put(_Fields.DELETION, new FieldMetaData("deletion", TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.DELETION, new FieldMetaData("deletion", TFieldRequirementType.OPTIONAL,
new StructMetaData(TType.STRUCT, Deletion.class)));
- }});
-
- static {
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap);
}
@@ -306,7 +313,7 @@ public class Mutation implements TBase<M
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<M
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;
}
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java?rev=963928&r1=963927&r2=963928&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java Wed Jul 14 02:47:03 2010
@@ -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 E
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 E
* 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 E
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);
}