diff --git a/pom.xml b/pom.xml index 3f88dc5..9e50126 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,7 @@ org.apache.thrift libthrift - 0.21.0 + 0.20.0 org.slf4j diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/ColumnHashType.java b/src/main/java/it/cavallium/rockserver/core/common/api/ColumnHashType.java deleted file mode 100644 index c2d6321..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/ColumnHashType.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - - -public enum ColumnHashType implements org.apache.thrift.TEnum { - XXHASH32(1), - XXHASH8(2), - ALLSAME8(3); - - private final int value; - - private ColumnHashType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - @Override - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - @org.apache.thrift.annotation.Nullable - public static ColumnHashType findByValue(int value) { - switch (value) { - case 1: - return XXHASH32; - case 2: - return XXHASH8; - case 3: - return ALLSAME8; - default: - return null; - } - } -} diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/ColumnSchema.java b/src/main/java/it/cavallium/rockserver/core/common/api/ColumnSchema.java deleted file mode 100644 index cc6c2d6..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/ColumnSchema.java +++ /dev/null @@ -1,701 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class ColumnSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnSchema"); - - private static final org.apache.thrift.protocol.TField FIXED_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("fixedKeys", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField VARIABLE_TAIL_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("variableTailKeys", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField HAS_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("hasValue", org.apache.thrift.protocol.TType.BOOL, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ColumnSchemaStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ColumnSchemaTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.util.List fixedKeys; // required - public @org.apache.thrift.annotation.Nullable java.util.List variableTailKeys; // required - public boolean hasValue; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FIXED_KEYS((short)1, "fixedKeys"), - VARIABLE_TAIL_KEYS((short)2, "variableTailKeys"), - HAS_VALUE((short)3, "hasValue"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FIXED_KEYS - return FIXED_KEYS; - case 2: // VARIABLE_TAIL_KEYS - return VARIABLE_TAIL_KEYS; - case 3: // HAS_VALUE - return HAS_VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __HASVALUE_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FIXED_KEYS, new org.apache.thrift.meta_data.FieldMetaData("fixedKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.VARIABLE_TAIL_KEYS, new org.apache.thrift.meta_data.FieldMetaData("variableTailKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ColumnHashType.class)))); - tmpMap.put(_Fields.HAS_VALUE, new org.apache.thrift.meta_data.FieldMetaData("hasValue", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnSchema.class, metaDataMap); - } - - public ColumnSchema() { - } - - public ColumnSchema( - java.util.List fixedKeys, - java.util.List variableTailKeys, - boolean hasValue) - { - this(); - this.fixedKeys = fixedKeys; - this.variableTailKeys = variableTailKeys; - this.hasValue = hasValue; - setHasValueIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public ColumnSchema(ColumnSchema other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetFixedKeys()) { - java.util.List __this__fixedKeys = new java.util.ArrayList(other.fixedKeys); - this.fixedKeys = __this__fixedKeys; - } - if (other.isSetVariableTailKeys()) { - java.util.List __this__variableTailKeys = new java.util.ArrayList(other.variableTailKeys.size()); - for (ColumnHashType other_element : other.variableTailKeys) { - __this__variableTailKeys.add(other_element); - } - this.variableTailKeys = __this__variableTailKeys; - } - this.hasValue = other.hasValue; - } - - @Override - public ColumnSchema deepCopy() { - return new ColumnSchema(this); - } - - @Override - public void clear() { - this.fixedKeys = null; - this.variableTailKeys = null; - setHasValueIsSet(false); - this.hasValue = false; - } - - public int getFixedKeysSize() { - return (this.fixedKeys == null) ? 0 : this.fixedKeys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getFixedKeysIterator() { - return (this.fixedKeys == null) ? null : this.fixedKeys.iterator(); - } - - public void addToFixedKeys(int elem) { - if (this.fixedKeys == null) { - this.fixedKeys = new java.util.ArrayList(); - } - this.fixedKeys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getFixedKeys() { - return this.fixedKeys; - } - - public ColumnSchema setFixedKeys(@org.apache.thrift.annotation.Nullable java.util.List fixedKeys) { - this.fixedKeys = fixedKeys; - return this; - } - - public void unsetFixedKeys() { - this.fixedKeys = null; - } - - /** Returns true if field fixedKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetFixedKeys() { - return this.fixedKeys != null; - } - - public void setFixedKeysIsSet(boolean value) { - if (!value) { - this.fixedKeys = null; - } - } - - public int getVariableTailKeysSize() { - return (this.variableTailKeys == null) ? 0 : this.variableTailKeys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getVariableTailKeysIterator() { - return (this.variableTailKeys == null) ? null : this.variableTailKeys.iterator(); - } - - public void addToVariableTailKeys(ColumnHashType elem) { - if (this.variableTailKeys == null) { - this.variableTailKeys = new java.util.ArrayList(); - } - this.variableTailKeys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getVariableTailKeys() { - return this.variableTailKeys; - } - - public ColumnSchema setVariableTailKeys(@org.apache.thrift.annotation.Nullable java.util.List variableTailKeys) { - this.variableTailKeys = variableTailKeys; - return this; - } - - public void unsetVariableTailKeys() { - this.variableTailKeys = null; - } - - /** Returns true if field variableTailKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetVariableTailKeys() { - return this.variableTailKeys != null; - } - - public void setVariableTailKeysIsSet(boolean value) { - if (!value) { - this.variableTailKeys = null; - } - } - - public boolean isHasValue() { - return this.hasValue; - } - - public ColumnSchema setHasValue(boolean hasValue) { - this.hasValue = hasValue; - setHasValueIsSet(true); - return this; - } - - public void unsetHasValue() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASVALUE_ISSET_ID); - } - - /** Returns true if field hasValue is set (has been assigned a value) and false otherwise */ - public boolean isSetHasValue() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASVALUE_ISSET_ID); - } - - public void setHasValueIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASVALUE_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case FIXED_KEYS: - if (value == null) { - unsetFixedKeys(); - } else { - setFixedKeys((java.util.List)value); - } - break; - - case VARIABLE_TAIL_KEYS: - if (value == null) { - unsetVariableTailKeys(); - } else { - setVariableTailKeys((java.util.List)value); - } - break; - - case HAS_VALUE: - if (value == null) { - unsetHasValue(); - } else { - setHasValue((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case FIXED_KEYS: - return getFixedKeys(); - - case VARIABLE_TAIL_KEYS: - return getVariableTailKeys(); - - case HAS_VALUE: - return isHasValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case FIXED_KEYS: - return isSetFixedKeys(); - case VARIABLE_TAIL_KEYS: - return isSetVariableTailKeys(); - case HAS_VALUE: - return isSetHasValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof ColumnSchema) - return this.equals((ColumnSchema)that); - return false; - } - - public boolean equals(ColumnSchema that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_fixedKeys = true && this.isSetFixedKeys(); - boolean that_present_fixedKeys = true && that.isSetFixedKeys(); - if (this_present_fixedKeys || that_present_fixedKeys) { - if (!(this_present_fixedKeys && that_present_fixedKeys)) - return false; - if (!this.fixedKeys.equals(that.fixedKeys)) - return false; - } - - boolean this_present_variableTailKeys = true && this.isSetVariableTailKeys(); - boolean that_present_variableTailKeys = true && that.isSetVariableTailKeys(); - if (this_present_variableTailKeys || that_present_variableTailKeys) { - if (!(this_present_variableTailKeys && that_present_variableTailKeys)) - return false; - if (!this.variableTailKeys.equals(that.variableTailKeys)) - return false; - } - - boolean this_present_hasValue = true; - boolean that_present_hasValue = true; - if (this_present_hasValue || that_present_hasValue) { - if (!(this_present_hasValue && that_present_hasValue)) - return false; - if (this.hasValue != that.hasValue) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetFixedKeys()) ? 131071 : 524287); - if (isSetFixedKeys()) - hashCode = hashCode * 8191 + fixedKeys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetVariableTailKeys()) ? 131071 : 524287); - if (isSetVariableTailKeys()) - hashCode = hashCode * 8191 + variableTailKeys.hashCode(); - - hashCode = hashCode * 8191 + ((hasValue) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(ColumnSchema other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetFixedKeys(), other.isSetFixedKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFixedKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fixedKeys, other.fixedKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetVariableTailKeys(), other.isSetVariableTailKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVariableTailKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableTailKeys, other.variableTailKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetHasValue(), other.isSetHasValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHasValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasValue, other.hasValue); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("ColumnSchema("); - boolean first = true; - - sb.append("fixedKeys:"); - if (this.fixedKeys == null) { - sb.append("null"); - } else { - sb.append(this.fixedKeys); - } - first = false; - if (!first) sb.append(", "); - sb.append("variableTailKeys:"); - if (this.variableTailKeys == null) { - sb.append("null"); - } else { - sb.append(this.variableTailKeys); - } - first = false; - if (!first) sb.append(", "); - sb.append("hasValue:"); - sb.append(this.hasValue); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class ColumnSchemaStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public ColumnSchemaStandardScheme getScheme() { - return new ColumnSchemaStandardScheme(); - } - } - - private static class ColumnSchemaStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnSchema struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // FIXED_KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.fixedKeys = new java.util.ArrayList(_list0.size); - int _elem1; - for (int _i2 = 0; _i2 < _list0.size; ++_i2) - { - _elem1 = iprot.readI32(); - struct.fixedKeys.add(_elem1); - } - iprot.readListEnd(); - } - struct.setFixedKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VARIABLE_TAIL_KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); - struct.variableTailKeys = new java.util.ArrayList(_list3.size); - @org.apache.thrift.annotation.Nullable ColumnHashType _elem4; - for (int _i5 = 0; _i5 < _list3.size; ++_i5) - { - _elem4 = it.cavallium.rockserver.core.common.api.ColumnHashType.findByValue(iprot.readI32()); - if (_elem4 != null) - { - struct.variableTailKeys.add(_elem4); - } - } - iprot.readListEnd(); - } - struct.setVariableTailKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // HAS_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.hasValue = iprot.readBool(); - struct.setHasValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnSchema struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.fixedKeys != null) { - oprot.writeFieldBegin(FIXED_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.fixedKeys.size())); - for (int _iter6 : struct.fixedKeys) - { - oprot.writeI32(_iter6); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.variableTailKeys != null) { - oprot.writeFieldBegin(VARIABLE_TAIL_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.variableTailKeys.size())); - for (ColumnHashType _iter7 : struct.variableTailKeys) - { - oprot.writeI32(_iter7.getValue()); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(HAS_VALUE_FIELD_DESC); - oprot.writeBool(struct.hasValue); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ColumnSchemaTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public ColumnSchemaTupleScheme getScheme() { - return new ColumnSchemaTupleScheme(); - } - } - - private static class ColumnSchemaTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ColumnSchema struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetFixedKeys()) { - optionals.set(0); - } - if (struct.isSetVariableTailKeys()) { - optionals.set(1); - } - if (struct.isSetHasValue()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetFixedKeys()) { - { - oprot.writeI32(struct.fixedKeys.size()); - for (int _iter8 : struct.fixedKeys) - { - oprot.writeI32(_iter8); - } - } - } - if (struct.isSetVariableTailKeys()) { - { - oprot.writeI32(struct.variableTailKeys.size()); - for (ColumnHashType _iter9 : struct.variableTailKeys) - { - oprot.writeI32(_iter9.getValue()); - } - } - } - if (struct.isSetHasValue()) { - oprot.writeBool(struct.hasValue); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ColumnSchema struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.fixedKeys = new java.util.ArrayList(_list10.size); - int _elem11; - for (int _i12 = 0; _i12 < _list10.size; ++_i12) - { - _elem11 = iprot.readI32(); - struct.fixedKeys.add(_elem11); - } - } - struct.setFixedKeysIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.variableTailKeys = new java.util.ArrayList(_list13.size); - @org.apache.thrift.annotation.Nullable ColumnHashType _elem14; - for (int _i15 = 0; _i15 < _list13.size; ++_i15) - { - _elem14 = it.cavallium.rockserver.core.common.api.ColumnHashType.findByValue(iprot.readI32()); - if (_elem14 != null) - { - struct.variableTailKeys.add(_elem14); - } - } - } - struct.setVariableTailKeysIsSet(true); - } - if (incoming.get(2)) { - struct.hasValue = iprot.readBool(); - struct.setHasValueIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/Delta.java b/src/main/java/it/cavallium/rockserver/core/common/api/Delta.java deleted file mode 100644 index 1dbcdb6..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/Delta.java +++ /dev/null @@ -1,518 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class Delta implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Delta"); - - private static final org.apache.thrift.protocol.TField PREVIOUS_FIELD_DESC = new org.apache.thrift.protocol.TField("previous", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField CURRENT_FIELD_DESC = new org.apache.thrift.protocol.TField("current", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DeltaStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DeltaTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer previous; // optional - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer current; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PREVIOUS((short)1, "previous"), - CURRENT((short)2, "current"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PREVIOUS - return PREVIOUS; - case 2: // CURRENT - return CURRENT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.PREVIOUS,_Fields.CURRENT}; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PREVIOUS, new org.apache.thrift.meta_data.FieldMetaData("previous", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.CURRENT, new org.apache.thrift.meta_data.FieldMetaData("current", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Delta.class, metaDataMap); - } - - public Delta() { - } - - /** - * Performs a deep copy on other. - */ - public Delta(Delta other) { - if (other.isSetPrevious()) { - this.previous = org.apache.thrift.TBaseHelper.copyBinary(other.previous); - } - if (other.isSetCurrent()) { - this.current = org.apache.thrift.TBaseHelper.copyBinary(other.current); - } - } - - @Override - public Delta deepCopy() { - return new Delta(this); - } - - @Override - public void clear() { - this.previous = null; - this.current = null; - } - - public byte[] getPrevious() { - setPrevious(org.apache.thrift.TBaseHelper.rightSize(previous)); - return previous == null ? null : previous.array(); - } - - public java.nio.ByteBuffer bufferForPrevious() { - return org.apache.thrift.TBaseHelper.copyBinary(previous); - } - - public Delta setPrevious(byte[] previous) { - this.previous = previous == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(previous.clone()); - return this; - } - - public Delta setPrevious(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer previous) { - this.previous = org.apache.thrift.TBaseHelper.copyBinary(previous); - return this; - } - - public void unsetPrevious() { - this.previous = null; - } - - /** Returns true if field previous is set (has been assigned a value) and false otherwise */ - public boolean isSetPrevious() { - return this.previous != null; - } - - public void setPreviousIsSet(boolean value) { - if (!value) { - this.previous = null; - } - } - - public byte[] getCurrent() { - setCurrent(org.apache.thrift.TBaseHelper.rightSize(current)); - return current == null ? null : current.array(); - } - - public java.nio.ByteBuffer bufferForCurrent() { - return org.apache.thrift.TBaseHelper.copyBinary(current); - } - - public Delta setCurrent(byte[] current) { - this.current = current == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(current.clone()); - return this; - } - - public Delta setCurrent(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer current) { - this.current = org.apache.thrift.TBaseHelper.copyBinary(current); - return this; - } - - public void unsetCurrent() { - this.current = null; - } - - /** Returns true if field current is set (has been assigned a value) and false otherwise */ - public boolean isSetCurrent() { - return this.current != null; - } - - public void setCurrentIsSet(boolean value) { - if (!value) { - this.current = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case PREVIOUS: - if (value == null) { - unsetPrevious(); - } else { - if (value instanceof byte[]) { - setPrevious((byte[])value); - } else { - setPrevious((java.nio.ByteBuffer)value); - } - } - break; - - case CURRENT: - if (value == null) { - unsetCurrent(); - } else { - if (value instanceof byte[]) { - setCurrent((byte[])value); - } else { - setCurrent((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case PREVIOUS: - return getPrevious(); - - case CURRENT: - return getCurrent(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case PREVIOUS: - return isSetPrevious(); - case CURRENT: - return isSetCurrent(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof Delta) - return this.equals((Delta)that); - return false; - } - - public boolean equals(Delta that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_previous = true && this.isSetPrevious(); - boolean that_present_previous = true && that.isSetPrevious(); - if (this_present_previous || that_present_previous) { - if (!(this_present_previous && that_present_previous)) - return false; - if (!this.previous.equals(that.previous)) - return false; - } - - boolean this_present_current = true && this.isSetCurrent(); - boolean that_present_current = true && that.isSetCurrent(); - if (this_present_current || that_present_current) { - if (!(this_present_current && that_present_current)) - return false; - if (!this.current.equals(that.current)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetPrevious()) ? 131071 : 524287); - if (isSetPrevious()) - hashCode = hashCode * 8191 + previous.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCurrent()) ? 131071 : 524287); - if (isSetCurrent()) - hashCode = hashCode * 8191 + current.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(Delta other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetPrevious(), other.isSetPrevious()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrevious()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.previous, other.previous); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCurrent(), other.isSetCurrent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCurrent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.current, other.current); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("Delta("); - boolean first = true; - - if (isSetPrevious()) { - sb.append("previous:"); - if (this.previous == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.previous, sb); - } - first = false; - } - if (isSetCurrent()) { - if (!first) sb.append(", "); - sb.append("current:"); - if (this.current == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.current, sb); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class DeltaStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public DeltaStandardScheme getScheme() { - return new DeltaStandardScheme(); - } - } - - private static class DeltaStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, Delta struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PREVIOUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.previous = iprot.readBinary(); - struct.setPreviousIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CURRENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.current = iprot.readBinary(); - struct.setCurrentIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, Delta struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.previous != null) { - if (struct.isSetPrevious()) { - oprot.writeFieldBegin(PREVIOUS_FIELD_DESC); - oprot.writeBinary(struct.previous); - oprot.writeFieldEnd(); - } - } - if (struct.current != null) { - if (struct.isSetCurrent()) { - oprot.writeFieldBegin(CURRENT_FIELD_DESC); - oprot.writeBinary(struct.current); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DeltaTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public DeltaTupleScheme getScheme() { - return new DeltaTupleScheme(); - } - } - - private static class DeltaTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Delta struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetPrevious()) { - optionals.set(0); - } - if (struct.isSetCurrent()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPrevious()) { - oprot.writeBinary(struct.previous); - } - if (struct.isSetCurrent()) { - oprot.writeBinary(struct.current); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Delta struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.previous = iprot.readBinary(); - struct.setPreviousIsSet(true); - } - if (incoming.get(1)) { - struct.current = iprot.readBinary(); - struct.setCurrentIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/InvalidOperation.java b/src/main/java/it/cavallium/rockserver/core/common/api/InvalidOperation.java deleted file mode 100644 index 3dee648..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/InvalidOperation.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.19.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - -/** - * Structs can also be exceptions, if they are nasty. - */ -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class InvalidOperation extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperation"); - - private static final org.apache.thrift.protocol.TField WHAT_OP_FIELD_DESC = new org.apache.thrift.protocol.TField("whatOp", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InvalidOperationStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InvalidOperationTupleSchemeFactory(); - - public int whatOp; // required - public @org.apache.thrift.annotation.Nullable java.lang.String why; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - WHAT_OP((short)1, "whatOp"), - WHY((short)2, "why"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // WHAT_OP - return WHAT_OP; - case 2: // WHY - return WHY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __WHATOP_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.WHAT_OP, new org.apache.thrift.meta_data.FieldMetaData("whatOp", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.WHY, new org.apache.thrift.meta_data.FieldMetaData("why", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidOperation.class, metaDataMap); - } - - public InvalidOperation() { - } - - public InvalidOperation( - int whatOp, - java.lang.String why) - { - this(); - this.whatOp = whatOp; - setWhatOpIsSet(true); - this.why = why; - } - - /** - * Performs a deep copy on other. - */ - public InvalidOperation(InvalidOperation other) { - __isset_bitfield = other.__isset_bitfield; - this.whatOp = other.whatOp; - if (other.isSetWhy()) { - this.why = other.why; - } - } - - @Override - public InvalidOperation deepCopy() { - return new InvalidOperation(this); - } - - @Override - public void clear() { - setWhatOpIsSet(false); - this.whatOp = 0; - this.why = null; - } - - public int getWhatOp() { - return this.whatOp; - } - - public InvalidOperation setWhatOp(int whatOp) { - this.whatOp = whatOp; - setWhatOpIsSet(true); - return this; - } - - public void unsetWhatOp() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WHATOP_ISSET_ID); - } - - /** Returns true if field whatOp is set (has been assigned a value) and false otherwise */ - public boolean isSetWhatOp() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WHATOP_ISSET_ID); - } - - public void setWhatOpIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WHATOP_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getWhy() { - return this.why; - } - - public InvalidOperation setWhy(@org.apache.thrift.annotation.Nullable java.lang.String why) { - this.why = why; - return this; - } - - public void unsetWhy() { - this.why = null; - } - - /** Returns true if field why is set (has been assigned a value) and false otherwise */ - public boolean isSetWhy() { - return this.why != null; - } - - public void setWhyIsSet(boolean value) { - if (!value) { - this.why = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case WHAT_OP: - if (value == null) { - unsetWhatOp(); - } else { - setWhatOp((java.lang.Integer)value); - } - break; - - case WHY: - if (value == null) { - unsetWhy(); - } else { - setWhy((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case WHAT_OP: - return getWhatOp(); - - case WHY: - return getWhy(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case WHAT_OP: - return isSetWhatOp(); - case WHY: - return isSetWhy(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof InvalidOperation) - return this.equals((InvalidOperation)that); - return false; - } - - public boolean equals(InvalidOperation that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_whatOp = true; - boolean that_present_whatOp = true; - if (this_present_whatOp || that_present_whatOp) { - if (!(this_present_whatOp && that_present_whatOp)) - return false; - if (this.whatOp != that.whatOp) - return false; - } - - boolean this_present_why = true && this.isSetWhy(); - boolean that_present_why = true && that.isSetWhy(); - if (this_present_why || that_present_why) { - if (!(this_present_why && that_present_why)) - return false; - if (!this.why.equals(that.why)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + whatOp; - - hashCode = hashCode * 8191 + ((isSetWhy()) ? 131071 : 524287); - if (isSetWhy()) - hashCode = hashCode * 8191 + why.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(InvalidOperation other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetWhatOp(), other.isSetWhatOp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWhatOp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.whatOp, other.whatOp); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetWhy(), other.isSetWhy()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWhy()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.why, other.why); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("InvalidOperation("); - boolean first = true; - - sb.append("whatOp:"); - sb.append(this.whatOp); - first = false; - if (!first) sb.append(", "); - sb.append("why:"); - if (this.why == null) { - sb.append("null"); - } else { - sb.append(this.why); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class InvalidOperationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public InvalidOperationStandardScheme getScheme() { - return new InvalidOperationStandardScheme(); - } - } - - private static class InvalidOperationStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidOperation struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // WHAT_OP - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.whatOp = iprot.readI32(); - struct.setWhatOpIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // WHY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.why = iprot.readString(); - struct.setWhyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidOperation struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(WHAT_OP_FIELD_DESC); - oprot.writeI32(struct.whatOp); - oprot.writeFieldEnd(); - if (struct.why != null) { - oprot.writeFieldBegin(WHY_FIELD_DESC); - oprot.writeString(struct.why); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class InvalidOperationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public InvalidOperationTupleScheme getScheme() { - return new InvalidOperationTupleScheme(); - } - } - - private static class InvalidOperationTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, InvalidOperation struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetWhatOp()) { - optionals.set(0); - } - if (struct.isSetWhy()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetWhatOp()) { - oprot.writeI32(struct.whatOp); - } - if (struct.isSetWhy()) { - oprot.writeString(struct.why); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, InvalidOperation struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.whatOp = iprot.readI32(); - struct.setWhatOpIsSet(true); - } - if (incoming.get(1)) { - struct.why = iprot.readString(); - struct.setWhyIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/Operation.java b/src/main/java/it/cavallium/rockserver/core/common/api/Operation.java deleted file mode 100644 index 60e6de6..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/Operation.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - - -public enum Operation implements org.apache.thrift.TEnum { - NOTHING(1), - PREVIOUS(2), - CURRENT(3), - FOR_UPDATE(4), - EXISTS(5), - DELTA(6), - MULTI(7), - CHANGED(8), - PREVIOUS_PRESENCE(9); - - private final int value; - - private Operation(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - @Override - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - @org.apache.thrift.annotation.Nullable - public static Operation findByValue(int value) { - switch (value) { - case 1: - return NOTHING; - case 2: - return PREVIOUS; - case 3: - return CURRENT; - case 4: - return FOR_UPDATE; - case 5: - return EXISTS; - case 6: - return DELTA; - case 7: - return MULTI; - case 8: - return CHANGED; - case 9: - return PREVIOUS_PRESENCE; - default: - return null; - } - } -} diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/OptionalBinary.java b/src/main/java/it/cavallium/rockserver/core/common/api/OptionalBinary.java deleted file mode 100644 index b90b55a..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/OptionalBinary.java +++ /dev/null @@ -1,398 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class OptionalBinary implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalBinary"); - - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new OptionalBinaryStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new OptionalBinaryTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VALUE((short)1, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.VALUE}; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalBinary.class, metaDataMap); - } - - public OptionalBinary() { - } - - /** - * Performs a deep copy on other. - */ - public OptionalBinary(OptionalBinary other) { - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public OptionalBinary deepCopy() { - return new OptionalBinary(this); - } - - @Override - public void clear() { - this.value = null; - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public OptionalBinary setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public OptionalBinary setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof OptionalBinary) - return this.equals((OptionalBinary)that); - return false; - } - - public boolean equals(OptionalBinary that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(OptionalBinary other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("OptionalBinary("); - boolean first = true; - - if (isSetValue()) { - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class OptionalBinaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public OptionalBinaryStandardScheme getScheme() { - return new OptionalBinaryStandardScheme(); - } - } - - private static class OptionalBinaryStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalBinary struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalBinary struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.value != null) { - if (struct.isSetValue()) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OptionalBinaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public OptionalBinaryTupleScheme getScheme() { - return new OptionalBinaryTupleScheme(); - } - } - - private static class OptionalBinaryTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OptionalBinary struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetValue()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetValue()) { - oprot.writeBinary(struct.value); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OptionalBinary struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/RocksDB.java b/src/main/java/it/cavallium/rockserver/core/common/api/RocksDB.java deleted file mode 100644 index f84e4e3..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/RocksDB.java +++ /dev/null @@ -1,23844 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class RocksDB { - - public interface Iface { - - public long openTransaction(long timeoutMs) throws org.apache.thrift.TException; - - public boolean closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException; - - public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException; - - public long createColumn(java.lang.String name, ColumnSchema schema) throws org.apache.thrift.TException; - - public void deleteColumn(long columnId) throws org.apache.thrift.TException; - - public long getColumnId(java.lang.String name) throws org.apache.thrift.TException; - - public void putFast(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException; - - public void put(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException; - - public void putMulti(long transactionOrUpdateId, long columnId, java.util.List> keysMulti, java.util.List valueMulti) throws org.apache.thrift.TException; - - public OptionalBinary putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException; - - public Delta putGetDelta(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException; - - public boolean putGetChanged(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException; - - public boolean putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException; - - public OptionalBinary get(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException; - - public UpdateBegin getForUpdate(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException; - - public boolean exists(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException; - - public long openIterator(long transactionId, long columnId, java.util.List startKeysInclusive, java.util.List endKeysExclusive, boolean reverse, long timeoutMs) throws org.apache.thrift.TException; - - public void closeIterator(long iteratorId) throws org.apache.thrift.TException; - - public void seekTo(long iterationId, java.util.List keys) throws org.apache.thrift.TException; - - public void subsequent(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException; - - public boolean subsequentExists(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException; - - public java.util.List subsequentMultiGet(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeTransaction(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createColumn(java.lang.String name, ColumnSchema schema, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteColumn(long columnId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getColumnId(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void putFast(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void put(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void putMulti(long transactionOrUpdateId, long columnId, java.util.List> keysMulti, java.util.List valueMulti, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void putGetDelta(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void putGetChanged(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getForUpdate(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void exists(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void openIterator(long transactionId, long columnId, java.util.List startKeysInclusive, java.util.List endKeysExclusive, boolean reverse, long timeoutMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeIterator(long iteratorId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void seekTo(long iterationId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void subsequent(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void subsequentExists(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void subsequentMultiGet(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; - - } - - public static class Client extends org.apache.thrift.TServiceClient implements Iface { - public static class Factory implements org.apache.thrift.TServiceClientFactory { - public Factory() {} - @Override - public Client getClient(org.apache.thrift.protocol.TProtocol prot) { - return new Client(prot); - } - @Override - public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - return new Client(iprot, oprot); - } - } - - public Client(org.apache.thrift.protocol.TProtocol prot) - { - super(prot, prot); - } - - public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - super(iprot, oprot); - } - - @Override - public long openTransaction(long timeoutMs) throws org.apache.thrift.TException - { - send_openTransaction(timeoutMs); - return recv_openTransaction(); - } - - public void send_openTransaction(long timeoutMs) throws org.apache.thrift.TException - { - openTransaction_args args = new openTransaction_args(); - args.setTimeoutMs(timeoutMs); - sendBase("openTransaction", args); - } - - public long recv_openTransaction() throws org.apache.thrift.TException - { - openTransaction_result result = new openTransaction_result(); - receiveBase(result, "openTransaction"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openTransaction failed: unknown result"); - } - - @Override - public boolean closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException - { - send_closeTransaction(transactionId, commit); - return recv_closeTransaction(); - } - - public void send_closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException - { - closeTransaction_args args = new closeTransaction_args(); - args.setTransactionId(transactionId); - args.setCommit(commit); - sendBase("closeTransaction", args); - } - - public boolean recv_closeTransaction() throws org.apache.thrift.TException - { - closeTransaction_result result = new closeTransaction_result(); - receiveBase(result, "closeTransaction"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeTransaction failed: unknown result"); - } - - @Override - public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException - { - send_closeFailedUpdate(updateId); - recv_closeFailedUpdate(); - } - - public void send_closeFailedUpdate(long updateId) throws org.apache.thrift.TException - { - closeFailedUpdate_args args = new closeFailedUpdate_args(); - args.setUpdateId(updateId); - sendBase("closeFailedUpdate", args); - } - - public void recv_closeFailedUpdate() throws org.apache.thrift.TException - { - closeFailedUpdate_result result = new closeFailedUpdate_result(); - receiveBase(result, "closeFailedUpdate"); - return; - } - - @Override - public long createColumn(java.lang.String name, ColumnSchema schema) throws org.apache.thrift.TException - { - send_createColumn(name, schema); - return recv_createColumn(); - } - - public void send_createColumn(java.lang.String name, ColumnSchema schema) throws org.apache.thrift.TException - { - createColumn_args args = new createColumn_args(); - args.setName(name); - args.setSchema(schema); - sendBase("createColumn", args); - } - - public long recv_createColumn() throws org.apache.thrift.TException - { - createColumn_result result = new createColumn_result(); - receiveBase(result, "createColumn"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createColumn failed: unknown result"); - } - - @Override - public void deleteColumn(long columnId) throws org.apache.thrift.TException - { - send_deleteColumn(columnId); - recv_deleteColumn(); - } - - public void send_deleteColumn(long columnId) throws org.apache.thrift.TException - { - deleteColumn_args args = new deleteColumn_args(); - args.setColumnId(columnId); - sendBase("deleteColumn", args); - } - - public void recv_deleteColumn() throws org.apache.thrift.TException - { - deleteColumn_result result = new deleteColumn_result(); - receiveBase(result, "deleteColumn"); - return; - } - - @Override - public long getColumnId(java.lang.String name) throws org.apache.thrift.TException - { - send_getColumnId(name); - return recv_getColumnId(); - } - - public void send_getColumnId(java.lang.String name) throws org.apache.thrift.TException - { - getColumnId_args args = new getColumnId_args(); - args.setName(name); - sendBase("getColumnId", args); - } - - public long recv_getColumnId() throws org.apache.thrift.TException - { - getColumnId_result result = new getColumnId_result(); - receiveBase(result, "getColumnId"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getColumnId failed: unknown result"); - } - - @Override - public void putFast(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - send_putFast(transactionOrUpdateId, columnId, keys, value); - } - - public void send_putFast(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - putFast_args args = new putFast_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - sendBaseOneway("putFast", args); - } - - @Override - public void put(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - send_put(transactionOrUpdateId, columnId, keys, value); - recv_put(); - } - - public void send_put(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - put_args args = new put_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - sendBase("put", args); - } - - public void recv_put() throws org.apache.thrift.TException - { - put_result result = new put_result(); - receiveBase(result, "put"); - return; - } - - @Override - public void putMulti(long transactionOrUpdateId, long columnId, java.util.List> keysMulti, java.util.List valueMulti) throws org.apache.thrift.TException - { - send_putMulti(transactionOrUpdateId, columnId, keysMulti, valueMulti); - recv_putMulti(); - } - - public void send_putMulti(long transactionOrUpdateId, long columnId, java.util.List> keysMulti, java.util.List valueMulti) throws org.apache.thrift.TException - { - putMulti_args args = new putMulti_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeysMulti(keysMulti); - args.setValueMulti(valueMulti); - sendBase("putMulti", args); - } - - public void recv_putMulti() throws org.apache.thrift.TException - { - putMulti_result result = new putMulti_result(); - receiveBase(result, "putMulti"); - return; - } - - @Override - public OptionalBinary putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - send_putGetPrevious(transactionOrUpdateId, columnId, keys, value); - return recv_putGetPrevious(); - } - - public void send_putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - putGetPrevious_args args = new putGetPrevious_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - sendBase("putGetPrevious", args); - } - - public OptionalBinary recv_putGetPrevious() throws org.apache.thrift.TException - { - putGetPrevious_result result = new putGetPrevious_result(); - receiveBase(result, "putGetPrevious"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetPrevious failed: unknown result"); - } - - @Override - public Delta putGetDelta(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - send_putGetDelta(transactionOrUpdateId, columnId, keys, value); - return recv_putGetDelta(); - } - - public void send_putGetDelta(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - putGetDelta_args args = new putGetDelta_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - sendBase("putGetDelta", args); - } - - public Delta recv_putGetDelta() throws org.apache.thrift.TException - { - putGetDelta_result result = new putGetDelta_result(); - receiveBase(result, "putGetDelta"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetDelta failed: unknown result"); - } - - @Override - public boolean putGetChanged(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - send_putGetChanged(transactionOrUpdateId, columnId, keys, value); - return recv_putGetChanged(); - } - - public void send_putGetChanged(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - putGetChanged_args args = new putGetChanged_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - sendBase("putGetChanged", args); - } - - public boolean recv_putGetChanged() throws org.apache.thrift.TException - { - putGetChanged_result result = new putGetChanged_result(); - receiveBase(result, "putGetChanged"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetChanged failed: unknown result"); - } - - @Override - public boolean putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - send_putGetPreviousPresence(transactionOrUpdateId, columnId, keys, value); - return recv_putGetPreviousPresence(); - } - - public void send_putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException - { - putGetPreviousPresence_args args = new putGetPreviousPresence_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - sendBase("putGetPreviousPresence", args); - } - - public boolean recv_putGetPreviousPresence() throws org.apache.thrift.TException - { - putGetPreviousPresence_result result = new putGetPreviousPresence_result(); - receiveBase(result, "putGetPreviousPresence"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetPreviousPresence failed: unknown result"); - } - - @Override - public OptionalBinary get(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException - { - send_get(transactionOrUpdateId, columnId, keys); - return recv_get(); - } - - public void send_get(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException - { - get_args args = new get_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - sendBase("get", args); - } - - public OptionalBinary recv_get() throws org.apache.thrift.TException - { - get_result result = new get_result(); - receiveBase(result, "get"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result"); - } - - @Override - public UpdateBegin getForUpdate(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException - { - send_getForUpdate(transactionOrUpdateId, columnId, keys); - return recv_getForUpdate(); - } - - public void send_getForUpdate(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException - { - getForUpdate_args args = new getForUpdate_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - sendBase("getForUpdate", args); - } - - public UpdateBegin recv_getForUpdate() throws org.apache.thrift.TException - { - getForUpdate_result result = new getForUpdate_result(); - receiveBase(result, "getForUpdate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getForUpdate failed: unknown result"); - } - - @Override - public boolean exists(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException - { - send_exists(transactionOrUpdateId, columnId, keys); - return recv_exists(); - } - - public void send_exists(long transactionOrUpdateId, long columnId, java.util.List keys) throws org.apache.thrift.TException - { - exists_args args = new exists_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - sendBase("exists", args); - } - - public boolean recv_exists() throws org.apache.thrift.TException - { - exists_result result = new exists_result(); - receiveBase(result, "exists"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exists failed: unknown result"); - } - - @Override - public long openIterator(long transactionId, long columnId, java.util.List startKeysInclusive, java.util.List endKeysExclusive, boolean reverse, long timeoutMs) throws org.apache.thrift.TException - { - send_openIterator(transactionId, columnId, startKeysInclusive, endKeysExclusive, reverse, timeoutMs); - return recv_openIterator(); - } - - public void send_openIterator(long transactionId, long columnId, java.util.List startKeysInclusive, java.util.List endKeysExclusive, boolean reverse, long timeoutMs) throws org.apache.thrift.TException - { - openIterator_args args = new openIterator_args(); - args.setTransactionId(transactionId); - args.setColumnId(columnId); - args.setStartKeysInclusive(startKeysInclusive); - args.setEndKeysExclusive(endKeysExclusive); - args.setReverse(reverse); - args.setTimeoutMs(timeoutMs); - sendBase("openIterator", args); - } - - public long recv_openIterator() throws org.apache.thrift.TException - { - openIterator_result result = new openIterator_result(); - receiveBase(result, "openIterator"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openIterator failed: unknown result"); - } - - @Override - public void closeIterator(long iteratorId) throws org.apache.thrift.TException - { - send_closeIterator(iteratorId); - recv_closeIterator(); - } - - public void send_closeIterator(long iteratorId) throws org.apache.thrift.TException - { - closeIterator_args args = new closeIterator_args(); - args.setIteratorId(iteratorId); - sendBase("closeIterator", args); - } - - public void recv_closeIterator() throws org.apache.thrift.TException - { - closeIterator_result result = new closeIterator_result(); - receiveBase(result, "closeIterator"); - return; - } - - @Override - public void seekTo(long iterationId, java.util.List keys) throws org.apache.thrift.TException - { - send_seekTo(iterationId, keys); - recv_seekTo(); - } - - public void send_seekTo(long iterationId, java.util.List keys) throws org.apache.thrift.TException - { - seekTo_args args = new seekTo_args(); - args.setIterationId(iterationId); - args.setKeys(keys); - sendBase("seekTo", args); - } - - public void recv_seekTo() throws org.apache.thrift.TException - { - seekTo_result result = new seekTo_result(); - receiveBase(result, "seekTo"); - return; - } - - @Override - public void subsequent(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException - { - send_subsequent(iterationId, skipCount, takeCount); - recv_subsequent(); - } - - public void send_subsequent(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException - { - subsequent_args args = new subsequent_args(); - args.setIterationId(iterationId); - args.setSkipCount(skipCount); - args.setTakeCount(takeCount); - sendBase("subsequent", args); - } - - public void recv_subsequent() throws org.apache.thrift.TException - { - subsequent_result result = new subsequent_result(); - receiveBase(result, "subsequent"); - return; - } - - @Override - public boolean subsequentExists(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException - { - send_subsequentExists(iterationId, skipCount, takeCount); - return recv_subsequentExists(); - } - - public void send_subsequentExists(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException - { - subsequentExists_args args = new subsequentExists_args(); - args.setIterationId(iterationId); - args.setSkipCount(skipCount); - args.setTakeCount(takeCount); - sendBase("subsequentExists", args); - } - - public boolean recv_subsequentExists() throws org.apache.thrift.TException - { - subsequentExists_result result = new subsequentExists_result(); - receiveBase(result, "subsequentExists"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "subsequentExists failed: unknown result"); - } - - @Override - public java.util.List subsequentMultiGet(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException - { - send_subsequentMultiGet(iterationId, skipCount, takeCount); - return recv_subsequentMultiGet(); - } - - public void send_subsequentMultiGet(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException - { - subsequentMultiGet_args args = new subsequentMultiGet_args(); - args.setIterationId(iterationId); - args.setSkipCount(skipCount); - args.setTakeCount(takeCount); - sendBase("subsequentMultiGet", args); - } - - public java.util.List recv_subsequentMultiGet() throws org.apache.thrift.TException - { - subsequentMultiGet_result result = new subsequentMultiGet_result(); - receiveBase(result, "subsequentMultiGet"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "subsequentMultiGet failed: unknown result"); - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { - private org.apache.thrift.async.TAsyncClientManager clientManager; - private org.apache.thrift.protocol.TProtocolFactory protocolFactory; - public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - @Override - public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); - } - - @Override - public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - openTransaction_call method_call = new openTransaction_call(timeoutMs, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class openTransaction_call extends org.apache.thrift.async.TAsyncMethodCall { - private long timeoutMs; - public openTransaction_call(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.timeoutMs = timeoutMs; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0)); - openTransaction_args args = new openTransaction_args(); - args.setTimeoutMs(timeoutMs); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Long getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_openTransaction(); - } - } - - @Override - public void closeTransaction(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeTransaction_call method_call = new closeTransaction_call(transactionId, commit, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeTransaction_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionId; - private boolean commit; - public closeTransaction_call(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionId = transactionId; - this.commit = commit; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeTransaction_args args = new closeTransaction_args(); - args.setTransactionId(transactionId); - args.setCommit(commit); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_closeTransaction(); - } - } - - @Override - public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeFailedUpdate_call method_call = new closeFailedUpdate_call(updateId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeFailedUpdate_call extends org.apache.thrift.async.TAsyncMethodCall { - private long updateId; - public closeFailedUpdate_call(long updateId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.updateId = updateId; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeFailedUpdate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeFailedUpdate_args args = new closeFailedUpdate_args(); - args.setUpdateId(updateId); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_closeFailedUpdate(); - return null; - } - } - - @Override - public void createColumn(java.lang.String name, ColumnSchema schema, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createColumn_call method_call = new createColumn_call(name, schema, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createColumn_call extends org.apache.thrift.async.TAsyncMethodCall { - private java.lang.String name; - private ColumnSchema schema; - public createColumn_call(java.lang.String name, ColumnSchema schema, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - this.schema = schema; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createColumn", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createColumn_args args = new createColumn_args(); - args.setName(name); - args.setSchema(schema); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Long getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createColumn(); - } - } - - @Override - public void deleteColumn(long columnId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteColumn_call method_call = new deleteColumn_call(columnId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteColumn_call extends org.apache.thrift.async.TAsyncMethodCall { - private long columnId; - public deleteColumn_call(long columnId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.columnId = columnId; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteColumn", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteColumn_args args = new deleteColumn_args(); - args.setColumnId(columnId); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_deleteColumn(); - return null; - } - } - - @Override - public void getColumnId(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getColumnId_call method_call = new getColumnId_call(name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getColumnId_call extends org.apache.thrift.async.TAsyncMethodCall { - private java.lang.String name; - public getColumnId_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getColumnId", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getColumnId_args args = new getColumnId_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Long getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getColumnId(); - } - } - - @Override - public void putFast(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - putFast_call method_call = new putFast_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class putFast_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - private java.nio.ByteBuffer value; - public putFast_call(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, true); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - this.value = value; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putFast", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); - putFast_args args = new putFast_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return null; - } - } - - @Override - public void put(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - put_call method_call = new put_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class put_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - private java.nio.ByteBuffer value; - public put_call(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - this.value = value; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("put", org.apache.thrift.protocol.TMessageType.CALL, 0)); - put_args args = new put_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_put(); - return null; - } - } - - @Override - public void putMulti(long transactionOrUpdateId, long columnId, java.util.List> keysMulti, java.util.List valueMulti, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - putMulti_call method_call = new putMulti_call(transactionOrUpdateId, columnId, keysMulti, valueMulti, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class putMulti_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List> keysMulti; - private java.util.List valueMulti; - public putMulti_call(long transactionOrUpdateId, long columnId, java.util.List> keysMulti, java.util.List valueMulti, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keysMulti = keysMulti; - this.valueMulti = valueMulti; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putMulti", org.apache.thrift.protocol.TMessageType.CALL, 0)); - putMulti_args args = new putMulti_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeysMulti(keysMulti); - args.setValueMulti(valueMulti); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_putMulti(); - return null; - } - } - - @Override - public void putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - putGetPrevious_call method_call = new putGetPrevious_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class putGetPrevious_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - private java.nio.ByteBuffer value; - public putGetPrevious_call(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - this.value = value; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetPrevious", org.apache.thrift.protocol.TMessageType.CALL, 0)); - putGetPrevious_args args = new putGetPrevious_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public OptionalBinary getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_putGetPrevious(); - } - } - - @Override - public void putGetDelta(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - putGetDelta_call method_call = new putGetDelta_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class putGetDelta_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - private java.nio.ByteBuffer value; - public putGetDelta_call(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - this.value = value; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetDelta", org.apache.thrift.protocol.TMessageType.CALL, 0)); - putGetDelta_args args = new putGetDelta_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Delta getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_putGetDelta(); - } - } - - @Override - public void putGetChanged(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - putGetChanged_call method_call = new putGetChanged_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class putGetChanged_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - private java.nio.ByteBuffer value; - public putGetChanged_call(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - this.value = value; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetChanged", org.apache.thrift.protocol.TMessageType.CALL, 0)); - putGetChanged_args args = new putGetChanged_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_putGetChanged(); - } - } - - @Override - public void putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - putGetPreviousPresence_call method_call = new putGetPreviousPresence_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class putGetPreviousPresence_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - private java.nio.ByteBuffer value; - public putGetPreviousPresence_call(long transactionOrUpdateId, long columnId, java.util.List keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - this.value = value; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetPreviousPresence", org.apache.thrift.protocol.TMessageType.CALL, 0)); - putGetPreviousPresence_args args = new putGetPreviousPresence_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_putGetPreviousPresence(); - } - } - - @Override - public void get(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_call method_call = new get_call(transactionOrUpdateId, columnId, keys, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - public get_call(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_args args = new get_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public OptionalBinary getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get(); - } - } - - @Override - public void getForUpdate(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getForUpdate_call method_call = new getForUpdate_call(transactionOrUpdateId, columnId, keys, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getForUpdate_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - public getForUpdate_call(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getForUpdate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getForUpdate_args args = new getForUpdate_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public UpdateBegin getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getForUpdate(); - } - } - - @Override - public void exists(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - exists_call method_call = new exists_call(transactionOrUpdateId, columnId, keys, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionOrUpdateId; - private long columnId; - private java.util.List keys; - public exists_call(long transactionOrUpdateId, long columnId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionOrUpdateId = transactionOrUpdateId; - this.columnId = columnId; - this.keys = keys; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exists", org.apache.thrift.protocol.TMessageType.CALL, 0)); - exists_args args = new exists_args(); - args.setTransactionOrUpdateId(transactionOrUpdateId); - args.setColumnId(columnId); - args.setKeys(keys); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_exists(); - } - } - - @Override - public void openIterator(long transactionId, long columnId, java.util.List startKeysInclusive, java.util.List endKeysExclusive, boolean reverse, long timeoutMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - openIterator_call method_call = new openIterator_call(transactionId, columnId, startKeysInclusive, endKeysExclusive, reverse, timeoutMs, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class openIterator_call extends org.apache.thrift.async.TAsyncMethodCall { - private long transactionId; - private long columnId; - private java.util.List startKeysInclusive; - private java.util.List endKeysExclusive; - private boolean reverse; - private long timeoutMs; - public openIterator_call(long transactionId, long columnId, java.util.List startKeysInclusive, java.util.List endKeysExclusive, boolean reverse, long timeoutMs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.transactionId = transactionId; - this.columnId = columnId; - this.startKeysInclusive = startKeysInclusive; - this.endKeysExclusive = endKeysExclusive; - this.reverse = reverse; - this.timeoutMs = timeoutMs; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openIterator", org.apache.thrift.protocol.TMessageType.CALL, 0)); - openIterator_args args = new openIterator_args(); - args.setTransactionId(transactionId); - args.setColumnId(columnId); - args.setStartKeysInclusive(startKeysInclusive); - args.setEndKeysExclusive(endKeysExclusive); - args.setReverse(reverse); - args.setTimeoutMs(timeoutMs); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Long getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_openIterator(); - } - } - - @Override - public void closeIterator(long iteratorId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeIterator_call method_call = new closeIterator_call(iteratorId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeIterator_call extends org.apache.thrift.async.TAsyncMethodCall { - private long iteratorId; - public closeIterator_call(long iteratorId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.iteratorId = iteratorId; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeIterator", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeIterator_args args = new closeIterator_args(); - args.setIteratorId(iteratorId); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_closeIterator(); - return null; - } - } - - @Override - public void seekTo(long iterationId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - seekTo_call method_call = new seekTo_call(iterationId, keys, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class seekTo_call extends org.apache.thrift.async.TAsyncMethodCall { - private long iterationId; - private java.util.List keys; - public seekTo_call(long iterationId, java.util.List keys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.iterationId = iterationId; - this.keys = keys; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("seekTo", org.apache.thrift.protocol.TMessageType.CALL, 0)); - seekTo_args args = new seekTo_args(); - args.setIterationId(iterationId); - args.setKeys(keys); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_seekTo(); - return null; - } - } - - @Override - public void subsequent(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - subsequent_call method_call = new subsequent_call(iterationId, skipCount, takeCount, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class subsequent_call extends org.apache.thrift.async.TAsyncMethodCall { - private long iterationId; - private long skipCount; - private long takeCount; - public subsequent_call(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.iterationId = iterationId; - this.skipCount = skipCount; - this.takeCount = takeCount; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("subsequent", org.apache.thrift.protocol.TMessageType.CALL, 0)); - subsequent_args args = new subsequent_args(); - args.setIterationId(iterationId); - args.setSkipCount(skipCount); - args.setTakeCount(takeCount); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_subsequent(); - return null; - } - } - - @Override - public void subsequentExists(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - subsequentExists_call method_call = new subsequentExists_call(iterationId, skipCount, takeCount, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class subsequentExists_call extends org.apache.thrift.async.TAsyncMethodCall { - private long iterationId; - private long skipCount; - private long takeCount; - public subsequentExists_call(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.iterationId = iterationId; - this.skipCount = skipCount; - this.takeCount = takeCount; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("subsequentExists", org.apache.thrift.protocol.TMessageType.CALL, 0)); - subsequentExists_args args = new subsequentExists_args(); - args.setIterationId(iterationId); - args.setSkipCount(skipCount); - args.setTakeCount(takeCount); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_subsequentExists(); - } - } - - @Override - public void subsequentMultiGet(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - checkReady(); - subsequentMultiGet_call method_call = new subsequentMultiGet_call(iterationId, skipCount, takeCount, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class subsequentMultiGet_call extends org.apache.thrift.async.TAsyncMethodCall> { - private long iterationId; - private long skipCount; - private long takeCount; - public subsequentMultiGet_call(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.iterationId = iterationId; - this.skipCount = skipCount; - this.takeCount = takeCount; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("subsequentMultiGet", org.apache.thrift.protocol.TMessageType.CALL, 0)); - subsequentMultiGet_args args = new subsequentMultiGet_args(); - args.setIterationId(iterationId); - args.setSkipCount(skipCount); - args.setTakeCount(takeCount); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.util.List getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_subsequentMultiGet(); - } - } - - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new java.util.HashMap>())); - } - - protected Processor(I iface, java.util.Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static java.util.Map> getProcessMap(java.util.Map> processMap) { - processMap.put("openTransaction", new openTransaction()); - processMap.put("closeTransaction", new closeTransaction()); - processMap.put("closeFailedUpdate", new closeFailedUpdate()); - processMap.put("createColumn", new createColumn()); - processMap.put("deleteColumn", new deleteColumn()); - processMap.put("getColumnId", new getColumnId()); - processMap.put("putFast", new putFast()); - processMap.put("put", new put()); - processMap.put("putMulti", new putMulti()); - processMap.put("putGetPrevious", new putGetPrevious()); - processMap.put("putGetDelta", new putGetDelta()); - processMap.put("putGetChanged", new putGetChanged()); - processMap.put("putGetPreviousPresence", new putGetPreviousPresence()); - processMap.put("get", new get()); - processMap.put("getForUpdate", new getForUpdate()); - processMap.put("exists", new exists()); - processMap.put("openIterator", new openIterator()); - processMap.put("closeIterator", new closeIterator()); - processMap.put("seekTo", new seekTo()); - processMap.put("subsequent", new subsequent()); - processMap.put("subsequentExists", new subsequentExists()); - processMap.put("subsequentMultiGet", new subsequentMultiGet()); - return processMap; - } - - public static class openTransaction extends org.apache.thrift.ProcessFunction { - public openTransaction() { - super("openTransaction"); - } - - @Override - public openTransaction_args getEmptyArgsInstance() { - return new openTransaction_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public openTransaction_result getResult(I iface, openTransaction_args args) throws org.apache.thrift.TException { - openTransaction_result result = new openTransaction_result(); - result.success = iface.openTransaction(args.timeoutMs); - result.setSuccessIsSet(true); - return result; - } - } - - public static class closeTransaction extends org.apache.thrift.ProcessFunction { - public closeTransaction() { - super("closeTransaction"); - } - - @Override - public closeTransaction_args getEmptyArgsInstance() { - return new closeTransaction_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public closeTransaction_result getResult(I iface, closeTransaction_args args) throws org.apache.thrift.TException { - closeTransaction_result result = new closeTransaction_result(); - result.success = iface.closeTransaction(args.transactionId, args.commit); - result.setSuccessIsSet(true); - return result; - } - } - - public static class closeFailedUpdate extends org.apache.thrift.ProcessFunction { - public closeFailedUpdate() { - super("closeFailedUpdate"); - } - - @Override - public closeFailedUpdate_args getEmptyArgsInstance() { - return new closeFailedUpdate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public closeFailedUpdate_result getResult(I iface, closeFailedUpdate_args args) throws org.apache.thrift.TException { - closeFailedUpdate_result result = new closeFailedUpdate_result(); - iface.closeFailedUpdate(args.updateId); - return result; - } - } - - public static class createColumn extends org.apache.thrift.ProcessFunction { - public createColumn() { - super("createColumn"); - } - - @Override - public createColumn_args getEmptyArgsInstance() { - return new createColumn_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public createColumn_result getResult(I iface, createColumn_args args) throws org.apache.thrift.TException { - createColumn_result result = new createColumn_result(); - result.success = iface.createColumn(args.name, args.schema); - result.setSuccessIsSet(true); - return result; - } - } - - public static class deleteColumn extends org.apache.thrift.ProcessFunction { - public deleteColumn() { - super("deleteColumn"); - } - - @Override - public deleteColumn_args getEmptyArgsInstance() { - return new deleteColumn_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public deleteColumn_result getResult(I iface, deleteColumn_args args) throws org.apache.thrift.TException { - deleteColumn_result result = new deleteColumn_result(); - iface.deleteColumn(args.columnId); - return result; - } - } - - public static class getColumnId extends org.apache.thrift.ProcessFunction { - public getColumnId() { - super("getColumnId"); - } - - @Override - public getColumnId_args getEmptyArgsInstance() { - return new getColumnId_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public getColumnId_result getResult(I iface, getColumnId_args args) throws org.apache.thrift.TException { - getColumnId_result result = new getColumnId_result(); - result.success = iface.getColumnId(args.name); - result.setSuccessIsSet(true); - return result; - } - } - - public static class putFast extends org.apache.thrift.ProcessFunction { - public putFast() { - super("putFast"); - } - - @Override - public putFast_args getEmptyArgsInstance() { - return new putFast_args(); - } - - @Override - protected boolean isOneway() { - return true; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public org.apache.thrift.TBase getResult(I iface, putFast_args args) throws org.apache.thrift.TException { - iface.putFast(args.transactionOrUpdateId, args.columnId, args.keys, args.value); - return null; - } - } - - public static class put extends org.apache.thrift.ProcessFunction { - public put() { - super("put"); - } - - @Override - public put_args getEmptyArgsInstance() { - return new put_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public put_result getResult(I iface, put_args args) throws org.apache.thrift.TException { - put_result result = new put_result(); - iface.put(args.transactionOrUpdateId, args.columnId, args.keys, args.value); - return result; - } - } - - public static class putMulti extends org.apache.thrift.ProcessFunction { - public putMulti() { - super("putMulti"); - } - - @Override - public putMulti_args getEmptyArgsInstance() { - return new putMulti_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public putMulti_result getResult(I iface, putMulti_args args) throws org.apache.thrift.TException { - putMulti_result result = new putMulti_result(); - iface.putMulti(args.transactionOrUpdateId, args.columnId, args.keysMulti, args.valueMulti); - return result; - } - } - - public static class putGetPrevious extends org.apache.thrift.ProcessFunction { - public putGetPrevious() { - super("putGetPrevious"); - } - - @Override - public putGetPrevious_args getEmptyArgsInstance() { - return new putGetPrevious_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public putGetPrevious_result getResult(I iface, putGetPrevious_args args) throws org.apache.thrift.TException { - putGetPrevious_result result = new putGetPrevious_result(); - result.success = iface.putGetPrevious(args.transactionOrUpdateId, args.columnId, args.keys, args.value); - return result; - } - } - - public static class putGetDelta extends org.apache.thrift.ProcessFunction { - public putGetDelta() { - super("putGetDelta"); - } - - @Override - public putGetDelta_args getEmptyArgsInstance() { - return new putGetDelta_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public putGetDelta_result getResult(I iface, putGetDelta_args args) throws org.apache.thrift.TException { - putGetDelta_result result = new putGetDelta_result(); - result.success = iface.putGetDelta(args.transactionOrUpdateId, args.columnId, args.keys, args.value); - return result; - } - } - - public static class putGetChanged extends org.apache.thrift.ProcessFunction { - public putGetChanged() { - super("putGetChanged"); - } - - @Override - public putGetChanged_args getEmptyArgsInstance() { - return new putGetChanged_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public putGetChanged_result getResult(I iface, putGetChanged_args args) throws org.apache.thrift.TException { - putGetChanged_result result = new putGetChanged_result(); - result.success = iface.putGetChanged(args.transactionOrUpdateId, args.columnId, args.keys, args.value); - result.setSuccessIsSet(true); - return result; - } - } - - public static class putGetPreviousPresence extends org.apache.thrift.ProcessFunction { - public putGetPreviousPresence() { - super("putGetPreviousPresence"); - } - - @Override - public putGetPreviousPresence_args getEmptyArgsInstance() { - return new putGetPreviousPresence_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public putGetPreviousPresence_result getResult(I iface, putGetPreviousPresence_args args) throws org.apache.thrift.TException { - putGetPreviousPresence_result result = new putGetPreviousPresence_result(); - result.success = iface.putGetPreviousPresence(args.transactionOrUpdateId, args.columnId, args.keys, args.value); - result.setSuccessIsSet(true); - return result; - } - } - - public static class get extends org.apache.thrift.ProcessFunction { - public get() { - super("get"); - } - - @Override - public get_args getEmptyArgsInstance() { - return new get_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException { - get_result result = new get_result(); - result.success = iface.get(args.transactionOrUpdateId, args.columnId, args.keys); - return result; - } - } - - public static class getForUpdate extends org.apache.thrift.ProcessFunction { - public getForUpdate() { - super("getForUpdate"); - } - - @Override - public getForUpdate_args getEmptyArgsInstance() { - return new getForUpdate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public getForUpdate_result getResult(I iface, getForUpdate_args args) throws org.apache.thrift.TException { - getForUpdate_result result = new getForUpdate_result(); - result.success = iface.getForUpdate(args.transactionOrUpdateId, args.columnId, args.keys); - return result; - } - } - - public static class exists extends org.apache.thrift.ProcessFunction { - public exists() { - super("exists"); - } - - @Override - public exists_args getEmptyArgsInstance() { - return new exists_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException { - exists_result result = new exists_result(); - result.success = iface.exists(args.transactionOrUpdateId, args.columnId, args.keys); - result.setSuccessIsSet(true); - return result; - } - } - - public static class openIterator extends org.apache.thrift.ProcessFunction { - public openIterator() { - super("openIterator"); - } - - @Override - public openIterator_args getEmptyArgsInstance() { - return new openIterator_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public openIterator_result getResult(I iface, openIterator_args args) throws org.apache.thrift.TException { - openIterator_result result = new openIterator_result(); - result.success = iface.openIterator(args.transactionId, args.columnId, args.startKeysInclusive, args.endKeysExclusive, args.reverse, args.timeoutMs); - result.setSuccessIsSet(true); - return result; - } - } - - public static class closeIterator extends org.apache.thrift.ProcessFunction { - public closeIterator() { - super("closeIterator"); - } - - @Override - public closeIterator_args getEmptyArgsInstance() { - return new closeIterator_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public closeIterator_result getResult(I iface, closeIterator_args args) throws org.apache.thrift.TException { - closeIterator_result result = new closeIterator_result(); - iface.closeIterator(args.iteratorId); - return result; - } - } - - public static class seekTo extends org.apache.thrift.ProcessFunction { - public seekTo() { - super("seekTo"); - } - - @Override - public seekTo_args getEmptyArgsInstance() { - return new seekTo_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public seekTo_result getResult(I iface, seekTo_args args) throws org.apache.thrift.TException { - seekTo_result result = new seekTo_result(); - iface.seekTo(args.iterationId, args.keys); - return result; - } - } - - public static class subsequent extends org.apache.thrift.ProcessFunction { - public subsequent() { - super("subsequent"); - } - - @Override - public subsequent_args getEmptyArgsInstance() { - return new subsequent_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public subsequent_result getResult(I iface, subsequent_args args) throws org.apache.thrift.TException { - subsequent_result result = new subsequent_result(); - iface.subsequent(args.iterationId, args.skipCount, args.takeCount); - return result; - } - } - - public static class subsequentExists extends org.apache.thrift.ProcessFunction { - public subsequentExists() { - super("subsequentExists"); - } - - @Override - public subsequentExists_args getEmptyArgsInstance() { - return new subsequentExists_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public subsequentExists_result getResult(I iface, subsequentExists_args args) throws org.apache.thrift.TException { - subsequentExists_result result = new subsequentExists_result(); - result.success = iface.subsequentExists(args.iterationId, args.skipCount, args.takeCount); - result.setSuccessIsSet(true); - return result; - } - } - - public static class subsequentMultiGet extends org.apache.thrift.ProcessFunction { - public subsequentMultiGet() { - super("subsequentMultiGet"); - } - - @Override - public subsequentMultiGet_args getEmptyArgsInstance() { - return new subsequentMultiGet_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public subsequentMultiGet_result getResult(I iface, subsequentMultiGet_args args) throws org.apache.thrift.TException { - subsequentMultiGet_result result = new subsequentMultiGet_result(); - result.success = iface.subsequentMultiGet(args.iterationId, args.skipCount, args.takeCount); - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new java.util.HashMap>())); - } - - protected AsyncProcessor(I iface, java.util.Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static java.util.Map> getProcessMap(java.util.Map> processMap) { - processMap.put("openTransaction", new openTransaction()); - processMap.put("closeTransaction", new closeTransaction()); - processMap.put("closeFailedUpdate", new closeFailedUpdate()); - processMap.put("createColumn", new createColumn()); - processMap.put("deleteColumn", new deleteColumn()); - processMap.put("getColumnId", new getColumnId()); - processMap.put("putFast", new putFast()); - processMap.put("put", new put()); - processMap.put("putMulti", new putMulti()); - processMap.put("putGetPrevious", new putGetPrevious()); - processMap.put("putGetDelta", new putGetDelta()); - processMap.put("putGetChanged", new putGetChanged()); - processMap.put("putGetPreviousPresence", new putGetPreviousPresence()); - processMap.put("get", new get()); - processMap.put("getForUpdate", new getForUpdate()); - processMap.put("exists", new exists()); - processMap.put("openIterator", new openIterator()); - processMap.put("closeIterator", new closeIterator()); - processMap.put("seekTo", new seekTo()); - processMap.put("subsequent", new subsequent()); - processMap.put("subsequentExists", new subsequentExists()); - processMap.put("subsequentMultiGet", new subsequentMultiGet()); - return processMap; - } - - public static class openTransaction extends org.apache.thrift.AsyncProcessFunction { - public openTransaction() { - super("openTransaction"); - } - - @Override - public openTransaction_args getEmptyArgsInstance() { - return new openTransaction_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Long o) { - openTransaction_result result = new openTransaction_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - openTransaction_result result = new openTransaction_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, openTransaction_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.openTransaction(args.timeoutMs,resultHandler); - } - } - - public static class closeTransaction extends org.apache.thrift.AsyncProcessFunction { - public closeTransaction() { - super("closeTransaction"); - } - - @Override - public closeTransaction_args getEmptyArgsInstance() { - return new closeTransaction_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Boolean o) { - closeTransaction_result result = new closeTransaction_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - closeTransaction_result result = new closeTransaction_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, closeTransaction_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.closeTransaction(args.transactionId, args.commit,resultHandler); - } - } - - public static class closeFailedUpdate extends org.apache.thrift.AsyncProcessFunction { - public closeFailedUpdate() { - super("closeFailedUpdate"); - } - - @Override - public closeFailedUpdate_args getEmptyArgsInstance() { - return new closeFailedUpdate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - closeFailedUpdate_result result = new closeFailedUpdate_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - closeFailedUpdate_result result = new closeFailedUpdate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, closeFailedUpdate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.closeFailedUpdate(args.updateId,resultHandler); - } - } - - public static class createColumn extends org.apache.thrift.AsyncProcessFunction { - public createColumn() { - super("createColumn"); - } - - @Override - public createColumn_args getEmptyArgsInstance() { - return new createColumn_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Long o) { - createColumn_result result = new createColumn_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - createColumn_result result = new createColumn_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, createColumn_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.createColumn(args.name, args.schema,resultHandler); - } - } - - public static class deleteColumn extends org.apache.thrift.AsyncProcessFunction { - public deleteColumn() { - super("deleteColumn"); - } - - @Override - public deleteColumn_args getEmptyArgsInstance() { - return new deleteColumn_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - deleteColumn_result result = new deleteColumn_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - deleteColumn_result result = new deleteColumn_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, deleteColumn_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.deleteColumn(args.columnId,resultHandler); - } - } - - public static class getColumnId extends org.apache.thrift.AsyncProcessFunction { - public getColumnId() { - super("getColumnId"); - } - - @Override - public getColumnId_args getEmptyArgsInstance() { - return new getColumnId_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Long o) { - getColumnId_result result = new getColumnId_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getColumnId_result result = new getColumnId_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, getColumnId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getColumnId(args.name,resultHandler); - } - } - - public static class putFast extends org.apache.thrift.AsyncProcessFunction { - public putFast() { - super("putFast"); - } - - @Override - public putFast_args getEmptyArgsInstance() { - return new putFast_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - } - @Override - public void onError(java.lang.Exception e) { - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - } else { - _LOGGER.error("Exception inside oneway handler", e); - } - } - }; - } - - @Override - protected boolean isOneway() { - return true; - } - - @Override - public void start(I iface, putFast_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.putFast(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler); - } - } - - public static class put extends org.apache.thrift.AsyncProcessFunction { - public put() { - super("put"); - } - - @Override - public put_args getEmptyArgsInstance() { - return new put_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - put_result result = new put_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - put_result result = new put_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, put_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.put(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler); - } - } - - public static class putMulti extends org.apache.thrift.AsyncProcessFunction { - public putMulti() { - super("putMulti"); - } - - @Override - public putMulti_args getEmptyArgsInstance() { - return new putMulti_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - putMulti_result result = new putMulti_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - putMulti_result result = new putMulti_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, putMulti_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.putMulti(args.transactionOrUpdateId, args.columnId, args.keysMulti, args.valueMulti,resultHandler); - } - } - - public static class putGetPrevious extends org.apache.thrift.AsyncProcessFunction { - public putGetPrevious() { - super("putGetPrevious"); - } - - @Override - public putGetPrevious_args getEmptyArgsInstance() { - return new putGetPrevious_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(OptionalBinary o) { - putGetPrevious_result result = new putGetPrevious_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - putGetPrevious_result result = new putGetPrevious_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, putGetPrevious_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.putGetPrevious(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler); - } - } - - public static class putGetDelta extends org.apache.thrift.AsyncProcessFunction { - public putGetDelta() { - super("putGetDelta"); - } - - @Override - public putGetDelta_args getEmptyArgsInstance() { - return new putGetDelta_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Delta o) { - putGetDelta_result result = new putGetDelta_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - putGetDelta_result result = new putGetDelta_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, putGetDelta_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.putGetDelta(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler); - } - } - - public static class putGetChanged extends org.apache.thrift.AsyncProcessFunction { - public putGetChanged() { - super("putGetChanged"); - } - - @Override - public putGetChanged_args getEmptyArgsInstance() { - return new putGetChanged_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Boolean o) { - putGetChanged_result result = new putGetChanged_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - putGetChanged_result result = new putGetChanged_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, putGetChanged_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.putGetChanged(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler); - } - } - - public static class putGetPreviousPresence extends org.apache.thrift.AsyncProcessFunction { - public putGetPreviousPresence() { - super("putGetPreviousPresence"); - } - - @Override - public putGetPreviousPresence_args getEmptyArgsInstance() { - return new putGetPreviousPresence_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Boolean o) { - putGetPreviousPresence_result result = new putGetPreviousPresence_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - putGetPreviousPresence_result result = new putGetPreviousPresence_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, putGetPreviousPresence_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.putGetPreviousPresence(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler); - } - } - - public static class get extends org.apache.thrift.AsyncProcessFunction { - public get() { - super("get"); - } - - @Override - public get_args getEmptyArgsInstance() { - return new get_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(OptionalBinary o) { - get_result result = new get_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - get_result result = new get_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, get_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.get(args.transactionOrUpdateId, args.columnId, args.keys,resultHandler); - } - } - - public static class getForUpdate extends org.apache.thrift.AsyncProcessFunction { - public getForUpdate() { - super("getForUpdate"); - } - - @Override - public getForUpdate_args getEmptyArgsInstance() { - return new getForUpdate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(UpdateBegin o) { - getForUpdate_result result = new getForUpdate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getForUpdate_result result = new getForUpdate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, getForUpdate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getForUpdate(args.transactionOrUpdateId, args.columnId, args.keys,resultHandler); - } - } - - public static class exists extends org.apache.thrift.AsyncProcessFunction { - public exists() { - super("exists"); - } - - @Override - public exists_args getEmptyArgsInstance() { - return new exists_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Boolean o) { - exists_result result = new exists_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - exists_result result = new exists_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.exists(args.transactionOrUpdateId, args.columnId, args.keys,resultHandler); - } - } - - public static class openIterator extends org.apache.thrift.AsyncProcessFunction { - public openIterator() { - super("openIterator"); - } - - @Override - public openIterator_args getEmptyArgsInstance() { - return new openIterator_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Long o) { - openIterator_result result = new openIterator_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - openIterator_result result = new openIterator_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, openIterator_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.openIterator(args.transactionId, args.columnId, args.startKeysInclusive, args.endKeysExclusive, args.reverse, args.timeoutMs,resultHandler); - } - } - - public static class closeIterator extends org.apache.thrift.AsyncProcessFunction { - public closeIterator() { - super("closeIterator"); - } - - @Override - public closeIterator_args getEmptyArgsInstance() { - return new closeIterator_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - closeIterator_result result = new closeIterator_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - closeIterator_result result = new closeIterator_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, closeIterator_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.closeIterator(args.iteratorId,resultHandler); - } - } - - public static class seekTo extends org.apache.thrift.AsyncProcessFunction { - public seekTo() { - super("seekTo"); - } - - @Override - public seekTo_args getEmptyArgsInstance() { - return new seekTo_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - seekTo_result result = new seekTo_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - seekTo_result result = new seekTo_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, seekTo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.seekTo(args.iterationId, args.keys,resultHandler); - } - } - - public static class subsequent extends org.apache.thrift.AsyncProcessFunction { - public subsequent() { - super("subsequent"); - } - - @Override - public subsequent_args getEmptyArgsInstance() { - return new subsequent_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(Void o) { - subsequent_result result = new subsequent_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - subsequent_result result = new subsequent_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, subsequent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.subsequent(args.iterationId, args.skipCount, args.takeCount,resultHandler); - } - } - - public static class subsequentExists extends org.apache.thrift.AsyncProcessFunction { - public subsequentExists() { - super("subsequentExists"); - } - - @Override - public subsequentExists_args getEmptyArgsInstance() { - return new subsequentExists_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Boolean o) { - subsequentExists_result result = new subsequentExists_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - subsequentExists_result result = new subsequentExists_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, subsequentExists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.subsequentExists(args.iterationId, args.skipCount, args.takeCount,resultHandler); - } - } - - public static class subsequentMultiGet extends org.apache.thrift.AsyncProcessFunction> { - public subsequentMultiGet() { - super("subsequentMultiGet"); - } - - @Override - public subsequentMultiGet_args getEmptyArgsInstance() { - return new subsequentMultiGet_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback>() { - @Override - public void onComplete(java.util.List o) { - subsequentMultiGet_result result = new subsequentMultiGet_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - subsequentMultiGet_result result = new subsequentMultiGet_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, subsequentMultiGet_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - iface.subsequentMultiGet(args.iterationId, args.skipCount, args.takeCount,resultHandler); - } - } - - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class openTransaction_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openTransaction_args"); - - private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openTransaction_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openTransaction_argsTupleSchemeFactory(); - - public long timeoutMs; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TIMEOUT_MS((short)1, "timeoutMs"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TIMEOUT_MS - return TIMEOUT_MS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TIMEOUTMS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openTransaction_args.class, metaDataMap); - } - - public openTransaction_args() { - } - - public openTransaction_args( - long timeoutMs) - { - this(); - this.timeoutMs = timeoutMs; - setTimeoutMsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public openTransaction_args(openTransaction_args other) { - __isset_bitfield = other.__isset_bitfield; - this.timeoutMs = other.timeoutMs; - } - - @Override - public openTransaction_args deepCopy() { - return new openTransaction_args(this); - } - - @Override - public void clear() { - setTimeoutMsIsSet(false); - this.timeoutMs = 0; - } - - public long getTimeoutMs() { - return this.timeoutMs; - } - - public openTransaction_args setTimeoutMs(long timeoutMs) { - this.timeoutMs = timeoutMs; - setTimeoutMsIsSet(true); - return this; - } - - public void unsetTimeoutMs() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID); - } - - /** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeoutMs() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID); - } - - public void setTimeoutMsIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TIMEOUT_MS: - if (value == null) { - unsetTimeoutMs(); - } else { - setTimeoutMs((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TIMEOUT_MS: - return getTimeoutMs(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TIMEOUT_MS: - return isSetTimeoutMs(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof openTransaction_args) - return this.equals((openTransaction_args)that); - return false; - } - - public boolean equals(openTransaction_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_timeoutMs = true; - boolean that_present_timeoutMs = true; - if (this_present_timeoutMs || that_present_timeoutMs) { - if (!(this_present_timeoutMs && that_present_timeoutMs)) - return false; - if (this.timeoutMs != that.timeoutMs) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs); - - return hashCode; - } - - @Override - public int compareTo(openTransaction_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeoutMs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("openTransaction_args("); - boolean first = true; - - sb.append("timeoutMs:"); - sb.append(this.timeoutMs); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class openTransaction_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openTransaction_argsStandardScheme getScheme() { - return new openTransaction_argsStandardScheme(); - } - } - - private static class openTransaction_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, openTransaction_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TIMEOUT_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeoutMs = iprot.readI64(); - struct.setTimeoutMsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTimeoutMs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, openTransaction_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC); - oprot.writeI64(struct.timeoutMs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class openTransaction_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openTransaction_argsTupleScheme getScheme() { - return new openTransaction_argsTupleScheme(); - } - } - - private static class openTransaction_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openTransaction_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.timeoutMs); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openTransaction_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.timeoutMs = iprot.readI64(); - struct.setTimeoutMsIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class openTransaction_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openTransaction_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openTransaction_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openTransaction_resultTupleSchemeFactory(); - - public long success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openTransaction_result.class, metaDataMap); - } - - public openTransaction_result() { - } - - public openTransaction_result( - long success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public openTransaction_result(openTransaction_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public openTransaction_result deepCopy() { - return new openTransaction_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - } - - public long getSuccess() { - return this.success; - } - - public openTransaction_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof openTransaction_result) - return this.equals((openTransaction_result)that); - return false; - } - - public boolean equals(openTransaction_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); - - return hashCode; - } - - @Override - public int compareTo(openTransaction_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("openTransaction_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class openTransaction_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openTransaction_resultStandardScheme getScheme() { - return new openTransaction_resultStandardScheme(); - } - } - - private static class openTransaction_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, openTransaction_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, openTransaction_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class openTransaction_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openTransaction_resultTupleScheme getScheme() { - return new openTransaction_resultTupleScheme(); - } - } - - private static class openTransaction_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openTransaction_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openTransaction_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeTransaction_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COMMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("commit", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_argsTupleSchemeFactory(); - - public long transactionId; // required - public boolean commit; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_ID((short)1, "transactionId"), - COMMIT((short)2, "commit"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_ID - return TRANSACTION_ID; - case 2: // COMMIT - return COMMIT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONID_ISSET_ID = 0; - private static final int __COMMIT_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COMMIT, new org.apache.thrift.meta_data.FieldMetaData("commit", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeTransaction_args.class, metaDataMap); - } - - public closeTransaction_args() { - } - - public closeTransaction_args( - long transactionId, - boolean commit) - { - this(); - this.transactionId = transactionId; - setTransactionIdIsSet(true); - this.commit = commit; - setCommitIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public closeTransaction_args(closeTransaction_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionId = other.transactionId; - this.commit = other.commit; - } - - @Override - public closeTransaction_args deepCopy() { - return new closeTransaction_args(this); - } - - @Override - public void clear() { - setTransactionIdIsSet(false); - this.transactionId = 0; - setCommitIsSet(false); - this.commit = false; - } - - public long getTransactionId() { - return this.transactionId; - } - - public closeTransaction_args setTransactionId(long transactionId) { - this.transactionId = transactionId; - setTransactionIdIsSet(true); - return this; - } - - public void unsetTransactionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID); - } - - /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID); - } - - public void setTransactionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID, value); - } - - public boolean isCommit() { - return this.commit; - } - - public closeTransaction_args setCommit(boolean commit) { - this.commit = commit; - setCommitIsSet(true); - return this; - } - - public void unsetCommit() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMMIT_ISSET_ID); - } - - /** Returns true if field commit is set (has been assigned a value) and false otherwise */ - public boolean isSetCommit() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMMIT_ISSET_ID); - } - - public void setCommitIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMMIT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_ID: - if (value == null) { - unsetTransactionId(); - } else { - setTransactionId((java.lang.Long)value); - } - break; - - case COMMIT: - if (value == null) { - unsetCommit(); - } else { - setCommit((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_ID: - return getTransactionId(); - - case COMMIT: - return isCommit(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_ID: - return isSetTransactionId(); - case COMMIT: - return isSetCommit(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeTransaction_args) - return this.equals((closeTransaction_args)that); - return false; - } - - public boolean equals(closeTransaction_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionId = true; - boolean that_present_transactionId = true; - if (this_present_transactionId || that_present_transactionId) { - if (!(this_present_transactionId && that_present_transactionId)) - return false; - if (this.transactionId != that.transactionId) - return false; - } - - boolean this_present_commit = true; - boolean that_present_commit = true; - if (this_present_commit || that_present_commit) { - if (!(this_present_commit && that_present_commit)) - return false; - if (this.commit != that.commit) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionId); - - hashCode = hashCode * 8191 + ((commit) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(closeTransaction_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, other.transactionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCommit(), other.isSetCommit()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCommit()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commit, other.commit); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_args("); - boolean first = true; - - sb.append("transactionId:"); - sb.append(this.transactionId); - first = false; - if (!first) sb.append(", "); - sb.append("commit:"); - sb.append(this.commit); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'commit' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeTransaction_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeTransaction_argsStandardScheme getScheme() { - return new closeTransaction_argsStandardScheme(); - } - } - - private static class closeTransaction_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeTransaction_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionId = iprot.readI64(); - struct.setTransactionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COMMIT - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.commit = iprot.readBool(); - struct.setCommitIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetCommit()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'commit' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeTransaction_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC); - oprot.writeI64(struct.transactionId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COMMIT_FIELD_DESC); - oprot.writeBool(struct.commit); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeTransaction_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeTransaction_argsTupleScheme getScheme() { - return new closeTransaction_argsTupleScheme(); - } - } - - private static class closeTransaction_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionId); - oprot.writeBool(struct.commit); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionId = iprot.readI64(); - struct.setTransactionIdIsSet(true); - struct.commit = iprot.readBool(); - struct.setCommitIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeTransaction_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_resultTupleSchemeFactory(); - - public boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeTransaction_result.class, metaDataMap); - } - - public closeTransaction_result() { - } - - public closeTransaction_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public closeTransaction_result(closeTransaction_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public closeTransaction_result deepCopy() { - return new closeTransaction_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public closeTransaction_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeTransaction_result) - return this.equals((closeTransaction_result)that); - return false; - } - - public boolean equals(closeTransaction_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(closeTransaction_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeTransaction_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeTransaction_resultStandardScheme getScheme() { - return new closeTransaction_resultStandardScheme(); - } - } - - private static class closeTransaction_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeTransaction_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeTransaction_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeTransaction_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeTransaction_resultTupleScheme getScheme() { - return new closeTransaction_resultTupleScheme(); - } - } - - private static class closeTransaction_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeFailedUpdate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeFailedUpdate_args"); - - private static final org.apache.thrift.protocol.TField UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updateId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeFailedUpdate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeFailedUpdate_argsTupleSchemeFactory(); - - public long updateId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - UPDATE_ID((short)1, "updateId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // UPDATE_ID - return UPDATE_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __UPDATEID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("updateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeFailedUpdate_args.class, metaDataMap); - } - - public closeFailedUpdate_args() { - } - - public closeFailedUpdate_args( - long updateId) - { - this(); - this.updateId = updateId; - setUpdateIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public closeFailedUpdate_args(closeFailedUpdate_args other) { - __isset_bitfield = other.__isset_bitfield; - this.updateId = other.updateId; - } - - @Override - public closeFailedUpdate_args deepCopy() { - return new closeFailedUpdate_args(this); - } - - @Override - public void clear() { - setUpdateIdIsSet(false); - this.updateId = 0; - } - - public long getUpdateId() { - return this.updateId; - } - - public closeFailedUpdate_args setUpdateId(long updateId) { - this.updateId = updateId; - setUpdateIdIsSet(true); - return this; - } - - public void unsetUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEID_ISSET_ID); - } - - /** Returns true if field updateId is set (has been assigned a value) and false otherwise */ - public boolean isSetUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEID_ISSET_ID); - } - - public void setUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case UPDATE_ID: - if (value == null) { - unsetUpdateId(); - } else { - setUpdateId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case UPDATE_ID: - return getUpdateId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case UPDATE_ID: - return isSetUpdateId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeFailedUpdate_args) - return this.equals((closeFailedUpdate_args)that); - return false; - } - - public boolean equals(closeFailedUpdate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_updateId = true; - boolean that_present_updateId = true; - if (this_present_updateId || that_present_updateId) { - if (!(this_present_updateId && that_present_updateId)) - return false; - if (this.updateId != that.updateId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updateId); - - return hashCode; - } - - @Override - public int compareTo(closeFailedUpdate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetUpdateId(), other.isSetUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateId, other.updateId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeFailedUpdate_args("); - boolean first = true; - - sb.append("updateId:"); - sb.append(this.updateId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'updateId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeFailedUpdate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeFailedUpdate_argsStandardScheme getScheme() { - return new closeFailedUpdate_argsStandardScheme(); - } - } - - private static class closeFailedUpdate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeFailedUpdate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.updateId = iprot.readI64(); - struct.setUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'updateId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeFailedUpdate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.updateId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeFailedUpdate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeFailedUpdate_argsTupleScheme getScheme() { - return new closeFailedUpdate_argsTupleScheme(); - } - } - - private static class closeFailedUpdate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.updateId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.updateId = iprot.readI64(); - struct.setUpdateIdIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeFailedUpdate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeFailedUpdate_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeFailedUpdate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeFailedUpdate_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeFailedUpdate_result.class, metaDataMap); - } - - public closeFailedUpdate_result() { - } - - /** - * Performs a deep copy on other. - */ - public closeFailedUpdate_result(closeFailedUpdate_result other) { - } - - @Override - public closeFailedUpdate_result deepCopy() { - return new closeFailedUpdate_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeFailedUpdate_result) - return this.equals((closeFailedUpdate_result)that); - return false; - } - - public boolean equals(closeFailedUpdate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(closeFailedUpdate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeFailedUpdate_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeFailedUpdate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeFailedUpdate_resultStandardScheme getScheme() { - return new closeFailedUpdate_resultStandardScheme(); - } - } - - private static class closeFailedUpdate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeFailedUpdate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeFailedUpdate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeFailedUpdate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeFailedUpdate_resultTupleScheme getScheme() { - return new closeFailedUpdate_resultTupleScheme(); - } - } - - private static class closeFailedUpdate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createColumn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createColumn_args"); - - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("schema", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createColumn_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createColumn_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.lang.String name; // required - public @org.apache.thrift.annotation.Nullable ColumnSchema schema; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - SCHEMA((short)2, "schema"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // SCHEMA - return SCHEMA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("schema", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnSchema.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createColumn_args.class, metaDataMap); - } - - public createColumn_args() { - } - - public createColumn_args( - java.lang.String name, - ColumnSchema schema) - { - this(); - this.name = name; - this.schema = schema; - } - - /** - * Performs a deep copy on other. - */ - public createColumn_args(createColumn_args other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetSchema()) { - this.schema = new ColumnSchema(other.schema); - } - } - - @Override - public createColumn_args deepCopy() { - return new createColumn_args(this); - } - - @Override - public void clear() { - this.name = null; - this.schema = null; - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getName() { - return this.name; - } - - public createColumn_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - @org.apache.thrift.annotation.Nullable - public ColumnSchema getSchema() { - return this.schema; - } - - public createColumn_args setSchema(@org.apache.thrift.annotation.Nullable ColumnSchema schema) { - this.schema = schema; - return this; - } - - public void unsetSchema() { - this.schema = null; - } - - /** Returns true if field schema is set (has been assigned a value) and false otherwise */ - public boolean isSetSchema() { - return this.schema != null; - } - - public void setSchemaIsSet(boolean value) { - if (!value) { - this.schema = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((java.lang.String)value); - } - break; - - case SCHEMA: - if (value == null) { - unsetSchema(); - } else { - setSchema((ColumnSchema)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case SCHEMA: - return getSchema(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case SCHEMA: - return isSetSchema(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createColumn_args) - return this.equals((createColumn_args)that); - return false; - } - - public boolean equals(createColumn_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_schema = true && this.isSetSchema(); - boolean that_present_schema = true && that.isSetSchema(); - if (this_present_schema || that_present_schema) { - if (!(this_present_schema && that_present_schema)) - return false; - if (!this.schema.equals(that.schema)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); - if (isSetName()) - hashCode = hashCode * 8191 + name.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSchema()) ? 131071 : 524287); - if (isSetSchema()) - hashCode = hashCode * 8191 + schema.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createColumn_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSchema(), other.isSetSchema()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSchema()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createColumn_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("schema:"); - if (this.schema == null) { - sb.append("null"); - } else { - sb.append(this.schema); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (name == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); - } - if (schema == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'schema' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (schema != null) { - schema.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class createColumn_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createColumn_argsStandardScheme getScheme() { - return new createColumn_argsStandardScheme(); - } - } - - private static class createColumn_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createColumn_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SCHEMA - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.schema = new ColumnSchema(); - struct.schema.read(iprot); - struct.setSchemaIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createColumn_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.schema != null) { - oprot.writeFieldBegin(SCHEMA_FIELD_DESC); - struct.schema.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createColumn_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createColumn_argsTupleScheme getScheme() { - return new createColumn_argsTupleScheme(); - } - } - - private static class createColumn_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createColumn_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.name); - struct.schema.write(oprot); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createColumn_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.name = iprot.readString(); - struct.setNameIsSet(true); - struct.schema = new ColumnSchema(); - struct.schema.read(iprot); - struct.setSchemaIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createColumn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createColumn_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createColumn_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createColumn_resultTupleSchemeFactory(); - - public long success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createColumn_result.class, metaDataMap); - } - - public createColumn_result() { - } - - public createColumn_result( - long success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public createColumn_result(createColumn_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public createColumn_result deepCopy() { - return new createColumn_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - } - - public long getSuccess() { - return this.success; - } - - public createColumn_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createColumn_result) - return this.equals((createColumn_result)that); - return false; - } - - public boolean equals(createColumn_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); - - return hashCode; - } - - @Override - public int compareTo(createColumn_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createColumn_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class createColumn_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createColumn_resultStandardScheme getScheme() { - return new createColumn_resultStandardScheme(); - } - } - - private static class createColumn_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createColumn_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createColumn_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createColumn_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createColumn_resultTupleScheme getScheme() { - return new createColumn_resultTupleScheme(); - } - } - - private static class createColumn_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createColumn_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createColumn_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteColumn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteColumn_args"); - - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteColumn_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteColumn_argsTupleSchemeFactory(); - - public long columnId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - COLUMN_ID((short)1, "columnId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COLUMN_ID - return COLUMN_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __COLUMNID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteColumn_args.class, metaDataMap); - } - - public deleteColumn_args() { - } - - public deleteColumn_args( - long columnId) - { - this(); - this.columnId = columnId; - setColumnIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public deleteColumn_args(deleteColumn_args other) { - __isset_bitfield = other.__isset_bitfield; - this.columnId = other.columnId; - } - - @Override - public deleteColumn_args deepCopy() { - return new deleteColumn_args(this); - } - - @Override - public void clear() { - setColumnIdIsSet(false); - this.columnId = 0; - } - - public long getColumnId() { - return this.columnId; - } - - public deleteColumn_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case COLUMN_ID: - return getColumnId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case COLUMN_ID: - return isSetColumnId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteColumn_args) - return this.equals((deleteColumn_args)that); - return false; - } - - public boolean equals(deleteColumn_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - return hashCode; - } - - @Override - public int compareTo(deleteColumn_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteColumn_args("); - boolean first = true; - - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class deleteColumn_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteColumn_argsStandardScheme getScheme() { - return new deleteColumn_argsStandardScheme(); - } - } - - private static class deleteColumn_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteColumn_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteColumn_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteColumn_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteColumn_argsTupleScheme getScheme() { - return new deleteColumn_argsTupleScheme(); - } - } - - private static class deleteColumn_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteColumn_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.columnId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteColumn_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteColumn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteColumn_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteColumn_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteColumn_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteColumn_result.class, metaDataMap); - } - - public deleteColumn_result() { - } - - /** - * Performs a deep copy on other. - */ - public deleteColumn_result(deleteColumn_result other) { - } - - @Override - public deleteColumn_result deepCopy() { - return new deleteColumn_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteColumn_result) - return this.equals((deleteColumn_result)that); - return false; - } - - public boolean equals(deleteColumn_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(deleteColumn_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteColumn_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class deleteColumn_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteColumn_resultStandardScheme getScheme() { - return new deleteColumn_resultStandardScheme(); - } - } - - private static class deleteColumn_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteColumn_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteColumn_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteColumn_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteColumn_resultTupleScheme getScheme() { - return new deleteColumn_resultTupleScheme(); - } - } - - private static class deleteColumn_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteColumn_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteColumn_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getColumnId_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnId_args"); - - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getColumnId_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getColumnId_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.lang.String name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnId_args.class, metaDataMap); - } - - public getColumnId_args() { - } - - public getColumnId_args( - java.lang.String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public getColumnId_args(getColumnId_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - @Override - public getColumnId_args deepCopy() { - return new getColumnId_args(this); - } - - @Override - public void clear() { - this.name = null; - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getName() { - return this.name; - } - - public getColumnId_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getColumnId_args) - return this.equals((getColumnId_args)that); - return false; - } - - public boolean equals(getColumnId_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); - if (isSetName()) - hashCode = hashCode * 8191 + name.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getColumnId_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getColumnId_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (name == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getColumnId_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getColumnId_argsStandardScheme getScheme() { - return new getColumnId_argsStandardScheme(); - } - } - - private static class getColumnId_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnId_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getColumnId_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getColumnId_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getColumnId_argsTupleScheme getScheme() { - return new getColumnId_argsTupleScheme(); - } - } - - private static class getColumnId_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getColumnId_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.name); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getColumnId_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getColumnId_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnId_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getColumnId_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getColumnId_resultTupleSchemeFactory(); - - public long success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnId_result.class, metaDataMap); - } - - public getColumnId_result() { - } - - public getColumnId_result( - long success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public getColumnId_result(getColumnId_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public getColumnId_result deepCopy() { - return new getColumnId_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - } - - public long getSuccess() { - return this.success; - } - - public getColumnId_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getColumnId_result) - return this.equals((getColumnId_result)that); - return false; - } - - public boolean equals(getColumnId_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); - - return hashCode; - } - - @Override - public int compareTo(getColumnId_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getColumnId_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getColumnId_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getColumnId_resultStandardScheme getScheme() { - return new getColumnId_resultStandardScheme(); - } - } - - private static class getColumnId_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnId_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getColumnId_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getColumnId_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getColumnId_resultTupleScheme getScheme() { - return new getColumnId_resultTupleScheme(); - } - } - - private static class getColumnId_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getColumnId_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getColumnId_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putFast_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putFast_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putFast_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putFast_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"), - VALUE((short)4, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - case 4: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putFast_args.class, metaDataMap); - } - - public putFast_args() { - } - - public putFast_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys, - java.nio.ByteBuffer value) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - } - - /** - * Performs a deep copy on other. - */ - public putFast_args(putFast_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public putFast_args deepCopy() { - return new putFast_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - this.value = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public putFast_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public putFast_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public putFast_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public putFast_args setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public putFast_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putFast_args) - return this.equals((putFast_args)that); - return false; - } - - public boolean equals(putFast_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putFast_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putFast_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - if (value == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putFast_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putFast_argsStandardScheme getScheme() { - return new putFast_argsStandardScheme(); - } - } - - private static class putFast_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putFast_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list16.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem17; - for (int _i18 = 0; _i18 < _list16.size; ++_i18) - { - _elem17 = iprot.readBinary(); - struct.keys.add(_elem17); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putFast_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter19 : struct.keys) - { - oprot.writeBinary(_iter19); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putFast_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putFast_argsTupleScheme getScheme() { - return new putFast_argsTupleScheme(); - } - } - - private static class putFast_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putFast_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter20 : struct.keys) - { - oprot.writeBinary(_iter20); - } - } - oprot.writeBinary(struct.value); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putFast_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list21.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem22; - for (int _i23 = 0; _i23 < _list21.size; ++_i23) - { - _elem22 = iprot.readBinary(); - struct.keys.add(_elem22); - } - } - struct.setKeysIsSet(true); - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class put_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new put_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new put_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"), - VALUE((short)4, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - case 4: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap); - } - - public put_args() { - } - - public put_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys, - java.nio.ByteBuffer value) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - } - - /** - * Performs a deep copy on other. - */ - public put_args(put_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public put_args deepCopy() { - return new put_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - this.value = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public put_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public put_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public put_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public put_args setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public put_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof put_args) - return this.equals((put_args)that); - return false; - } - - public boolean equals(put_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(put_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("put_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - if (value == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class put_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public put_argsStandardScheme getScheme() { - return new put_argsStandardScheme(); - } - } - - private static class put_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list24 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list24.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem25; - for (int _i26 = 0; _i26 < _list24.size; ++_i26) - { - _elem25 = iprot.readBinary(); - struct.keys.add(_elem25); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter27 : struct.keys) - { - oprot.writeBinary(_iter27); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class put_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public put_argsTupleScheme getScheme() { - return new put_argsTupleScheme(); - } - } - - private static class put_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter28 : struct.keys) - { - oprot.writeBinary(_iter28); - } - } - oprot.writeBinary(struct.value); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list29.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem30; - for (int _i31 = 0; _i31 < _list29.size; ++_i31) - { - _elem30 = iprot.readBinary(); - struct.keys.add(_elem30); - } - } - struct.setKeysIsSet(true); - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class put_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new put_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new put_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_result.class, metaDataMap); - } - - public put_result() { - } - - /** - * Performs a deep copy on other. - */ - public put_result(put_result other) { - } - - @Override - public put_result deepCopy() { - return new put_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof put_result) - return this.equals((put_result)that); - return false; - } - - public boolean equals(put_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(put_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("put_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class put_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public put_resultStandardScheme getScheme() { - return new put_resultStandardScheme(); - } - } - - private static class put_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, put_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, put_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class put_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public put_resultTupleScheme getScheme() { - return new put_resultTupleScheme(); - } - } - - private static class put_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putMulti_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMulti_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_MULTI_FIELD_DESC = new org.apache.thrift.protocol.TField("keysMulti", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_MULTI_FIELD_DESC = new org.apache.thrift.protocol.TField("valueMulti", org.apache.thrift.protocol.TType.LIST, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putMulti_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putMulti_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List> keysMulti; // required - public @org.apache.thrift.annotation.Nullable java.util.List valueMulti; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS_MULTI((short)3, "keysMulti"), - VALUE_MULTI((short)4, "valueMulti"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS_MULTI - return KEYS_MULTI; - case 4: // VALUE_MULTI - return VALUE_MULTI; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS_MULTI, new org.apache.thrift.meta_data.FieldMetaData("keysMulti", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))))); - tmpMap.put(_Fields.VALUE_MULTI, new org.apache.thrift.meta_data.FieldMetaData("valueMulti", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMulti_args.class, metaDataMap); - } - - public putMulti_args() { - } - - public putMulti_args( - long transactionOrUpdateId, - long columnId, - java.util.List> keysMulti, - java.util.List valueMulti) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keysMulti = keysMulti; - this.valueMulti = valueMulti; - } - - /** - * Performs a deep copy on other. - */ - public putMulti_args(putMulti_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeysMulti()) { - java.util.List> __this__keysMulti = new java.util.ArrayList>(other.keysMulti.size()); - for (java.util.List other_element : other.keysMulti) { - java.util.List __this__keysMulti_copy = new java.util.ArrayList(other_element); - __this__keysMulti.add(__this__keysMulti_copy); - } - this.keysMulti = __this__keysMulti; - } - if (other.isSetValueMulti()) { - java.util.List __this__valueMulti = new java.util.ArrayList(other.valueMulti); - this.valueMulti = __this__valueMulti; - } - } - - @Override - public putMulti_args deepCopy() { - return new putMulti_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keysMulti = null; - this.valueMulti = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public putMulti_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public putMulti_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysMultiSize() { - return (this.keysMulti == null) ? 0 : this.keysMulti.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getKeysMultiIterator() { - return (this.keysMulti == null) ? null : this.keysMulti.iterator(); - } - - public void addToKeysMulti(java.util.List elem) { - if (this.keysMulti == null) { - this.keysMulti = new java.util.ArrayList>(); - } - this.keysMulti.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getKeysMulti() { - return this.keysMulti; - } - - public putMulti_args setKeysMulti(@org.apache.thrift.annotation.Nullable java.util.List> keysMulti) { - this.keysMulti = keysMulti; - return this; - } - - public void unsetKeysMulti() { - this.keysMulti = null; - } - - /** Returns true if field keysMulti is set (has been assigned a value) and false otherwise */ - public boolean isSetKeysMulti() { - return this.keysMulti != null; - } - - public void setKeysMultiIsSet(boolean value) { - if (!value) { - this.keysMulti = null; - } - } - - public int getValueMultiSize() { - return (this.valueMulti == null) ? 0 : this.valueMulti.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValueMultiIterator() { - return (this.valueMulti == null) ? null : this.valueMulti.iterator(); - } - - public void addToValueMulti(java.nio.ByteBuffer elem) { - if (this.valueMulti == null) { - this.valueMulti = new java.util.ArrayList(); - } - this.valueMulti.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValueMulti() { - return this.valueMulti; - } - - public putMulti_args setValueMulti(@org.apache.thrift.annotation.Nullable java.util.List valueMulti) { - this.valueMulti = valueMulti; - return this; - } - - public void unsetValueMulti() { - this.valueMulti = null; - } - - /** Returns true if field valueMulti is set (has been assigned a value) and false otherwise */ - public boolean isSetValueMulti() { - return this.valueMulti != null; - } - - public void setValueMultiIsSet(boolean value) { - if (!value) { - this.valueMulti = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS_MULTI: - if (value == null) { - unsetKeysMulti(); - } else { - setKeysMulti((java.util.List>)value); - } - break; - - case VALUE_MULTI: - if (value == null) { - unsetValueMulti(); - } else { - setValueMulti((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS_MULTI: - return getKeysMulti(); - - case VALUE_MULTI: - return getValueMulti(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS_MULTI: - return isSetKeysMulti(); - case VALUE_MULTI: - return isSetValueMulti(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putMulti_args) - return this.equals((putMulti_args)that); - return false; - } - - public boolean equals(putMulti_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keysMulti = true && this.isSetKeysMulti(); - boolean that_present_keysMulti = true && that.isSetKeysMulti(); - if (this_present_keysMulti || that_present_keysMulti) { - if (!(this_present_keysMulti && that_present_keysMulti)) - return false; - if (!this.keysMulti.equals(that.keysMulti)) - return false; - } - - boolean this_present_valueMulti = true && this.isSetValueMulti(); - boolean that_present_valueMulti = true && that.isSetValueMulti(); - if (this_present_valueMulti || that_present_valueMulti) { - if (!(this_present_valueMulti && that_present_valueMulti)) - return false; - if (!this.valueMulti.equals(that.valueMulti)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeysMulti()) ? 131071 : 524287); - if (isSetKeysMulti()) - hashCode = hashCode * 8191 + keysMulti.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValueMulti()) ? 131071 : 524287); - if (isSetValueMulti()) - hashCode = hashCode * 8191 + valueMulti.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putMulti_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeysMulti(), other.isSetKeysMulti()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeysMulti()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keysMulti, other.keysMulti); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValueMulti(), other.isSetValueMulti()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValueMulti()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueMulti, other.valueMulti); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putMulti_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keysMulti:"); - if (this.keysMulti == null) { - sb.append("null"); - } else { - sb.append(this.keysMulti); - } - first = false; - if (!first) sb.append(", "); - sb.append("valueMulti:"); - if (this.valueMulti == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.valueMulti, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keysMulti == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keysMulti' was not present! Struct: " + toString()); - } - if (valueMulti == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueMulti' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putMulti_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putMulti_argsStandardScheme getScheme() { - return new putMulti_argsStandardScheme(); - } - } - - private static class putMulti_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putMulti_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS_MULTI - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); - struct.keysMulti = new java.util.ArrayList>(_list32.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem33; - for (int _i34 = 0; _i34 < _list32.size; ++_i34) - { - { - org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); - _elem33 = new java.util.ArrayList(_list35.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem36; - for (int _i37 = 0; _i37 < _list35.size; ++_i37) - { - _elem36 = iprot.readBinary(); - _elem33.add(_elem36); - } - iprot.readListEnd(); - } - struct.keysMulti.add(_elem33); - } - iprot.readListEnd(); - } - struct.setKeysMultiIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE_MULTI - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list38 = iprot.readListBegin(); - struct.valueMulti = new java.util.ArrayList(_list38.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem39; - for (int _i40 = 0; _i40 < _list38.size; ++_i40) - { - _elem39 = iprot.readBinary(); - struct.valueMulti.add(_elem39); - } - iprot.readListEnd(); - } - struct.setValueMultiIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putMulti_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keysMulti != null) { - oprot.writeFieldBegin(KEYS_MULTI_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.keysMulti.size())); - for (java.util.List _iter41 : struct.keysMulti) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter41.size())); - for (java.nio.ByteBuffer _iter42 : _iter41) - { - oprot.writeBinary(_iter42); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valueMulti != null) { - oprot.writeFieldBegin(VALUE_MULTI_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueMulti.size())); - for (java.nio.ByteBuffer _iter43 : struct.valueMulti) - { - oprot.writeBinary(_iter43); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putMulti_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putMulti_argsTupleScheme getScheme() { - return new putMulti_argsTupleScheme(); - } - } - - private static class putMulti_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putMulti_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keysMulti.size()); - for (java.util.List _iter44 : struct.keysMulti) - { - { - oprot.writeI32(_iter44.size()); - for (java.nio.ByteBuffer _iter45 : _iter44) - { - oprot.writeBinary(_iter45); - } - } - } - } - { - oprot.writeI32(struct.valueMulti.size()); - for (java.nio.ByteBuffer _iter46 : struct.valueMulti) - { - oprot.writeBinary(_iter46); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putMulti_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.keysMulti = new java.util.ArrayList>(_list47.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem48; - for (int _i49 = 0; _i49 < _list47.size; ++_i49) - { - { - org.apache.thrift.protocol.TList _list50 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem48 = new java.util.ArrayList(_list50.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem51; - for (int _i52 = 0; _i52 < _list50.size; ++_i52) - { - _elem51 = iprot.readBinary(); - _elem48.add(_elem51); - } - } - struct.keysMulti.add(_elem48); - } - } - struct.setKeysMultiIsSet(true); - { - org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.valueMulti = new java.util.ArrayList(_list53.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem54; - for (int _i55 = 0; _i55 < _list53.size; ++_i55) - { - _elem54 = iprot.readBinary(); - struct.valueMulti.add(_elem54); - } - } - struct.setValueMultiIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putMulti_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMulti_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putMulti_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putMulti_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMulti_result.class, metaDataMap); - } - - public putMulti_result() { - } - - /** - * Performs a deep copy on other. - */ - public putMulti_result(putMulti_result other) { - } - - @Override - public putMulti_result deepCopy() { - return new putMulti_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putMulti_result) - return this.equals((putMulti_result)that); - return false; - } - - public boolean equals(putMulti_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(putMulti_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putMulti_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putMulti_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putMulti_resultStandardScheme getScheme() { - return new putMulti_resultStandardScheme(); - } - } - - private static class putMulti_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putMulti_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putMulti_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putMulti_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putMulti_resultTupleScheme getScheme() { - return new putMulti_resultTupleScheme(); - } - } - - private static class putMulti_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putMulti_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putMulti_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetPrevious_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPrevious_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPrevious_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPrevious_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"), - VALUE((short)4, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - case 4: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPrevious_args.class, metaDataMap); - } - - public putGetPrevious_args() { - } - - public putGetPrevious_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys, - java.nio.ByteBuffer value) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - } - - /** - * Performs a deep copy on other. - */ - public putGetPrevious_args(putGetPrevious_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public putGetPrevious_args deepCopy() { - return new putGetPrevious_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - this.value = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public putGetPrevious_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public putGetPrevious_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public putGetPrevious_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public putGetPrevious_args setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public putGetPrevious_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetPrevious_args) - return this.equals((putGetPrevious_args)that); - return false; - } - - public boolean equals(putGetPrevious_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putGetPrevious_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPrevious_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - if (value == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetPrevious_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPrevious_argsStandardScheme getScheme() { - return new putGetPrevious_argsStandardScheme(); - } - } - - private static class putGetPrevious_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPrevious_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list56 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list56.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem57; - for (int _i58 = 0; _i58 < _list56.size; ++_i58) - { - _elem57 = iprot.readBinary(); - struct.keys.add(_elem57); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPrevious_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter59 : struct.keys) - { - oprot.writeBinary(_iter59); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetPrevious_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPrevious_argsTupleScheme getScheme() { - return new putGetPrevious_argsTupleScheme(); - } - } - - private static class putGetPrevious_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter60 : struct.keys) - { - oprot.writeBinary(_iter60); - } - } - oprot.writeBinary(struct.value); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list61.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem62; - for (int _i63 = 0; _i63 < _list61.size; ++_i63) - { - _elem62 = iprot.readBinary(); - struct.keys.add(_elem62); - } - } - struct.setKeysIsSet(true); - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetPrevious_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPrevious_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPrevious_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPrevious_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable OptionalBinary success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalBinary.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPrevious_result.class, metaDataMap); - } - - public putGetPrevious_result() { - } - - public putGetPrevious_result( - OptionalBinary success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public putGetPrevious_result(putGetPrevious_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalBinary(other.success); - } - } - - @Override - public putGetPrevious_result deepCopy() { - return new putGetPrevious_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public OptionalBinary getSuccess() { - return this.success; - } - - public putGetPrevious_result setSuccess(@org.apache.thrift.annotation.Nullable OptionalBinary success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalBinary)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetPrevious_result) - return this.equals((putGetPrevious_result)that); - return false; - } - - public boolean equals(putGetPrevious_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putGetPrevious_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPrevious_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetPrevious_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPrevious_resultStandardScheme getScheme() { - return new putGetPrevious_resultStandardScheme(); - } - } - - private static class putGetPrevious_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPrevious_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalBinary(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPrevious_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetPrevious_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPrevious_resultTupleScheme getScheme() { - return new putGetPrevious_resultTupleScheme(); - } - } - - private static class putGetPrevious_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new OptionalBinary(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetDelta_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetDelta_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetDelta_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetDelta_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"), - VALUE((short)4, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - case 4: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetDelta_args.class, metaDataMap); - } - - public putGetDelta_args() { - } - - public putGetDelta_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys, - java.nio.ByteBuffer value) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - } - - /** - * Performs a deep copy on other. - */ - public putGetDelta_args(putGetDelta_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public putGetDelta_args deepCopy() { - return new putGetDelta_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - this.value = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public putGetDelta_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public putGetDelta_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public putGetDelta_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public putGetDelta_args setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public putGetDelta_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetDelta_args) - return this.equals((putGetDelta_args)that); - return false; - } - - public boolean equals(putGetDelta_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putGetDelta_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetDelta_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - if (value == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetDelta_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetDelta_argsStandardScheme getScheme() { - return new putGetDelta_argsStandardScheme(); - } - } - - private static class putGetDelta_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetDelta_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list64.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem65; - for (int _i66 = 0; _i66 < _list64.size; ++_i66) - { - _elem65 = iprot.readBinary(); - struct.keys.add(_elem65); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetDelta_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter67 : struct.keys) - { - oprot.writeBinary(_iter67); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetDelta_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetDelta_argsTupleScheme getScheme() { - return new putGetDelta_argsTupleScheme(); - } - } - - private static class putGetDelta_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetDelta_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter68 : struct.keys) - { - oprot.writeBinary(_iter68); - } - } - oprot.writeBinary(struct.value); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetDelta_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list69 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list69.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem70; - for (int _i71 = 0; _i71 < _list69.size; ++_i71) - { - _elem70 = iprot.readBinary(); - struct.keys.add(_elem70); - } - } - struct.setKeysIsSet(true); - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetDelta_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetDelta_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetDelta_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetDelta_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable Delta success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Delta.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetDelta_result.class, metaDataMap); - } - - public putGetDelta_result() { - } - - public putGetDelta_result( - Delta success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public putGetDelta_result(putGetDelta_result other) { - if (other.isSetSuccess()) { - this.success = new Delta(other.success); - } - } - - @Override - public putGetDelta_result deepCopy() { - return new putGetDelta_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public Delta getSuccess() { - return this.success; - } - - public putGetDelta_result setSuccess(@org.apache.thrift.annotation.Nullable Delta success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Delta)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetDelta_result) - return this.equals((putGetDelta_result)that); - return false; - } - - public boolean equals(putGetDelta_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putGetDelta_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetDelta_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetDelta_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetDelta_resultStandardScheme getScheme() { - return new putGetDelta_resultStandardScheme(); - } - } - - private static class putGetDelta_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetDelta_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new Delta(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetDelta_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetDelta_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetDelta_resultTupleScheme getScheme() { - return new putGetDelta_resultTupleScheme(); - } - } - - private static class putGetDelta_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetDelta_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetDelta_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new Delta(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetChanged_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetChanged_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetChanged_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetChanged_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"), - VALUE((short)4, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - case 4: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetChanged_args.class, metaDataMap); - } - - public putGetChanged_args() { - } - - public putGetChanged_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys, - java.nio.ByteBuffer value) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - } - - /** - * Performs a deep copy on other. - */ - public putGetChanged_args(putGetChanged_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public putGetChanged_args deepCopy() { - return new putGetChanged_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - this.value = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public putGetChanged_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public putGetChanged_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public putGetChanged_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public putGetChanged_args setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public putGetChanged_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetChanged_args) - return this.equals((putGetChanged_args)that); - return false; - } - - public boolean equals(putGetChanged_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putGetChanged_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetChanged_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - if (value == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetChanged_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetChanged_argsStandardScheme getScheme() { - return new putGetChanged_argsStandardScheme(); - } - } - - private static class putGetChanged_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetChanged_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list72 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list72.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem73; - for (int _i74 = 0; _i74 < _list72.size; ++_i74) - { - _elem73 = iprot.readBinary(); - struct.keys.add(_elem73); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetChanged_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter75 : struct.keys) - { - oprot.writeBinary(_iter75); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetChanged_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetChanged_argsTupleScheme getScheme() { - return new putGetChanged_argsTupleScheme(); - } - } - - private static class putGetChanged_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetChanged_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter76 : struct.keys) - { - oprot.writeBinary(_iter76); - } - } - oprot.writeBinary(struct.value); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetChanged_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list77 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list77.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem78; - for (int _i79 = 0; _i79 < _list77.size; ++_i79) - { - _elem78 = iprot.readBinary(); - struct.keys.add(_elem78); - } - } - struct.setKeysIsSet(true); - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetChanged_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetChanged_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetChanged_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetChanged_resultTupleSchemeFactory(); - - public boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetChanged_result.class, metaDataMap); - } - - public putGetChanged_result() { - } - - public putGetChanged_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public putGetChanged_result(putGetChanged_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public putGetChanged_result deepCopy() { - return new putGetChanged_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public putGetChanged_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetChanged_result) - return this.equals((putGetChanged_result)that); - return false; - } - - public boolean equals(putGetChanged_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(putGetChanged_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetChanged_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetChanged_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetChanged_resultStandardScheme getScheme() { - return new putGetChanged_resultStandardScheme(); - } - } - - private static class putGetChanged_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetChanged_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetChanged_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetChanged_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetChanged_resultTupleScheme getScheme() { - return new putGetChanged_resultTupleScheme(); - } - } - - private static class putGetChanged_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetChanged_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetChanged_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetPreviousPresence_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPreviousPresence_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPreviousPresence_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPreviousPresence_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"), - VALUE((short)4, "value"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - case 4: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPreviousPresence_args.class, metaDataMap); - } - - public putGetPreviousPresence_args() { - } - - public putGetPreviousPresence_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys, - java.nio.ByteBuffer value) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - } - - /** - * Performs a deep copy on other. - */ - public putGetPreviousPresence_args(putGetPreviousPresence_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - } - - @Override - public putGetPreviousPresence_args deepCopy() { - return new putGetPreviousPresence_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - this.value = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public putGetPreviousPresence_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public putGetPreviousPresence_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public putGetPreviousPresence_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); - } - - public java.nio.ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); - } - - public putGetPreviousPresence_args setValue(byte[] value) { - this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone()); - return this; - } - - public putGetPreviousPresence_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - if (value instanceof byte[]) { - setValue((byte[])value); - } else { - setValue((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - case VALUE: - return getValue(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - case VALUE: - return isSetValue(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetPreviousPresence_args) - return this.equals((putGetPreviousPresence_args)that); - return false; - } - - public boolean equals(putGetPreviousPresence_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); - if (isSetValue()) - hashCode = hashCode * 8191 + value.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(putGetPreviousPresence_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPreviousPresence_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - if (value == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetPreviousPresence_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPreviousPresence_argsStandardScheme getScheme() { - return new putGetPreviousPresence_argsStandardScheme(); - } - } - - private static class putGetPreviousPresence_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list80 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list80.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem81; - for (int _i82 = 0; _i82 < _list80.size; ++_i82) - { - _elem81 = iprot.readBinary(); - struct.keys.add(_elem81); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter83 : struct.keys) - { - oprot.writeBinary(_iter83); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetPreviousPresence_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPreviousPresence_argsTupleScheme getScheme() { - return new putGetPreviousPresence_argsTupleScheme(); - } - } - - private static class putGetPreviousPresence_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter84 : struct.keys) - { - oprot.writeBinary(_iter84); - } - } - oprot.writeBinary(struct.value); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list85 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list85.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem86; - for (int _i87 = 0; _i87 < _list85.size; ++_i87) - { - _elem86 = iprot.readBinary(); - struct.keys.add(_elem86); - } - } - struct.setKeysIsSet(true); - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class putGetPreviousPresence_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPreviousPresence_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPreviousPresence_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPreviousPresence_resultTupleSchemeFactory(); - - public boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPreviousPresence_result.class, metaDataMap); - } - - public putGetPreviousPresence_result() { - } - - public putGetPreviousPresence_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public putGetPreviousPresence_result(putGetPreviousPresence_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public putGetPreviousPresence_result deepCopy() { - return new putGetPreviousPresence_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public putGetPreviousPresence_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof putGetPreviousPresence_result) - return this.equals((putGetPreviousPresence_result)that); - return false; - } - - public boolean equals(putGetPreviousPresence_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(putGetPreviousPresence_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPreviousPresence_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class putGetPreviousPresence_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPreviousPresence_resultStandardScheme getScheme() { - return new putGetPreviousPresence_resultStandardScheme(); - } - } - - private static class putGetPreviousPresence_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class putGetPreviousPresence_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public putGetPreviousPresence_resultTupleScheme getScheme() { - return new putGetPreviousPresence_resultTupleScheme(); - } - } - - private static class putGetPreviousPresence_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class get_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); - } - - public get_args() { - } - - public get_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - } - - /** - * Performs a deep copy on other. - */ - public get_args(get_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - } - - @Override - public get_args deepCopy() { - return new get_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public get_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public get_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public get_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof get_args) - return this.equals((get_args)that); - return false; - } - - public boolean equals(get_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(get_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("get_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class get_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public get_argsStandardScheme getScheme() { - return new get_argsStandardScheme(); - } - } - - private static class get_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list88 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list88.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem89; - for (int _i90 = 0; _i90 < _list88.size; ++_i90) - { - _elem89 = iprot.readBinary(); - struct.keys.add(_elem89); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter91 : struct.keys) - { - oprot.writeBinary(_iter91); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public get_argsTupleScheme getScheme() { - return new get_argsTupleScheme(); - } - } - - private static class get_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter92 : struct.keys) - { - oprot.writeBinary(_iter92); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list93.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem94; - for (int _i95 = 0; _i95 < _list93.size; ++_i95) - { - _elem94 = iprot.readBinary(); - struct.keys.add(_elem94); - } - } - struct.setKeysIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class get_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable OptionalBinary success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalBinary.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); - } - - public get_result() { - } - - public get_result( - OptionalBinary success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_result(get_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalBinary(other.success); - } - } - - @Override - public get_result deepCopy() { - return new get_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public OptionalBinary getSuccess() { - return this.success; - } - - public get_result setSuccess(@org.apache.thrift.annotation.Nullable OptionalBinary success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalBinary)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof get_result) - return this.equals((get_result)that); - return false; - } - - public boolean equals(get_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(get_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("get_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class get_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public get_resultStandardScheme getScheme() { - return new get_resultStandardScheme(); - } - } - - private static class get_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalBinary(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public get_resultTupleScheme getScheme() { - return new get_resultTupleScheme(); - } - } - - private static class get_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new OptionalBinary(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getForUpdate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getForUpdate_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getForUpdate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getForUpdate_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)2, "columnId"), - KEYS((short)3, "keys"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // KEYS - return KEYS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getForUpdate_args.class, metaDataMap); - } - - public getForUpdate_args() { - } - - public getForUpdate_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - } - - /** - * Performs a deep copy on other. - */ - public getForUpdate_args(getForUpdate_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - } - - @Override - public getForUpdate_args deepCopy() { - return new getForUpdate_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public getForUpdate_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public getForUpdate_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public getForUpdate_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getForUpdate_args) - return this.equals((getForUpdate_args)that); - return false; - } - - public boolean equals(getForUpdate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getForUpdate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getForUpdate_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getForUpdate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getForUpdate_argsStandardScheme getScheme() { - return new getForUpdate_argsStandardScheme(); - } - } - - private static class getForUpdate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getForUpdate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list96 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list96.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem97; - for (int _i98 = 0; _i98 < _list96.size; ++_i98) - { - _elem97 = iprot.readBinary(); - struct.keys.add(_elem97); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getForUpdate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter99 : struct.keys) - { - oprot.writeBinary(_iter99); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getForUpdate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getForUpdate_argsTupleScheme getScheme() { - return new getForUpdate_argsTupleScheme(); - } - } - - private static class getForUpdate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getForUpdate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter100 : struct.keys) - { - oprot.writeBinary(_iter100); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getForUpdate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list101.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem102; - for (int _i103 = 0; _i103 < _list101.size; ++_i103) - { - _elem102 = iprot.readBinary(); - struct.keys.add(_elem102); - } - } - struct.setKeysIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getForUpdate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getForUpdate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getForUpdate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getForUpdate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable UpdateBegin success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UpdateBegin.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getForUpdate_result.class, metaDataMap); - } - - public getForUpdate_result() { - } - - public getForUpdate_result( - UpdateBegin success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public getForUpdate_result(getForUpdate_result other) { - if (other.isSetSuccess()) { - this.success = new UpdateBegin(other.success); - } - } - - @Override - public getForUpdate_result deepCopy() { - return new getForUpdate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public UpdateBegin getSuccess() { - return this.success; - } - - public getForUpdate_result setSuccess(@org.apache.thrift.annotation.Nullable UpdateBegin success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((UpdateBegin)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getForUpdate_result) - return this.equals((getForUpdate_result)that); - return false; - } - - public boolean equals(getForUpdate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getForUpdate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getForUpdate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getForUpdate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getForUpdate_resultStandardScheme getScheme() { - return new getForUpdate_resultStandardScheme(); - } - } - - private static class getForUpdate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getForUpdate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new UpdateBegin(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getForUpdate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getForUpdate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getForUpdate_resultTupleScheme getScheme() { - return new getForUpdate_resultTupleScheme(); - } - } - - private static class getForUpdate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getForUpdate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getForUpdate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new UpdateBegin(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class exists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new exists_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new exists_argsTupleSchemeFactory(); - - public long transactionOrUpdateId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"), - COLUMN_ID((short)3, "columnId"), - KEYS((short)4, "keys"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_OR_UPDATE_ID - return TRANSACTION_OR_UPDATE_ID; - case 3: // COLUMN_ID - return COLUMN_ID; - case 4: // KEYS - return KEYS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap); - } - - public exists_args() { - } - - public exists_args( - long transactionOrUpdateId, - long columnId, - java.util.List keys) - { - this(); - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.keys = keys; - } - - /** - * Performs a deep copy on other. - */ - public exists_args(exists_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionOrUpdateId = other.transactionOrUpdateId; - this.columnId = other.columnId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - } - - @Override - public exists_args deepCopy() { - return new exists_args(this); - } - - @Override - public void clear() { - setTransactionOrUpdateIdIsSet(false); - this.transactionOrUpdateId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.keys = null; - } - - public long getTransactionOrUpdateId() { - return this.transactionOrUpdateId; - } - - public exists_args setTransactionOrUpdateId(long transactionOrUpdateId) { - this.transactionOrUpdateId = transactionOrUpdateId; - setTransactionOrUpdateIdIsSet(true); - return this; - } - - public void unsetTransactionOrUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - /** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionOrUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID); - } - - public void setTransactionOrUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public exists_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public exists_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - if (value == null) { - unsetTransactionOrUpdateId(); - } else { - setTransactionOrUpdateId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return getTransactionOrUpdateId(); - - case COLUMN_ID: - return getColumnId(); - - case KEYS: - return getKeys(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_OR_UPDATE_ID: - return isSetTransactionOrUpdateId(); - case COLUMN_ID: - return isSetColumnId(); - case KEYS: - return isSetKeys(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof exists_args) - return this.equals((exists_args)that); - return false; - } - - public boolean equals(exists_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionOrUpdateId = true; - boolean that_present_transactionOrUpdateId = true; - if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) { - if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId)) - return false; - if (this.transactionOrUpdateId != that.transactionOrUpdateId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(exists_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionOrUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("exists_args("); - boolean first = true; - - sb.append("transactionOrUpdateId:"); - sb.append(this.transactionOrUpdateId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class exists_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public exists_argsStandardScheme getScheme() { - return new exists_argsStandardScheme(); - } - } - - private static class exists_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, exists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_OR_UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list104.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem105; - for (int _i106 = 0; _i106 < _list104.size; ++_i106) - { - _elem105 = iprot.readBinary(); - struct.keys.add(_elem105); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionOrUpdateId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter107 : struct.keys) - { - oprot.writeBinary(_iter107); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exists_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public exists_argsTupleScheme getScheme() { - return new exists_argsTupleScheme(); - } - } - - private static class exists_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionOrUpdateId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter108 : struct.keys) - { - oprot.writeBinary(_iter108); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionOrUpdateId = iprot.readI64(); - struct.setTransactionOrUpdateIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list109.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem110; - for (int _i111 = 0; _i111 < _list109.size; ++_i111) - { - _elem110 = iprot.readBinary(); - struct.keys.add(_elem110); - } - } - struct.setKeysIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class exists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new exists_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new exists_resultTupleSchemeFactory(); - - public boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap); - } - - public exists_result() { - } - - public exists_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public exists_result(exists_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public exists_result deepCopy() { - return new exists_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public exists_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof exists_result) - return this.equals((exists_result)that); - return false; - } - - public boolean equals(exists_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(exists_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("exists_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class exists_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public exists_resultStandardScheme getScheme() { - return new exists_resultStandardScheme(); - } - } - - private static class exists_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, exists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, exists_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exists_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public exists_resultTupleScheme getScheme() { - return new exists_resultTupleScheme(); - } - } - - private static class exists_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class openIterator_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openIterator_args"); - - private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField START_KEYS_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("startKeysInclusive", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField END_KEYS_EXCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("endKeysExclusive", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField REVERSE_FIELD_DESC = new org.apache.thrift.protocol.TField("reverse", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)6); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openIterator_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openIterator_argsTupleSchemeFactory(); - - public long transactionId; // required - public long columnId; // required - public @org.apache.thrift.annotation.Nullable java.util.List startKeysInclusive; // required - public @org.apache.thrift.annotation.Nullable java.util.List endKeysExclusive; // required - public boolean reverse; // required - public long timeoutMs; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TRANSACTION_ID((short)1, "transactionId"), - COLUMN_ID((short)2, "columnId"), - START_KEYS_INCLUSIVE((short)3, "startKeysInclusive"), - END_KEYS_EXCLUSIVE((short)4, "endKeysExclusive"), - REVERSE((short)5, "reverse"), - TIMEOUT_MS((short)6, "timeoutMs"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TRANSACTION_ID - return TRANSACTION_ID; - case 2: // COLUMN_ID - return COLUMN_ID; - case 3: // START_KEYS_INCLUSIVE - return START_KEYS_INCLUSIVE; - case 4: // END_KEYS_EXCLUSIVE - return END_KEYS_EXCLUSIVE; - case 5: // REVERSE - return REVERSE; - case 6: // TIMEOUT_MS - return TIMEOUT_MS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TRANSACTIONID_ISSET_ID = 0; - private static final int __COLUMNID_ISSET_ID = 1; - private static final int __REVERSE_ISSET_ID = 2; - private static final int __TIMEOUTMS_ISSET_ID = 3; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.START_KEYS_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("startKeysInclusive", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.END_KEYS_EXCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("endKeysExclusive", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.REVERSE, new org.apache.thrift.meta_data.FieldMetaData("reverse", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openIterator_args.class, metaDataMap); - } - - public openIterator_args() { - } - - public openIterator_args( - long transactionId, - long columnId, - java.util.List startKeysInclusive, - java.util.List endKeysExclusive, - boolean reverse, - long timeoutMs) - { - this(); - this.transactionId = transactionId; - setTransactionIdIsSet(true); - this.columnId = columnId; - setColumnIdIsSet(true); - this.startKeysInclusive = startKeysInclusive; - this.endKeysExclusive = endKeysExclusive; - this.reverse = reverse; - setReverseIsSet(true); - this.timeoutMs = timeoutMs; - setTimeoutMsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public openIterator_args(openIterator_args other) { - __isset_bitfield = other.__isset_bitfield; - this.transactionId = other.transactionId; - this.columnId = other.columnId; - if (other.isSetStartKeysInclusive()) { - java.util.List __this__startKeysInclusive = new java.util.ArrayList(other.startKeysInclusive); - this.startKeysInclusive = __this__startKeysInclusive; - } - if (other.isSetEndKeysExclusive()) { - java.util.List __this__endKeysExclusive = new java.util.ArrayList(other.endKeysExclusive); - this.endKeysExclusive = __this__endKeysExclusive; - } - this.reverse = other.reverse; - this.timeoutMs = other.timeoutMs; - } - - @Override - public openIterator_args deepCopy() { - return new openIterator_args(this); - } - - @Override - public void clear() { - setTransactionIdIsSet(false); - this.transactionId = 0; - setColumnIdIsSet(false); - this.columnId = 0; - this.startKeysInclusive = null; - this.endKeysExclusive = null; - setReverseIsSet(false); - this.reverse = false; - setTimeoutMsIsSet(false); - this.timeoutMs = 0; - } - - public long getTransactionId() { - return this.transactionId; - } - - public openIterator_args setTransactionId(long transactionId) { - this.transactionId = transactionId; - setTransactionIdIsSet(true); - return this; - } - - public void unsetTransactionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID); - } - - /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */ - public boolean isSetTransactionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID); - } - - public void setTransactionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID, value); - } - - public long getColumnId() { - return this.columnId; - } - - public openIterator_args setColumnId(long columnId) { - this.columnId = columnId; - setColumnIdIsSet(true); - return this; - } - - public void unsetColumnId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - /** Returns true if field columnId is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID); - } - - public void setColumnIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value); - } - - public int getStartKeysInclusiveSize() { - return (this.startKeysInclusive == null) ? 0 : this.startKeysInclusive.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getStartKeysInclusiveIterator() { - return (this.startKeysInclusive == null) ? null : this.startKeysInclusive.iterator(); - } - - public void addToStartKeysInclusive(java.nio.ByteBuffer elem) { - if (this.startKeysInclusive == null) { - this.startKeysInclusive = new java.util.ArrayList(); - } - this.startKeysInclusive.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getStartKeysInclusive() { - return this.startKeysInclusive; - } - - public openIterator_args setStartKeysInclusive(@org.apache.thrift.annotation.Nullable java.util.List startKeysInclusive) { - this.startKeysInclusive = startKeysInclusive; - return this; - } - - public void unsetStartKeysInclusive() { - this.startKeysInclusive = null; - } - - /** Returns true if field startKeysInclusive is set (has been assigned a value) and false otherwise */ - public boolean isSetStartKeysInclusive() { - return this.startKeysInclusive != null; - } - - public void setStartKeysInclusiveIsSet(boolean value) { - if (!value) { - this.startKeysInclusive = null; - } - } - - public int getEndKeysExclusiveSize() { - return (this.endKeysExclusive == null) ? 0 : this.endKeysExclusive.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getEndKeysExclusiveIterator() { - return (this.endKeysExclusive == null) ? null : this.endKeysExclusive.iterator(); - } - - public void addToEndKeysExclusive(java.nio.ByteBuffer elem) { - if (this.endKeysExclusive == null) { - this.endKeysExclusive = new java.util.ArrayList(); - } - this.endKeysExclusive.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getEndKeysExclusive() { - return this.endKeysExclusive; - } - - public openIterator_args setEndKeysExclusive(@org.apache.thrift.annotation.Nullable java.util.List endKeysExclusive) { - this.endKeysExclusive = endKeysExclusive; - return this; - } - - public void unsetEndKeysExclusive() { - this.endKeysExclusive = null; - } - - /** Returns true if field endKeysExclusive is set (has been assigned a value) and false otherwise */ - public boolean isSetEndKeysExclusive() { - return this.endKeysExclusive != null; - } - - public void setEndKeysExclusiveIsSet(boolean value) { - if (!value) { - this.endKeysExclusive = null; - } - } - - public boolean isReverse() { - return this.reverse; - } - - public openIterator_args setReverse(boolean reverse) { - this.reverse = reverse; - setReverseIsSet(true); - return this; - } - - public void unsetReverse() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REVERSE_ISSET_ID); - } - - /** Returns true if field reverse is set (has been assigned a value) and false otherwise */ - public boolean isSetReverse() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REVERSE_ISSET_ID); - } - - public void setReverseIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REVERSE_ISSET_ID, value); - } - - public long getTimeoutMs() { - return this.timeoutMs; - } - - public openIterator_args setTimeoutMs(long timeoutMs) { - this.timeoutMs = timeoutMs; - setTimeoutMsIsSet(true); - return this; - } - - public void unsetTimeoutMs() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID); - } - - /** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeoutMs() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID); - } - - public void setTimeoutMsIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TRANSACTION_ID: - if (value == null) { - unsetTransactionId(); - } else { - setTransactionId((java.lang.Long)value); - } - break; - - case COLUMN_ID: - if (value == null) { - unsetColumnId(); - } else { - setColumnId((java.lang.Long)value); - } - break; - - case START_KEYS_INCLUSIVE: - if (value == null) { - unsetStartKeysInclusive(); - } else { - setStartKeysInclusive((java.util.List)value); - } - break; - - case END_KEYS_EXCLUSIVE: - if (value == null) { - unsetEndKeysExclusive(); - } else { - setEndKeysExclusive((java.util.List)value); - } - break; - - case REVERSE: - if (value == null) { - unsetReverse(); - } else { - setReverse((java.lang.Boolean)value); - } - break; - - case TIMEOUT_MS: - if (value == null) { - unsetTimeoutMs(); - } else { - setTimeoutMs((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TRANSACTION_ID: - return getTransactionId(); - - case COLUMN_ID: - return getColumnId(); - - case START_KEYS_INCLUSIVE: - return getStartKeysInclusive(); - - case END_KEYS_EXCLUSIVE: - return getEndKeysExclusive(); - - case REVERSE: - return isReverse(); - - case TIMEOUT_MS: - return getTimeoutMs(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TRANSACTION_ID: - return isSetTransactionId(); - case COLUMN_ID: - return isSetColumnId(); - case START_KEYS_INCLUSIVE: - return isSetStartKeysInclusive(); - case END_KEYS_EXCLUSIVE: - return isSetEndKeysExclusive(); - case REVERSE: - return isSetReverse(); - case TIMEOUT_MS: - return isSetTimeoutMs(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof openIterator_args) - return this.equals((openIterator_args)that); - return false; - } - - public boolean equals(openIterator_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_transactionId = true; - boolean that_present_transactionId = true; - if (this_present_transactionId || that_present_transactionId) { - if (!(this_present_transactionId && that_present_transactionId)) - return false; - if (this.transactionId != that.transactionId) - return false; - } - - boolean this_present_columnId = true; - boolean that_present_columnId = true; - if (this_present_columnId || that_present_columnId) { - if (!(this_present_columnId && that_present_columnId)) - return false; - if (this.columnId != that.columnId) - return false; - } - - boolean this_present_startKeysInclusive = true && this.isSetStartKeysInclusive(); - boolean that_present_startKeysInclusive = true && that.isSetStartKeysInclusive(); - if (this_present_startKeysInclusive || that_present_startKeysInclusive) { - if (!(this_present_startKeysInclusive && that_present_startKeysInclusive)) - return false; - if (!this.startKeysInclusive.equals(that.startKeysInclusive)) - return false; - } - - boolean this_present_endKeysExclusive = true && this.isSetEndKeysExclusive(); - boolean that_present_endKeysExclusive = true && that.isSetEndKeysExclusive(); - if (this_present_endKeysExclusive || that_present_endKeysExclusive) { - if (!(this_present_endKeysExclusive && that_present_endKeysExclusive)) - return false; - if (!this.endKeysExclusive.equals(that.endKeysExclusive)) - return false; - } - - boolean this_present_reverse = true; - boolean that_present_reverse = true; - if (this_present_reverse || that_present_reverse) { - if (!(this_present_reverse && that_present_reverse)) - return false; - if (this.reverse != that.reverse) - return false; - } - - boolean this_present_timeoutMs = true; - boolean that_present_timeoutMs = true; - if (this_present_timeoutMs || that_present_timeoutMs) { - if (!(this_present_timeoutMs && that_present_timeoutMs)) - return false; - if (this.timeoutMs != that.timeoutMs) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId); - - hashCode = hashCode * 8191 + ((isSetStartKeysInclusive()) ? 131071 : 524287); - if (isSetStartKeysInclusive()) - hashCode = hashCode * 8191 + startKeysInclusive.hashCode(); - - hashCode = hashCode * 8191 + ((isSetEndKeysExclusive()) ? 131071 : 524287); - if (isSetEndKeysExclusive()) - hashCode = hashCode * 8191 + endKeysExclusive.hashCode(); - - hashCode = hashCode * 8191 + ((reverse) ? 131071 : 524287); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs); - - return hashCode; - } - - @Override - public int compareTo(openIterator_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransactionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, other.transactionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStartKeysInclusive(), other.isSetStartKeysInclusive()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartKeysInclusive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKeysInclusive, other.startKeysInclusive); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEndKeysExclusive(), other.isSetEndKeysExclusive()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndKeysExclusive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKeysExclusive, other.endKeysExclusive); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetReverse(), other.isSetReverse()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReverse()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reverse, other.reverse); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeoutMs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("openIterator_args("); - boolean first = true; - - sb.append("transactionId:"); - sb.append(this.transactionId); - first = false; - if (!first) sb.append(", "); - sb.append("columnId:"); - sb.append(this.columnId); - first = false; - if (!first) sb.append(", "); - sb.append("startKeysInclusive:"); - if (this.startKeysInclusive == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.startKeysInclusive, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("endKeysExclusive:"); - if (this.endKeysExclusive == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.endKeysExclusive, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("reverse:"); - sb.append(this.reverse); - first = false; - if (!first) sb.append(", "); - sb.append("timeoutMs:"); - sb.append(this.timeoutMs); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'transactionId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator. - if (startKeysInclusive == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'startKeysInclusive' was not present! Struct: " + toString()); - } - // alas, we cannot check 'reverse' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class openIterator_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openIterator_argsStandardScheme getScheme() { - return new openIterator_argsStandardScheme(); - } - } - - private static class openIterator_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, openIterator_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TRANSACTION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transactionId = iprot.readI64(); - struct.setTransactionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COLUMN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // START_KEYS_INCLUSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list112 = iprot.readListBegin(); - struct.startKeysInclusive = new java.util.ArrayList(_list112.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem113; - for (int _i114 = 0; _i114 < _list112.size; ++_i114) - { - _elem113 = iprot.readBinary(); - struct.startKeysInclusive.add(_elem113); - } - iprot.readListEnd(); - } - struct.setStartKeysInclusiveIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // END_KEYS_EXCLUSIVE - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list115 = iprot.readListBegin(); - struct.endKeysExclusive = new java.util.ArrayList(_list115.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem116; - for (int _i117 = 0; _i117 < _list115.size; ++_i117) - { - _elem116 = iprot.readBinary(); - struct.endKeysExclusive.add(_elem116); - } - iprot.readListEnd(); - } - struct.setEndKeysExclusiveIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // REVERSE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.reverse = iprot.readBool(); - struct.setReverseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TIMEOUT_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeoutMs = iprot.readI64(); - struct.setTimeoutMsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetTransactionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetColumnId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetReverse()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'reverse' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTimeoutMs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, openIterator_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC); - oprot.writeI64(struct.transactionId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC); - oprot.writeI64(struct.columnId); - oprot.writeFieldEnd(); - if (struct.startKeysInclusive != null) { - oprot.writeFieldBegin(START_KEYS_INCLUSIVE_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.startKeysInclusive.size())); - for (java.nio.ByteBuffer _iter118 : struct.startKeysInclusive) - { - oprot.writeBinary(_iter118); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.endKeysExclusive != null) { - oprot.writeFieldBegin(END_KEYS_EXCLUSIVE_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.endKeysExclusive.size())); - for (java.nio.ByteBuffer _iter119 : struct.endKeysExclusive) - { - oprot.writeBinary(_iter119); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(REVERSE_FIELD_DESC); - oprot.writeBool(struct.reverse); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC); - oprot.writeI64(struct.timeoutMs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class openIterator_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openIterator_argsTupleScheme getScheme() { - return new openIterator_argsTupleScheme(); - } - } - - private static class openIterator_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openIterator_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.transactionId); - oprot.writeI64(struct.columnId); - { - oprot.writeI32(struct.startKeysInclusive.size()); - for (java.nio.ByteBuffer _iter120 : struct.startKeysInclusive) - { - oprot.writeBinary(_iter120); - } - } - oprot.writeBool(struct.reverse); - oprot.writeI64(struct.timeoutMs); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetEndKeysExclusive()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEndKeysExclusive()) { - { - oprot.writeI32(struct.endKeysExclusive.size()); - for (java.nio.ByteBuffer _iter121 : struct.endKeysExclusive) - { - oprot.writeBinary(_iter121); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openIterator_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.transactionId = iprot.readI64(); - struct.setTransactionIdIsSet(true); - struct.columnId = iprot.readI64(); - struct.setColumnIdIsSet(true); - { - org.apache.thrift.protocol.TList _list122 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.startKeysInclusive = new java.util.ArrayList(_list122.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem123; - for (int _i124 = 0; _i124 < _list122.size; ++_i124) - { - _elem123 = iprot.readBinary(); - struct.startKeysInclusive.add(_elem123); - } - } - struct.setStartKeysInclusiveIsSet(true); - struct.reverse = iprot.readBool(); - struct.setReverseIsSet(true); - struct.timeoutMs = iprot.readI64(); - struct.setTimeoutMsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list125 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.endKeysExclusive = new java.util.ArrayList(_list125.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem126; - for (int _i127 = 0; _i127 < _list125.size; ++_i127) - { - _elem126 = iprot.readBinary(); - struct.endKeysExclusive.add(_elem126); - } - } - struct.setEndKeysExclusiveIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class openIterator_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openIterator_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openIterator_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openIterator_resultTupleSchemeFactory(); - - public long success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openIterator_result.class, metaDataMap); - } - - public openIterator_result() { - } - - public openIterator_result( - long success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public openIterator_result(openIterator_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public openIterator_result deepCopy() { - return new openIterator_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - } - - public long getSuccess() { - return this.success; - } - - public openIterator_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof openIterator_result) - return this.equals((openIterator_result)that); - return false; - } - - public boolean equals(openIterator_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); - - return hashCode; - } - - @Override - public int compareTo(openIterator_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("openIterator_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class openIterator_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openIterator_resultStandardScheme getScheme() { - return new openIterator_resultStandardScheme(); - } - } - - private static class openIterator_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, openIterator_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, openIterator_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class openIterator_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openIterator_resultTupleScheme getScheme() { - return new openIterator_resultTupleScheme(); - } - } - - private static class openIterator_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openIterator_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openIterator_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeIterator_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeIterator_args"); - - private static final org.apache.thrift.protocol.TField ITERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeIterator_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeIterator_argsTupleSchemeFactory(); - - public long iteratorId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ITERATOR_ID((short)1, "iteratorId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ITERATOR_ID - return ITERATOR_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ITERATORID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ITERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("iteratorId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeIterator_args.class, metaDataMap); - } - - public closeIterator_args() { - } - - public closeIterator_args( - long iteratorId) - { - this(); - this.iteratorId = iteratorId; - setIteratorIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public closeIterator_args(closeIterator_args other) { - __isset_bitfield = other.__isset_bitfield; - this.iteratorId = other.iteratorId; - } - - @Override - public closeIterator_args deepCopy() { - return new closeIterator_args(this); - } - - @Override - public void clear() { - setIteratorIdIsSet(false); - this.iteratorId = 0; - } - - public long getIteratorId() { - return this.iteratorId; - } - - public closeIterator_args setIteratorId(long iteratorId) { - this.iteratorId = iteratorId; - setIteratorIdIsSet(true); - return this; - } - - public void unsetIteratorId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATORID_ISSET_ID); - } - - /** Returns true if field iteratorId is set (has been assigned a value) and false otherwise */ - public boolean isSetIteratorId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATORID_ISSET_ID); - } - - public void setIteratorIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATORID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case ITERATOR_ID: - if (value == null) { - unsetIteratorId(); - } else { - setIteratorId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case ITERATOR_ID: - return getIteratorId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case ITERATOR_ID: - return isSetIteratorId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeIterator_args) - return this.equals((closeIterator_args)that); - return false; - } - - public boolean equals(closeIterator_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_iteratorId = true; - boolean that_present_iteratorId = true; - if (this_present_iteratorId || that_present_iteratorId) { - if (!(this_present_iteratorId && that_present_iteratorId)) - return false; - if (this.iteratorId != that.iteratorId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iteratorId); - - return hashCode; - } - - @Override - public int compareTo(closeIterator_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetIteratorId(), other.isSetIteratorId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIteratorId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iteratorId, other.iteratorId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeIterator_args("); - boolean first = true; - - sb.append("iteratorId:"); - sb.append(this.iteratorId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'iteratorId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeIterator_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeIterator_argsStandardScheme getScheme() { - return new closeIterator_argsStandardScheme(); - } - } - - private static class closeIterator_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeIterator_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ITERATOR_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.iteratorId = iprot.readI64(); - struct.setIteratorIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetIteratorId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'iteratorId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeIterator_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ITERATOR_ID_FIELD_DESC); - oprot.writeI64(struct.iteratorId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeIterator_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeIterator_argsTupleScheme getScheme() { - return new closeIterator_argsTupleScheme(); - } - } - - private static class closeIterator_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeIterator_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.iteratorId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeIterator_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.iteratorId = iprot.readI64(); - struct.setIteratorIdIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeIterator_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeIterator_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeIterator_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeIterator_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeIterator_result.class, metaDataMap); - } - - public closeIterator_result() { - } - - /** - * Performs a deep copy on other. - */ - public closeIterator_result(closeIterator_result other) { - } - - @Override - public closeIterator_result deepCopy() { - return new closeIterator_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeIterator_result) - return this.equals((closeIterator_result)that); - return false; - } - - public boolean equals(closeIterator_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(closeIterator_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeIterator_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeIterator_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeIterator_resultStandardScheme getScheme() { - return new closeIterator_resultStandardScheme(); - } - } - - private static class closeIterator_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeIterator_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeIterator_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeIterator_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeIterator_resultTupleScheme getScheme() { - return new closeIterator_resultTupleScheme(); - } - } - - private static class closeIterator_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeIterator_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeIterator_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class seekTo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("seekTo_args"); - - private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new seekTo_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new seekTo_argsTupleSchemeFactory(); - - public long iterationId; // required - public @org.apache.thrift.annotation.Nullable java.util.List keys; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ITERATION_ID((short)1, "iterationId"), - KEYS((short)2, "keys"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ITERATION_ID - return ITERATION_ID; - case 2: // KEYS - return KEYS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ITERATIONID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(seekTo_args.class, metaDataMap); - } - - public seekTo_args() { - } - - public seekTo_args( - long iterationId, - java.util.List keys) - { - this(); - this.iterationId = iterationId; - setIterationIdIsSet(true); - this.keys = keys; - } - - /** - * Performs a deep copy on other. - */ - public seekTo_args(seekTo_args other) { - __isset_bitfield = other.__isset_bitfield; - this.iterationId = other.iterationId; - if (other.isSetKeys()) { - java.util.List __this__keys = new java.util.ArrayList(other.keys); - this.keys = __this__keys; - } - } - - @Override - public seekTo_args deepCopy() { - return new seekTo_args(this); - } - - @Override - public void clear() { - setIterationIdIsSet(false); - this.iterationId = 0; - this.keys = null; - } - - public long getIterationId() { - return this.iterationId; - } - - public seekTo_args setIterationId(long iterationId) { - this.iterationId = iterationId; - setIterationIdIsSet(true); - return this; - } - - public void unsetIterationId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - /** Returns true if field iterationId is set (has been assigned a value) and false otherwise */ - public boolean isSetIterationId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - public void setIterationIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value); - } - - public int getKeysSize() { - return (this.keys == null) ? 0 : this.keys.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getKeysIterator() { - return (this.keys == null) ? null : this.keys.iterator(); - } - - public void addToKeys(java.nio.ByteBuffer elem) { - if (this.keys == null) { - this.keys = new java.util.ArrayList(); - } - this.keys.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getKeys() { - return this.keys; - } - - public seekTo_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List keys) { - this.keys = keys; - return this; - } - - public void unsetKeys() { - this.keys = null; - } - - /** Returns true if field keys is set (has been assigned a value) and false otherwise */ - public boolean isSetKeys() { - return this.keys != null; - } - - public void setKeysIsSet(boolean value) { - if (!value) { - this.keys = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case ITERATION_ID: - if (value == null) { - unsetIterationId(); - } else { - setIterationId((java.lang.Long)value); - } - break; - - case KEYS: - if (value == null) { - unsetKeys(); - } else { - setKeys((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case ITERATION_ID: - return getIterationId(); - - case KEYS: - return getKeys(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case ITERATION_ID: - return isSetIterationId(); - case KEYS: - return isSetKeys(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof seekTo_args) - return this.equals((seekTo_args)that); - return false; - } - - public boolean equals(seekTo_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_iterationId = true; - boolean that_present_iterationId = true; - if (this_present_iterationId || that_present_iterationId) { - if (!(this_present_iterationId && that_present_iterationId)) - return false; - if (this.iterationId != that.iterationId) - return false; - } - - boolean this_present_keys = true && this.isSetKeys(); - boolean that_present_keys = true && that.isSetKeys(); - if (this_present_keys || that_present_keys) { - if (!(this_present_keys && that_present_keys)) - return false; - if (!this.keys.equals(that.keys)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId); - - hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287); - if (isSetKeys()) - hashCode = hashCode * 8191 + keys.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(seekTo_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIterationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("seekTo_args("); - boolean first = true; - - sb.append("iterationId:"); - sb.append(this.iterationId); - first = false; - if (!first) sb.append(", "); - sb.append("keys:"); - if (this.keys == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.keys, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator. - if (keys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class seekTo_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public seekTo_argsStandardScheme getScheme() { - return new seekTo_argsStandardScheme(); - } - } - - private static class seekTo_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, seekTo_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ITERATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); - struct.keys = new java.util.ArrayList(_list128.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem129; - for (int _i130 = 0; _i130 < _list128.size; ++_i130) - { - _elem129 = iprot.readBinary(); - struct.keys.add(_elem129); - } - iprot.readListEnd(); - } - struct.setKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetIterationId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, seekTo_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC); - oprot.writeI64(struct.iterationId); - oprot.writeFieldEnd(); - if (struct.keys != null) { - oprot.writeFieldBegin(KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (java.nio.ByteBuffer _iter131 : struct.keys) - { - oprot.writeBinary(_iter131); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class seekTo_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public seekTo_argsTupleScheme getScheme() { - return new seekTo_argsTupleScheme(); - } - } - - private static class seekTo_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, seekTo_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.iterationId); - { - oprot.writeI32(struct.keys.size()); - for (java.nio.ByteBuffer _iter132 : struct.keys) - { - oprot.writeBinary(_iter132); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, seekTo_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - { - org.apache.thrift.protocol.TList _list133 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.keys = new java.util.ArrayList(_list133.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem134; - for (int _i135 = 0; _i135 < _list133.size; ++_i135) - { - _elem134 = iprot.readBinary(); - struct.keys.add(_elem134); - } - } - struct.setKeysIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class seekTo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("seekTo_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new seekTo_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new seekTo_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(seekTo_result.class, metaDataMap); - } - - public seekTo_result() { - } - - /** - * Performs a deep copy on other. - */ - public seekTo_result(seekTo_result other) { - } - - @Override - public seekTo_result deepCopy() { - return new seekTo_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof seekTo_result) - return this.equals((seekTo_result)that); - return false; - } - - public boolean equals(seekTo_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(seekTo_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("seekTo_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class seekTo_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public seekTo_resultStandardScheme getScheme() { - return new seekTo_resultStandardScheme(); - } - } - - private static class seekTo_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, seekTo_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, seekTo_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class seekTo_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public seekTo_resultTupleScheme getScheme() { - return new seekTo_resultTupleScheme(); - } - } - - private static class seekTo_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, seekTo_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, seekTo_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class subsequent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequent_args"); - - private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField SKIP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("skipCount", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField TAKE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("takeCount", org.apache.thrift.protocol.TType.I64, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequent_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequent_argsTupleSchemeFactory(); - - public long iterationId; // required - public long skipCount; // required - public long takeCount; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ITERATION_ID((short)1, "iterationId"), - SKIP_COUNT((short)2, "skipCount"), - TAKE_COUNT((short)3, "takeCount"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ITERATION_ID - return ITERATION_ID; - case 2: // SKIP_COUNT - return SKIP_COUNT; - case 3: // TAKE_COUNT - return TAKE_COUNT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ITERATIONID_ISSET_ID = 0; - private static final int __SKIPCOUNT_ISSET_ID = 1; - private static final int __TAKECOUNT_ISSET_ID = 2; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SKIP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("skipCount", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TAKE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("takeCount", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequent_args.class, metaDataMap); - } - - public subsequent_args() { - } - - public subsequent_args( - long iterationId, - long skipCount, - long takeCount) - { - this(); - this.iterationId = iterationId; - setIterationIdIsSet(true); - this.skipCount = skipCount; - setSkipCountIsSet(true); - this.takeCount = takeCount; - setTakeCountIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public subsequent_args(subsequent_args other) { - __isset_bitfield = other.__isset_bitfield; - this.iterationId = other.iterationId; - this.skipCount = other.skipCount; - this.takeCount = other.takeCount; - } - - @Override - public subsequent_args deepCopy() { - return new subsequent_args(this); - } - - @Override - public void clear() { - setIterationIdIsSet(false); - this.iterationId = 0; - setSkipCountIsSet(false); - this.skipCount = 0; - setTakeCountIsSet(false); - this.takeCount = 0; - } - - public long getIterationId() { - return this.iterationId; - } - - public subsequent_args setIterationId(long iterationId) { - this.iterationId = iterationId; - setIterationIdIsSet(true); - return this; - } - - public void unsetIterationId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - /** Returns true if field iterationId is set (has been assigned a value) and false otherwise */ - public boolean isSetIterationId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - public void setIterationIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value); - } - - public long getSkipCount() { - return this.skipCount; - } - - public subsequent_args setSkipCount(long skipCount) { - this.skipCount = skipCount; - setSkipCountIsSet(true); - return this; - } - - public void unsetSkipCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID); - } - - /** Returns true if field skipCount is set (has been assigned a value) and false otherwise */ - public boolean isSetSkipCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID); - } - - public void setSkipCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID, value); - } - - public long getTakeCount() { - return this.takeCount; - } - - public subsequent_args setTakeCount(long takeCount) { - this.takeCount = takeCount; - setTakeCountIsSet(true); - return this; - } - - public void unsetTakeCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TAKECOUNT_ISSET_ID); - } - - /** Returns true if field takeCount is set (has been assigned a value) and false otherwise */ - public boolean isSetTakeCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TAKECOUNT_ISSET_ID); - } - - public void setTakeCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TAKECOUNT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case ITERATION_ID: - if (value == null) { - unsetIterationId(); - } else { - setIterationId((java.lang.Long)value); - } - break; - - case SKIP_COUNT: - if (value == null) { - unsetSkipCount(); - } else { - setSkipCount((java.lang.Long)value); - } - break; - - case TAKE_COUNT: - if (value == null) { - unsetTakeCount(); - } else { - setTakeCount((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case ITERATION_ID: - return getIterationId(); - - case SKIP_COUNT: - return getSkipCount(); - - case TAKE_COUNT: - return getTakeCount(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case ITERATION_ID: - return isSetIterationId(); - case SKIP_COUNT: - return isSetSkipCount(); - case TAKE_COUNT: - return isSetTakeCount(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof subsequent_args) - return this.equals((subsequent_args)that); - return false; - } - - public boolean equals(subsequent_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_iterationId = true; - boolean that_present_iterationId = true; - if (this_present_iterationId || that_present_iterationId) { - if (!(this_present_iterationId && that_present_iterationId)) - return false; - if (this.iterationId != that.iterationId) - return false; - } - - boolean this_present_skipCount = true; - boolean that_present_skipCount = true; - if (this_present_skipCount || that_present_skipCount) { - if (!(this_present_skipCount && that_present_skipCount)) - return false; - if (this.skipCount != that.skipCount) - return false; - } - - boolean this_present_takeCount = true; - boolean that_present_takeCount = true; - if (this_present_takeCount || that_present_takeCount) { - if (!(this_present_takeCount && that_present_takeCount)) - return false; - if (this.takeCount != that.takeCount) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(skipCount); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(takeCount); - - return hashCode; - } - - @Override - public int compareTo(subsequent_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIterationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSkipCount(), other.isSetSkipCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkipCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipCount, other.skipCount); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTakeCount(), other.isSetTakeCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTakeCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.takeCount, other.takeCount); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequent_args("); - boolean first = true; - - sb.append("iterationId:"); - sb.append(this.iterationId); - first = false; - if (!first) sb.append(", "); - sb.append("skipCount:"); - sb.append(this.skipCount); - first = false; - if (!first) sb.append(", "); - sb.append("takeCount:"); - sb.append(this.takeCount); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'skipCount' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'takeCount' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class subsequent_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequent_argsStandardScheme getScheme() { - return new subsequent_argsStandardScheme(); - } - } - - private static class subsequent_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, subsequent_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ITERATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SKIP_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.skipCount = iprot.readI64(); - struct.setSkipCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TAKE_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.takeCount = iprot.readI64(); - struct.setTakeCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetIterationId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetSkipCount()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'skipCount' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTakeCount()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'takeCount' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, subsequent_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC); - oprot.writeI64(struct.iterationId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SKIP_COUNT_FIELD_DESC); - oprot.writeI64(struct.skipCount); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TAKE_COUNT_FIELD_DESC); - oprot.writeI64(struct.takeCount); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class subsequent_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequent_argsTupleScheme getScheme() { - return new subsequent_argsTupleScheme(); - } - } - - private static class subsequent_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, subsequent_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.iterationId); - oprot.writeI64(struct.skipCount); - oprot.writeI64(struct.takeCount); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, subsequent_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - struct.skipCount = iprot.readI64(); - struct.setSkipCountIsSet(true); - struct.takeCount = iprot.readI64(); - struct.setTakeCountIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class subsequent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequent_result"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequent_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequent_resultTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequent_result.class, metaDataMap); - } - - public subsequent_result() { - } - - /** - * Performs a deep copy on other. - */ - public subsequent_result(subsequent_result other) { - } - - @Override - public subsequent_result deepCopy() { - return new subsequent_result(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof subsequent_result) - return this.equals((subsequent_result)that); - return false; - } - - public boolean equals(subsequent_result that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(subsequent_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequent_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class subsequent_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequent_resultStandardScheme getScheme() { - return new subsequent_resultStandardScheme(); - } - } - - private static class subsequent_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, subsequent_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, subsequent_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class subsequent_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequent_resultTupleScheme getScheme() { - return new subsequent_resultTupleScheme(); - } - } - - private static class subsequent_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, subsequent_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, subsequent_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class subsequentExists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentExists_args"); - - private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField SKIP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("skipCount", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField TAKE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("takeCount", org.apache.thrift.protocol.TType.I64, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentExists_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentExists_argsTupleSchemeFactory(); - - public long iterationId; // required - public long skipCount; // required - public long takeCount; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ITERATION_ID((short)1, "iterationId"), - SKIP_COUNT((short)2, "skipCount"), - TAKE_COUNT((short)3, "takeCount"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ITERATION_ID - return ITERATION_ID; - case 2: // SKIP_COUNT - return SKIP_COUNT; - case 3: // TAKE_COUNT - return TAKE_COUNT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ITERATIONID_ISSET_ID = 0; - private static final int __SKIPCOUNT_ISSET_ID = 1; - private static final int __TAKECOUNT_ISSET_ID = 2; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SKIP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("skipCount", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TAKE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("takeCount", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentExists_args.class, metaDataMap); - } - - public subsequentExists_args() { - } - - public subsequentExists_args( - long iterationId, - long skipCount, - long takeCount) - { - this(); - this.iterationId = iterationId; - setIterationIdIsSet(true); - this.skipCount = skipCount; - setSkipCountIsSet(true); - this.takeCount = takeCount; - setTakeCountIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public subsequentExists_args(subsequentExists_args other) { - __isset_bitfield = other.__isset_bitfield; - this.iterationId = other.iterationId; - this.skipCount = other.skipCount; - this.takeCount = other.takeCount; - } - - @Override - public subsequentExists_args deepCopy() { - return new subsequentExists_args(this); - } - - @Override - public void clear() { - setIterationIdIsSet(false); - this.iterationId = 0; - setSkipCountIsSet(false); - this.skipCount = 0; - setTakeCountIsSet(false); - this.takeCount = 0; - } - - public long getIterationId() { - return this.iterationId; - } - - public subsequentExists_args setIterationId(long iterationId) { - this.iterationId = iterationId; - setIterationIdIsSet(true); - return this; - } - - public void unsetIterationId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - /** Returns true if field iterationId is set (has been assigned a value) and false otherwise */ - public boolean isSetIterationId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - public void setIterationIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value); - } - - public long getSkipCount() { - return this.skipCount; - } - - public subsequentExists_args setSkipCount(long skipCount) { - this.skipCount = skipCount; - setSkipCountIsSet(true); - return this; - } - - public void unsetSkipCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID); - } - - /** Returns true if field skipCount is set (has been assigned a value) and false otherwise */ - public boolean isSetSkipCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID); - } - - public void setSkipCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID, value); - } - - public long getTakeCount() { - return this.takeCount; - } - - public subsequentExists_args setTakeCount(long takeCount) { - this.takeCount = takeCount; - setTakeCountIsSet(true); - return this; - } - - public void unsetTakeCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TAKECOUNT_ISSET_ID); - } - - /** Returns true if field takeCount is set (has been assigned a value) and false otherwise */ - public boolean isSetTakeCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TAKECOUNT_ISSET_ID); - } - - public void setTakeCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TAKECOUNT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case ITERATION_ID: - if (value == null) { - unsetIterationId(); - } else { - setIterationId((java.lang.Long)value); - } - break; - - case SKIP_COUNT: - if (value == null) { - unsetSkipCount(); - } else { - setSkipCount((java.lang.Long)value); - } - break; - - case TAKE_COUNT: - if (value == null) { - unsetTakeCount(); - } else { - setTakeCount((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case ITERATION_ID: - return getIterationId(); - - case SKIP_COUNT: - return getSkipCount(); - - case TAKE_COUNT: - return getTakeCount(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case ITERATION_ID: - return isSetIterationId(); - case SKIP_COUNT: - return isSetSkipCount(); - case TAKE_COUNT: - return isSetTakeCount(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof subsequentExists_args) - return this.equals((subsequentExists_args)that); - return false; - } - - public boolean equals(subsequentExists_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_iterationId = true; - boolean that_present_iterationId = true; - if (this_present_iterationId || that_present_iterationId) { - if (!(this_present_iterationId && that_present_iterationId)) - return false; - if (this.iterationId != that.iterationId) - return false; - } - - boolean this_present_skipCount = true; - boolean that_present_skipCount = true; - if (this_present_skipCount || that_present_skipCount) { - if (!(this_present_skipCount && that_present_skipCount)) - return false; - if (this.skipCount != that.skipCount) - return false; - } - - boolean this_present_takeCount = true; - boolean that_present_takeCount = true; - if (this_present_takeCount || that_present_takeCount) { - if (!(this_present_takeCount && that_present_takeCount)) - return false; - if (this.takeCount != that.takeCount) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(skipCount); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(takeCount); - - return hashCode; - } - - @Override - public int compareTo(subsequentExists_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIterationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSkipCount(), other.isSetSkipCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkipCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipCount, other.skipCount); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTakeCount(), other.isSetTakeCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTakeCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.takeCount, other.takeCount); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentExists_args("); - boolean first = true; - - sb.append("iterationId:"); - sb.append(this.iterationId); - first = false; - if (!first) sb.append(", "); - sb.append("skipCount:"); - sb.append(this.skipCount); - first = false; - if (!first) sb.append(", "); - sb.append("takeCount:"); - sb.append(this.takeCount); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'skipCount' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'takeCount' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class subsequentExists_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentExists_argsStandardScheme getScheme() { - return new subsequentExists_argsStandardScheme(); - } - } - - private static class subsequentExists_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentExists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ITERATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SKIP_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.skipCount = iprot.readI64(); - struct.setSkipCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TAKE_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.takeCount = iprot.readI64(); - struct.setTakeCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetIterationId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetSkipCount()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'skipCount' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTakeCount()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'takeCount' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentExists_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC); - oprot.writeI64(struct.iterationId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SKIP_COUNT_FIELD_DESC); - oprot.writeI64(struct.skipCount); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TAKE_COUNT_FIELD_DESC); - oprot.writeI64(struct.takeCount); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class subsequentExists_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentExists_argsTupleScheme getScheme() { - return new subsequentExists_argsTupleScheme(); - } - } - - private static class subsequentExists_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, subsequentExists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.iterationId); - oprot.writeI64(struct.skipCount); - oprot.writeI64(struct.takeCount); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, subsequentExists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - struct.skipCount = iprot.readI64(); - struct.setSkipCountIsSet(true); - struct.takeCount = iprot.readI64(); - struct.setTakeCountIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class subsequentExists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentExists_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentExists_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentExists_resultTupleSchemeFactory(); - - public boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentExists_result.class, metaDataMap); - } - - public subsequentExists_result() { - } - - public subsequentExists_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public subsequentExists_result(subsequentExists_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public subsequentExists_result deepCopy() { - return new subsequentExists_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public subsequentExists_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof subsequentExists_result) - return this.equals((subsequentExists_result)that); - return false; - } - - public boolean equals(subsequentExists_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(subsequentExists_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentExists_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class subsequentExists_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentExists_resultStandardScheme getScheme() { - return new subsequentExists_resultStandardScheme(); - } - } - - private static class subsequentExists_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentExists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentExists_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class subsequentExists_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentExists_resultTupleScheme getScheme() { - return new subsequentExists_resultTupleScheme(); - } - } - - private static class subsequentExists_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, subsequentExists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, subsequentExists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class subsequentMultiGet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentMultiGet_args"); - - private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField SKIP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("skipCount", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField TAKE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("takeCount", org.apache.thrift.protocol.TType.I64, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentMultiGet_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentMultiGet_argsTupleSchemeFactory(); - - public long iterationId; // required - public long skipCount; // required - public long takeCount; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ITERATION_ID((short)1, "iterationId"), - SKIP_COUNT((short)2, "skipCount"), - TAKE_COUNT((short)3, "takeCount"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ITERATION_ID - return ITERATION_ID; - case 2: // SKIP_COUNT - return SKIP_COUNT; - case 3: // TAKE_COUNT - return TAKE_COUNT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ITERATIONID_ISSET_ID = 0; - private static final int __SKIPCOUNT_ISSET_ID = 1; - private static final int __TAKECOUNT_ISSET_ID = 2; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SKIP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("skipCount", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TAKE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("takeCount", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentMultiGet_args.class, metaDataMap); - } - - public subsequentMultiGet_args() { - } - - public subsequentMultiGet_args( - long iterationId, - long skipCount, - long takeCount) - { - this(); - this.iterationId = iterationId; - setIterationIdIsSet(true); - this.skipCount = skipCount; - setSkipCountIsSet(true); - this.takeCount = takeCount; - setTakeCountIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public subsequentMultiGet_args(subsequentMultiGet_args other) { - __isset_bitfield = other.__isset_bitfield; - this.iterationId = other.iterationId; - this.skipCount = other.skipCount; - this.takeCount = other.takeCount; - } - - @Override - public subsequentMultiGet_args deepCopy() { - return new subsequentMultiGet_args(this); - } - - @Override - public void clear() { - setIterationIdIsSet(false); - this.iterationId = 0; - setSkipCountIsSet(false); - this.skipCount = 0; - setTakeCountIsSet(false); - this.takeCount = 0; - } - - public long getIterationId() { - return this.iterationId; - } - - public subsequentMultiGet_args setIterationId(long iterationId) { - this.iterationId = iterationId; - setIterationIdIsSet(true); - return this; - } - - public void unsetIterationId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - /** Returns true if field iterationId is set (has been assigned a value) and false otherwise */ - public boolean isSetIterationId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID); - } - - public void setIterationIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value); - } - - public long getSkipCount() { - return this.skipCount; - } - - public subsequentMultiGet_args setSkipCount(long skipCount) { - this.skipCount = skipCount; - setSkipCountIsSet(true); - return this; - } - - public void unsetSkipCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID); - } - - /** Returns true if field skipCount is set (has been assigned a value) and false otherwise */ - public boolean isSetSkipCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID); - } - - public void setSkipCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID, value); - } - - public long getTakeCount() { - return this.takeCount; - } - - public subsequentMultiGet_args setTakeCount(long takeCount) { - this.takeCount = takeCount; - setTakeCountIsSet(true); - return this; - } - - public void unsetTakeCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TAKECOUNT_ISSET_ID); - } - - /** Returns true if field takeCount is set (has been assigned a value) and false otherwise */ - public boolean isSetTakeCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TAKECOUNT_ISSET_ID); - } - - public void setTakeCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TAKECOUNT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case ITERATION_ID: - if (value == null) { - unsetIterationId(); - } else { - setIterationId((java.lang.Long)value); - } - break; - - case SKIP_COUNT: - if (value == null) { - unsetSkipCount(); - } else { - setSkipCount((java.lang.Long)value); - } - break; - - case TAKE_COUNT: - if (value == null) { - unsetTakeCount(); - } else { - setTakeCount((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case ITERATION_ID: - return getIterationId(); - - case SKIP_COUNT: - return getSkipCount(); - - case TAKE_COUNT: - return getTakeCount(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case ITERATION_ID: - return isSetIterationId(); - case SKIP_COUNT: - return isSetSkipCount(); - case TAKE_COUNT: - return isSetTakeCount(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof subsequentMultiGet_args) - return this.equals((subsequentMultiGet_args)that); - return false; - } - - public boolean equals(subsequentMultiGet_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_iterationId = true; - boolean that_present_iterationId = true; - if (this_present_iterationId || that_present_iterationId) { - if (!(this_present_iterationId && that_present_iterationId)) - return false; - if (this.iterationId != that.iterationId) - return false; - } - - boolean this_present_skipCount = true; - boolean that_present_skipCount = true; - if (this_present_skipCount || that_present_skipCount) { - if (!(this_present_skipCount && that_present_skipCount)) - return false; - if (this.skipCount != that.skipCount) - return false; - } - - boolean this_present_takeCount = true; - boolean that_present_takeCount = true; - if (this_present_takeCount || that_present_takeCount) { - if (!(this_present_takeCount && that_present_takeCount)) - return false; - if (this.takeCount != that.takeCount) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(skipCount); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(takeCount); - - return hashCode; - } - - @Override - public int compareTo(subsequentMultiGet_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIterationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSkipCount(), other.isSetSkipCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkipCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipCount, other.skipCount); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTakeCount(), other.isSetTakeCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTakeCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.takeCount, other.takeCount); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentMultiGet_args("); - boolean first = true; - - sb.append("iterationId:"); - sb.append(this.iterationId); - first = false; - if (!first) sb.append(", "); - sb.append("skipCount:"); - sb.append(this.skipCount); - first = false; - if (!first) sb.append(", "); - sb.append("takeCount:"); - sb.append(this.takeCount); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'skipCount' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'takeCount' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class subsequentMultiGet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentMultiGet_argsStandardScheme getScheme() { - return new subsequentMultiGet_argsStandardScheme(); - } - } - - private static class subsequentMultiGet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentMultiGet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ITERATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SKIP_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.skipCount = iprot.readI64(); - struct.setSkipCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TAKE_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.takeCount = iprot.readI64(); - struct.setTakeCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetIterationId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetSkipCount()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'skipCount' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTakeCount()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'takeCount' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentMultiGet_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC); - oprot.writeI64(struct.iterationId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SKIP_COUNT_FIELD_DESC); - oprot.writeI64(struct.skipCount); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TAKE_COUNT_FIELD_DESC); - oprot.writeI64(struct.takeCount); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class subsequentMultiGet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentMultiGet_argsTupleScheme getScheme() { - return new subsequentMultiGet_argsTupleScheme(); - } - } - - private static class subsequentMultiGet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.iterationId); - oprot.writeI64(struct.skipCount); - oprot.writeI64(struct.takeCount); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.iterationId = iprot.readI64(); - struct.setIterationIdIsSet(true); - struct.skipCount = iprot.readI64(); - struct.setSkipCountIsSet(true); - struct.takeCount = iprot.readI64(); - struct.setTakeCountIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class subsequentMultiGet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentMultiGet_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentMultiGet_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentMultiGet_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.util.List success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalBinary.class)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentMultiGet_result.class, metaDataMap); - } - - public subsequentMultiGet_result() { - } - - public subsequentMultiGet_result( - java.util.List success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public subsequentMultiGet_result(subsequentMultiGet_result other) { - if (other.isSetSuccess()) { - java.util.List __this__success = new java.util.ArrayList(other.success.size()); - for (OptionalBinary other_element : other.success) { - __this__success.add(new OptionalBinary(other_element)); - } - this.success = __this__success; - } - } - - @Override - public subsequentMultiGet_result deepCopy() { - return new subsequentMultiGet_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(OptionalBinary elem) { - if (this.success == null) { - this.success = new java.util.ArrayList(); - } - this.success.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getSuccess() { - return this.success; - } - - public subsequentMultiGet_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof subsequentMultiGet_result) - return this.equals((subsequentMultiGet_result)that); - return false; - } - - public boolean equals(subsequentMultiGet_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(subsequentMultiGet_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentMultiGet_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class subsequentMultiGet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentMultiGet_resultStandardScheme getScheme() { - return new subsequentMultiGet_resultStandardScheme(); - } - } - - private static class subsequentMultiGet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentMultiGet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list136 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list136.size); - @org.apache.thrift.annotation.Nullable OptionalBinary _elem137; - for (int _i138 = 0; _i138 < _list136.size; ++_i138) - { - _elem137 = new OptionalBinary(); - _elem137.read(iprot); - struct.success.add(_elem137); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentMultiGet_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OptionalBinary _iter139 : struct.success) - { - _iter139.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class subsequentMultiGet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public subsequentMultiGet_resultTupleScheme getScheme() { - return new subsequentMultiGet_resultTupleScheme(); - } - } - - private static class subsequentMultiGet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (OptionalBinary _iter140 : struct.success) - { - _iter140.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list141 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); - struct.success = new java.util.ArrayList(_list141.size); - @org.apache.thrift.annotation.Nullable OptionalBinary _elem142; - for (int _i143 = 0; _i143 < _list141.size; ++_i143) - { - _elem142 = new OptionalBinary(); - _elem142.read(iprot); - struct.success.add(_elem142); - } - } - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - -} diff --git a/src/main/java/it/cavallium/rockserver/core/common/api/UpdateBegin.java b/src/main/java/it/cavallium/rockserver/core/common/api/UpdateBegin.java deleted file mode 100644 index 44eabe2..0000000 --- a/src/main/java/it/cavallium/rockserver/core/common/api/UpdateBegin.java +++ /dev/null @@ -1,501 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package it.cavallium.rockserver.core.common.api; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class UpdateBegin implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UpdateBegin"); - - private static final org.apache.thrift.protocol.TField PREVIOUS_FIELD_DESC = new org.apache.thrift.protocol.TField("previous", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updateId", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UpdateBeginStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UpdateBeginTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer previous; // optional - public long updateId; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PREVIOUS((short)1, "previous"), - UPDATE_ID((short)2, "updateId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PREVIOUS - return PREVIOUS; - case 2: // UPDATE_ID - return UPDATE_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __UPDATEID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PREVIOUS,_Fields.UPDATE_ID}; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PREVIOUS, new org.apache.thrift.meta_data.FieldMetaData("previous", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("updateId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UpdateBegin.class, metaDataMap); - } - - public UpdateBegin() { - } - - /** - * Performs a deep copy on other. - */ - public UpdateBegin(UpdateBegin other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPrevious()) { - this.previous = org.apache.thrift.TBaseHelper.copyBinary(other.previous); - } - this.updateId = other.updateId; - } - - @Override - public UpdateBegin deepCopy() { - return new UpdateBegin(this); - } - - @Override - public void clear() { - this.previous = null; - setUpdateIdIsSet(false); - this.updateId = 0; - } - - public byte[] getPrevious() { - setPrevious(org.apache.thrift.TBaseHelper.rightSize(previous)); - return previous == null ? null : previous.array(); - } - - public java.nio.ByteBuffer bufferForPrevious() { - return org.apache.thrift.TBaseHelper.copyBinary(previous); - } - - public UpdateBegin setPrevious(byte[] previous) { - this.previous = previous == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(previous.clone()); - return this; - } - - public UpdateBegin setPrevious(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer previous) { - this.previous = org.apache.thrift.TBaseHelper.copyBinary(previous); - return this; - } - - public void unsetPrevious() { - this.previous = null; - } - - /** Returns true if field previous is set (has been assigned a value) and false otherwise */ - public boolean isSetPrevious() { - return this.previous != null; - } - - public void setPreviousIsSet(boolean value) { - if (!value) { - this.previous = null; - } - } - - public long getUpdateId() { - return this.updateId; - } - - public UpdateBegin setUpdateId(long updateId) { - this.updateId = updateId; - setUpdateIdIsSet(true); - return this; - } - - public void unsetUpdateId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEID_ISSET_ID); - } - - /** Returns true if field updateId is set (has been assigned a value) and false otherwise */ - public boolean isSetUpdateId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEID_ISSET_ID); - } - - public void setUpdateIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case PREVIOUS: - if (value == null) { - unsetPrevious(); - } else { - if (value instanceof byte[]) { - setPrevious((byte[])value); - } else { - setPrevious((java.nio.ByteBuffer)value); - } - } - break; - - case UPDATE_ID: - if (value == null) { - unsetUpdateId(); - } else { - setUpdateId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case PREVIOUS: - return getPrevious(); - - case UPDATE_ID: - return getUpdateId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case PREVIOUS: - return isSetPrevious(); - case UPDATE_ID: - return isSetUpdateId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof UpdateBegin) - return this.equals((UpdateBegin)that); - return false; - } - - public boolean equals(UpdateBegin that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_previous = true && this.isSetPrevious(); - boolean that_present_previous = true && that.isSetPrevious(); - if (this_present_previous || that_present_previous) { - if (!(this_present_previous && that_present_previous)) - return false; - if (!this.previous.equals(that.previous)) - return false; - } - - boolean this_present_updateId = true && this.isSetUpdateId(); - boolean that_present_updateId = true && that.isSetUpdateId(); - if (this_present_updateId || that_present_updateId) { - if (!(this_present_updateId && that_present_updateId)) - return false; - if (this.updateId != that.updateId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetPrevious()) ? 131071 : 524287); - if (isSetPrevious()) - hashCode = hashCode * 8191 + previous.hashCode(); - - hashCode = hashCode * 8191 + ((isSetUpdateId()) ? 131071 : 524287); - if (isSetUpdateId()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updateId); - - return hashCode; - } - - @Override - public int compareTo(UpdateBegin other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetPrevious(), other.isSetPrevious()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrevious()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.previous, other.previous); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetUpdateId(), other.isSetUpdateId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUpdateId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateId, other.updateId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("UpdateBegin("); - boolean first = true; - - if (isSetPrevious()) { - sb.append("previous:"); - if (this.previous == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.previous, sb); - } - first = false; - } - if (isSetUpdateId()) { - if (!first) sb.append(", "); - sb.append("updateId:"); - sb.append(this.updateId); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class UpdateBeginStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public UpdateBeginStandardScheme getScheme() { - return new UpdateBeginStandardScheme(); - } - } - - private static class UpdateBeginStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, UpdateBegin struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PREVIOUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.previous = iprot.readBinary(); - struct.setPreviousIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // UPDATE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.updateId = iprot.readI64(); - struct.setUpdateIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, UpdateBegin struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.previous != null) { - if (struct.isSetPrevious()) { - oprot.writeFieldBegin(PREVIOUS_FIELD_DESC); - oprot.writeBinary(struct.previous); - oprot.writeFieldEnd(); - } - } - if (struct.isSetUpdateId()) { - oprot.writeFieldBegin(UPDATE_ID_FIELD_DESC); - oprot.writeI64(struct.updateId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class UpdateBeginTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public UpdateBeginTupleScheme getScheme() { - return new UpdateBeginTupleScheme(); - } - } - - private static class UpdateBeginTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, UpdateBegin struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetPrevious()) { - optionals.set(0); - } - if (struct.isSetUpdateId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPrevious()) { - oprot.writeBinary(struct.previous); - } - if (struct.isSetUpdateId()) { - oprot.writeI64(struct.updateId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, UpdateBegin struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.previous = iprot.readBinary(); - struct.setPreviousIsSet(true); - } - if (incoming.get(1)) { - struct.updateId = iprot.readI64(); - struct.setUpdateIdIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} -