TQueryCacheParam.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TQueryCacheParam implements org.apache.thrift.TBase<TQueryCacheParam, TQueryCacheParam._Fields>, java.io.Serializable, Cloneable, Comparable<TQueryCacheParam> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TQueryCacheParam");
private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("node_id", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField DIGEST_FIELD_DESC = new org.apache.thrift.protocol.TField("digest", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OUTPUT_SLOT_MAPPING_FIELD_DESC = new org.apache.thrift.protocol.TField("output_slot_mapping", org.apache.thrift.protocol.TType.MAP, (short)3);
private static final org.apache.thrift.protocol.TField TABLET_TO_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_to_range", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField FORCE_REFRESH_QUERY_CACHE_FIELD_DESC = new org.apache.thrift.protocol.TField("force_refresh_query_cache", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField ENTRY_MAX_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("entry_max_bytes", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField ENTRY_MAX_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("entry_max_rows", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TQueryCacheParamStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TQueryCacheParamTupleSchemeFactory();
public int node_id; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer digest; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,java.lang.Integer> output_slot_mapping; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.lang.String> tablet_to_range; // optional
public boolean force_refresh_query_cache; // optional
public long entry_max_bytes; // optional
public long entry_max_rows; // 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 {
NODE_ID((short)1, "node_id"),
DIGEST((short)2, "digest"),
OUTPUT_SLOT_MAPPING((short)3, "output_slot_mapping"),
TABLET_TO_RANGE((short)4, "tablet_to_range"),
FORCE_REFRESH_QUERY_CACHE((short)5, "force_refresh_query_cache"),
ENTRY_MAX_BYTES((short)6, "entry_max_bytes"),
ENTRY_MAX_ROWS((short)7, "entry_max_rows");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
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: // NODE_ID
return NODE_ID;
case 2: // DIGEST
return DIGEST;
case 3: // OUTPUT_SLOT_MAPPING
return OUTPUT_SLOT_MAPPING;
case 4: // TABLET_TO_RANGE
return TABLET_TO_RANGE;
case 5: // FORCE_REFRESH_QUERY_CACHE
return FORCE_REFRESH_QUERY_CACHE;
case 6: // ENTRY_MAX_BYTES
return ENTRY_MAX_BYTES;
case 7: // ENTRY_MAX_ROWS
return ENTRY_MAX_ROWS;
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;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __NODE_ID_ISSET_ID = 0;
private static final int __FORCE_REFRESH_QUERY_CACHE_ISSET_ID = 1;
private static final int __ENTRY_MAX_BYTES_ISSET_ID = 2;
private static final int __ENTRY_MAX_ROWS_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NODE_ID,_Fields.DIGEST,_Fields.OUTPUT_SLOT_MAPPING,_Fields.TABLET_TO_RANGE,_Fields.FORCE_REFRESH_QUERY_CACHE,_Fields.ENTRY_MAX_BYTES,_Fields.ENTRY_MAX_ROWS};
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.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("node_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DIGEST, new org.apache.thrift.meta_data.FieldMetaData("digest", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.OUTPUT_SLOT_MAPPING, new org.apache.thrift.meta_data.FieldMetaData("output_slot_mapping", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
tmpMap.put(_Fields.TABLET_TO_RANGE, new org.apache.thrift.meta_data.FieldMetaData("tablet_to_range", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.FORCE_REFRESH_QUERY_CACHE, new org.apache.thrift.meta_data.FieldMetaData("force_refresh_query_cache", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.ENTRY_MAX_BYTES, new org.apache.thrift.meta_data.FieldMetaData("entry_max_bytes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.ENTRY_MAX_ROWS, new org.apache.thrift.meta_data.FieldMetaData("entry_max_rows", 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(TQueryCacheParam.class, metaDataMap);
}
public TQueryCacheParam() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TQueryCacheParam(TQueryCacheParam other) {
__isset_bitfield = other.__isset_bitfield;
this.node_id = other.node_id;
if (other.isSetDigest()) {
this.digest = org.apache.thrift.TBaseHelper.copyBinary(other.digest);
}
if (other.isSetOutputSlotMapping()) {
java.util.Map<java.lang.Integer,java.lang.Integer> __this__output_slot_mapping = new java.util.HashMap<java.lang.Integer,java.lang.Integer>(other.output_slot_mapping);
this.output_slot_mapping = __this__output_slot_mapping;
}
if (other.isSetTabletToRange()) {
java.util.Map<java.lang.Long,java.lang.String> __this__tablet_to_range = new java.util.HashMap<java.lang.Long,java.lang.String>(other.tablet_to_range);
this.tablet_to_range = __this__tablet_to_range;
}
this.force_refresh_query_cache = other.force_refresh_query_cache;
this.entry_max_bytes = other.entry_max_bytes;
this.entry_max_rows = other.entry_max_rows;
}
public TQueryCacheParam deepCopy() {
return new TQueryCacheParam(this);
}
@Override
public void clear() {
setNodeIdIsSet(false);
this.node_id = 0;
this.digest = null;
this.output_slot_mapping = null;
this.tablet_to_range = null;
setForceRefreshQueryCacheIsSet(false);
this.force_refresh_query_cache = false;
setEntryMaxBytesIsSet(false);
this.entry_max_bytes = 0;
setEntryMaxRowsIsSet(false);
this.entry_max_rows = 0;
}
public int getNodeId() {
return this.node_id;
}
public TQueryCacheParam setNodeId(int node_id) {
this.node_id = node_id;
setNodeIdIsSet(true);
return this;
}
public void unsetNodeId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NODE_ID_ISSET_ID);
}
/** Returns true if field node_id is set (has been assigned a value) and false otherwise */
public boolean isSetNodeId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NODE_ID_ISSET_ID);
}
public void setNodeIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NODE_ID_ISSET_ID, value);
}
public byte[] getDigest() {
setDigest(org.apache.thrift.TBaseHelper.rightSize(digest));
return digest == null ? null : digest.array();
}
public java.nio.ByteBuffer bufferForDigest() {
return org.apache.thrift.TBaseHelper.copyBinary(digest);
}
public TQueryCacheParam setDigest(byte[] digest) {
this.digest = digest == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(digest.clone());
return this;
}
public TQueryCacheParam setDigest(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer digest) {
this.digest = org.apache.thrift.TBaseHelper.copyBinary(digest);
return this;
}
public void unsetDigest() {
this.digest = null;
}
/** Returns true if field digest is set (has been assigned a value) and false otherwise */
public boolean isSetDigest() {
return this.digest != null;
}
public void setDigestIsSet(boolean value) {
if (!value) {
this.digest = null;
}
}
public int getOutputSlotMappingSize() {
return (this.output_slot_mapping == null) ? 0 : this.output_slot_mapping.size();
}
public void putToOutputSlotMapping(int key, int val) {
if (this.output_slot_mapping == null) {
this.output_slot_mapping = new java.util.HashMap<java.lang.Integer,java.lang.Integer>();
}
this.output_slot_mapping.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.Integer,java.lang.Integer> getOutputSlotMapping() {
return this.output_slot_mapping;
}
public TQueryCacheParam setOutputSlotMapping(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,java.lang.Integer> output_slot_mapping) {
this.output_slot_mapping = output_slot_mapping;
return this;
}
public void unsetOutputSlotMapping() {
this.output_slot_mapping = null;
}
/** Returns true if field output_slot_mapping is set (has been assigned a value) and false otherwise */
public boolean isSetOutputSlotMapping() {
return this.output_slot_mapping != null;
}
public void setOutputSlotMappingIsSet(boolean value) {
if (!value) {
this.output_slot_mapping = null;
}
}
public int getTabletToRangeSize() {
return (this.tablet_to_range == null) ? 0 : this.tablet_to_range.size();
}
public void putToTabletToRange(long key, java.lang.String val) {
if (this.tablet_to_range == null) {
this.tablet_to_range = new java.util.HashMap<java.lang.Long,java.lang.String>();
}
this.tablet_to_range.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.Long,java.lang.String> getTabletToRange() {
return this.tablet_to_range;
}
public TQueryCacheParam setTabletToRange(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.lang.String> tablet_to_range) {
this.tablet_to_range = tablet_to_range;
return this;
}
public void unsetTabletToRange() {
this.tablet_to_range = null;
}
/** Returns true if field tablet_to_range is set (has been assigned a value) and false otherwise */
public boolean isSetTabletToRange() {
return this.tablet_to_range != null;
}
public void setTabletToRangeIsSet(boolean value) {
if (!value) {
this.tablet_to_range = null;
}
}
public boolean isForceRefreshQueryCache() {
return this.force_refresh_query_cache;
}
public TQueryCacheParam setForceRefreshQueryCache(boolean force_refresh_query_cache) {
this.force_refresh_query_cache = force_refresh_query_cache;
setForceRefreshQueryCacheIsSet(true);
return this;
}
public void unsetForceRefreshQueryCache() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FORCE_REFRESH_QUERY_CACHE_ISSET_ID);
}
/** Returns true if field force_refresh_query_cache is set (has been assigned a value) and false otherwise */
public boolean isSetForceRefreshQueryCache() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FORCE_REFRESH_QUERY_CACHE_ISSET_ID);
}
public void setForceRefreshQueryCacheIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FORCE_REFRESH_QUERY_CACHE_ISSET_ID, value);
}
public long getEntryMaxBytes() {
return this.entry_max_bytes;
}
public TQueryCacheParam setEntryMaxBytes(long entry_max_bytes) {
this.entry_max_bytes = entry_max_bytes;
setEntryMaxBytesIsSet(true);
return this;
}
public void unsetEntryMaxBytes() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRY_MAX_BYTES_ISSET_ID);
}
/** Returns true if field entry_max_bytes is set (has been assigned a value) and false otherwise */
public boolean isSetEntryMaxBytes() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRY_MAX_BYTES_ISSET_ID);
}
public void setEntryMaxBytesIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRY_MAX_BYTES_ISSET_ID, value);
}
public long getEntryMaxRows() {
return this.entry_max_rows;
}
public TQueryCacheParam setEntryMaxRows(long entry_max_rows) {
this.entry_max_rows = entry_max_rows;
setEntryMaxRowsIsSet(true);
return this;
}
public void unsetEntryMaxRows() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRY_MAX_ROWS_ISSET_ID);
}
/** Returns true if field entry_max_rows is set (has been assigned a value) and false otherwise */
public boolean isSetEntryMaxRows() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRY_MAX_ROWS_ISSET_ID);
}
public void setEntryMaxRowsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRY_MAX_ROWS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NODE_ID:
if (value == null) {
unsetNodeId();
} else {
setNodeId((java.lang.Integer)value);
}
break;
case DIGEST:
if (value == null) {
unsetDigest();
} else {
if (value instanceof byte[]) {
setDigest((byte[])value);
} else {
setDigest((java.nio.ByteBuffer)value);
}
}
break;
case OUTPUT_SLOT_MAPPING:
if (value == null) {
unsetOutputSlotMapping();
} else {
setOutputSlotMapping((java.util.Map<java.lang.Integer,java.lang.Integer>)value);
}
break;
case TABLET_TO_RANGE:
if (value == null) {
unsetTabletToRange();
} else {
setTabletToRange((java.util.Map<java.lang.Long,java.lang.String>)value);
}
break;
case FORCE_REFRESH_QUERY_CACHE:
if (value == null) {
unsetForceRefreshQueryCache();
} else {
setForceRefreshQueryCache((java.lang.Boolean)value);
}
break;
case ENTRY_MAX_BYTES:
if (value == null) {
unsetEntryMaxBytes();
} else {
setEntryMaxBytes((java.lang.Long)value);
}
break;
case ENTRY_MAX_ROWS:
if (value == null) {
unsetEntryMaxRows();
} else {
setEntryMaxRows((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NODE_ID:
return getNodeId();
case DIGEST:
return getDigest();
case OUTPUT_SLOT_MAPPING:
return getOutputSlotMapping();
case TABLET_TO_RANGE:
return getTabletToRange();
case FORCE_REFRESH_QUERY_CACHE:
return isForceRefreshQueryCache();
case ENTRY_MAX_BYTES:
return getEntryMaxBytes();
case ENTRY_MAX_ROWS:
return getEntryMaxRows();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case NODE_ID:
return isSetNodeId();
case DIGEST:
return isSetDigest();
case OUTPUT_SLOT_MAPPING:
return isSetOutputSlotMapping();
case TABLET_TO_RANGE:
return isSetTabletToRange();
case FORCE_REFRESH_QUERY_CACHE:
return isSetForceRefreshQueryCache();
case ENTRY_MAX_BYTES:
return isSetEntryMaxBytes();
case ENTRY_MAX_ROWS:
return isSetEntryMaxRows();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TQueryCacheParam)
return this.equals((TQueryCacheParam)that);
return false;
}
public boolean equals(TQueryCacheParam that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_node_id = true && this.isSetNodeId();
boolean that_present_node_id = true && that.isSetNodeId();
if (this_present_node_id || that_present_node_id) {
if (!(this_present_node_id && that_present_node_id))
return false;
if (this.node_id != that.node_id)
return false;
}
boolean this_present_digest = true && this.isSetDigest();
boolean that_present_digest = true && that.isSetDigest();
if (this_present_digest || that_present_digest) {
if (!(this_present_digest && that_present_digest))
return false;
if (!this.digest.equals(that.digest))
return false;
}
boolean this_present_output_slot_mapping = true && this.isSetOutputSlotMapping();
boolean that_present_output_slot_mapping = true && that.isSetOutputSlotMapping();
if (this_present_output_slot_mapping || that_present_output_slot_mapping) {
if (!(this_present_output_slot_mapping && that_present_output_slot_mapping))
return false;
if (!this.output_slot_mapping.equals(that.output_slot_mapping))
return false;
}
boolean this_present_tablet_to_range = true && this.isSetTabletToRange();
boolean that_present_tablet_to_range = true && that.isSetTabletToRange();
if (this_present_tablet_to_range || that_present_tablet_to_range) {
if (!(this_present_tablet_to_range && that_present_tablet_to_range))
return false;
if (!this.tablet_to_range.equals(that.tablet_to_range))
return false;
}
boolean this_present_force_refresh_query_cache = true && this.isSetForceRefreshQueryCache();
boolean that_present_force_refresh_query_cache = true && that.isSetForceRefreshQueryCache();
if (this_present_force_refresh_query_cache || that_present_force_refresh_query_cache) {
if (!(this_present_force_refresh_query_cache && that_present_force_refresh_query_cache))
return false;
if (this.force_refresh_query_cache != that.force_refresh_query_cache)
return false;
}
boolean this_present_entry_max_bytes = true && this.isSetEntryMaxBytes();
boolean that_present_entry_max_bytes = true && that.isSetEntryMaxBytes();
if (this_present_entry_max_bytes || that_present_entry_max_bytes) {
if (!(this_present_entry_max_bytes && that_present_entry_max_bytes))
return false;
if (this.entry_max_bytes != that.entry_max_bytes)
return false;
}
boolean this_present_entry_max_rows = true && this.isSetEntryMaxRows();
boolean that_present_entry_max_rows = true && that.isSetEntryMaxRows();
if (this_present_entry_max_rows || that_present_entry_max_rows) {
if (!(this_present_entry_max_rows && that_present_entry_max_rows))
return false;
if (this.entry_max_rows != that.entry_max_rows)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetNodeId()) ? 131071 : 524287);
if (isSetNodeId())
hashCode = hashCode * 8191 + node_id;
hashCode = hashCode * 8191 + ((isSetDigest()) ? 131071 : 524287);
if (isSetDigest())
hashCode = hashCode * 8191 + digest.hashCode();
hashCode = hashCode * 8191 + ((isSetOutputSlotMapping()) ? 131071 : 524287);
if (isSetOutputSlotMapping())
hashCode = hashCode * 8191 + output_slot_mapping.hashCode();
hashCode = hashCode * 8191 + ((isSetTabletToRange()) ? 131071 : 524287);
if (isSetTabletToRange())
hashCode = hashCode * 8191 + tablet_to_range.hashCode();
hashCode = hashCode * 8191 + ((isSetForceRefreshQueryCache()) ? 131071 : 524287);
if (isSetForceRefreshQueryCache())
hashCode = hashCode * 8191 + ((force_refresh_query_cache) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetEntryMaxBytes()) ? 131071 : 524287);
if (isSetEntryMaxBytes())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entry_max_bytes);
hashCode = hashCode * 8191 + ((isSetEntryMaxRows()) ? 131071 : 524287);
if (isSetEntryMaxRows())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entry_max_rows);
return hashCode;
}
@Override
public int compareTo(TQueryCacheParam other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetNodeId(), other.isSetNodeId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNodeId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.node_id, other.node_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDigest(), other.isSetDigest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDigest()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.digest, other.digest);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOutputSlotMapping(), other.isSetOutputSlotMapping());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOutputSlotMapping()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output_slot_mapping, other.output_slot_mapping);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTabletToRange(), other.isSetTabletToRange());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTabletToRange()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_to_range, other.tablet_to_range);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetForceRefreshQueryCache(), other.isSetForceRefreshQueryCache());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetForceRefreshQueryCache()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.force_refresh_query_cache, other.force_refresh_query_cache);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEntryMaxBytes(), other.isSetEntryMaxBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEntryMaxBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entry_max_bytes, other.entry_max_bytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEntryMaxRows(), other.isSetEntryMaxRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEntryMaxRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entry_max_rows, other.entry_max_rows);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TQueryCacheParam(");
boolean first = true;
if (isSetNodeId()) {
sb.append("node_id:");
sb.append(this.node_id);
first = false;
}
if (isSetDigest()) {
if (!first) sb.append(", ");
sb.append("digest:");
if (this.digest == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.digest, sb);
}
first = false;
}
if (isSetOutputSlotMapping()) {
if (!first) sb.append(", ");
sb.append("output_slot_mapping:");
if (this.output_slot_mapping == null) {
sb.append("null");
} else {
sb.append(this.output_slot_mapping);
}
first = false;
}
if (isSetTabletToRange()) {
if (!first) sb.append(", ");
sb.append("tablet_to_range:");
if (this.tablet_to_range == null) {
sb.append("null");
} else {
sb.append(this.tablet_to_range);
}
first = false;
}
if (isSetForceRefreshQueryCache()) {
if (!first) sb.append(", ");
sb.append("force_refresh_query_cache:");
sb.append(this.force_refresh_query_cache);
first = false;
}
if (isSetEntryMaxBytes()) {
if (!first) sb.append(", ");
sb.append("entry_max_bytes:");
sb.append(this.entry_max_bytes);
first = false;
}
if (isSetEntryMaxRows()) {
if (!first) sb.append(", ");
sb.append("entry_max_rows:");
sb.append(this.entry_max_rows);
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 TQueryCacheParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TQueryCacheParamStandardScheme getScheme() {
return new TQueryCacheParamStandardScheme();
}
}
private static class TQueryCacheParamStandardScheme extends org.apache.thrift.scheme.StandardScheme<TQueryCacheParam> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TQueryCacheParam 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: // NODE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.node_id = iprot.readI32();
struct.setNodeIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DIGEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.digest = iprot.readBinary();
struct.setDigestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OUTPUT_SLOT_MAPPING
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
struct.output_slot_mapping = new java.util.HashMap<java.lang.Integer,java.lang.Integer>(2*_map0.size);
int _key1;
int _val2;
for (int _i3 = 0; _i3 < _map0.size; ++_i3)
{
_key1 = iprot.readI32();
_val2 = iprot.readI32();
struct.output_slot_mapping.put(_key1, _val2);
}
iprot.readMapEnd();
}
struct.setOutputSlotMappingIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TABLET_TO_RANGE
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin();
struct.tablet_to_range = new java.util.HashMap<java.lang.Long,java.lang.String>(2*_map4.size);
long _key5;
@org.apache.thrift.annotation.Nullable java.lang.String _val6;
for (int _i7 = 0; _i7 < _map4.size; ++_i7)
{
_key5 = iprot.readI64();
_val6 = iprot.readString();
struct.tablet_to_range.put(_key5, _val6);
}
iprot.readMapEnd();
}
struct.setTabletToRangeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // FORCE_REFRESH_QUERY_CACHE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.force_refresh_query_cache = iprot.readBool();
struct.setForceRefreshQueryCacheIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // ENTRY_MAX_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.entry_max_bytes = iprot.readI64();
struct.setEntryMaxBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // ENTRY_MAX_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.entry_max_rows = iprot.readI64();
struct.setEntryMaxRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TQueryCacheParam struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetNodeId()) {
oprot.writeFieldBegin(NODE_ID_FIELD_DESC);
oprot.writeI32(struct.node_id);
oprot.writeFieldEnd();
}
if (struct.digest != null) {
if (struct.isSetDigest()) {
oprot.writeFieldBegin(DIGEST_FIELD_DESC);
oprot.writeBinary(struct.digest);
oprot.writeFieldEnd();
}
}
if (struct.output_slot_mapping != null) {
if (struct.isSetOutputSlotMapping()) {
oprot.writeFieldBegin(OUTPUT_SLOT_MAPPING_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I32, struct.output_slot_mapping.size()));
for (java.util.Map.Entry<java.lang.Integer, java.lang.Integer> _iter8 : struct.output_slot_mapping.entrySet())
{
oprot.writeI32(_iter8.getKey());
oprot.writeI32(_iter8.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.tablet_to_range != null) {
if (struct.isSetTabletToRange()) {
oprot.writeFieldBegin(TABLET_TO_RANGE_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.tablet_to_range.size()));
for (java.util.Map.Entry<java.lang.Long, java.lang.String> _iter9 : struct.tablet_to_range.entrySet())
{
oprot.writeI64(_iter9.getKey());
oprot.writeString(_iter9.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetForceRefreshQueryCache()) {
oprot.writeFieldBegin(FORCE_REFRESH_QUERY_CACHE_FIELD_DESC);
oprot.writeBool(struct.force_refresh_query_cache);
oprot.writeFieldEnd();
}
if (struct.isSetEntryMaxBytes()) {
oprot.writeFieldBegin(ENTRY_MAX_BYTES_FIELD_DESC);
oprot.writeI64(struct.entry_max_bytes);
oprot.writeFieldEnd();
}
if (struct.isSetEntryMaxRows()) {
oprot.writeFieldBegin(ENTRY_MAX_ROWS_FIELD_DESC);
oprot.writeI64(struct.entry_max_rows);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TQueryCacheParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TQueryCacheParamTupleScheme getScheme() {
return new TQueryCacheParamTupleScheme();
}
}
private static class TQueryCacheParamTupleScheme extends org.apache.thrift.scheme.TupleScheme<TQueryCacheParam> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TQueryCacheParam 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.isSetNodeId()) {
optionals.set(0);
}
if (struct.isSetDigest()) {
optionals.set(1);
}
if (struct.isSetOutputSlotMapping()) {
optionals.set(2);
}
if (struct.isSetTabletToRange()) {
optionals.set(3);
}
if (struct.isSetForceRefreshQueryCache()) {
optionals.set(4);
}
if (struct.isSetEntryMaxBytes()) {
optionals.set(5);
}
if (struct.isSetEntryMaxRows()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetNodeId()) {
oprot.writeI32(struct.node_id);
}
if (struct.isSetDigest()) {
oprot.writeBinary(struct.digest);
}
if (struct.isSetOutputSlotMapping()) {
{
oprot.writeI32(struct.output_slot_mapping.size());
for (java.util.Map.Entry<java.lang.Integer, java.lang.Integer> _iter10 : struct.output_slot_mapping.entrySet())
{
oprot.writeI32(_iter10.getKey());
oprot.writeI32(_iter10.getValue());
}
}
}
if (struct.isSetTabletToRange()) {
{
oprot.writeI32(struct.tablet_to_range.size());
for (java.util.Map.Entry<java.lang.Long, java.lang.String> _iter11 : struct.tablet_to_range.entrySet())
{
oprot.writeI64(_iter11.getKey());
oprot.writeString(_iter11.getValue());
}
}
}
if (struct.isSetForceRefreshQueryCache()) {
oprot.writeBool(struct.force_refresh_query_cache);
}
if (struct.isSetEntryMaxBytes()) {
oprot.writeI64(struct.entry_max_bytes);
}
if (struct.isSetEntryMaxRows()) {
oprot.writeI64(struct.entry_max_rows);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TQueryCacheParam struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.node_id = iprot.readI32();
struct.setNodeIdIsSet(true);
}
if (incoming.get(1)) {
struct.digest = iprot.readBinary();
struct.setDigestIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I32);
struct.output_slot_mapping = new java.util.HashMap<java.lang.Integer,java.lang.Integer>(2*_map12.size);
int _key13;
int _val14;
for (int _i15 = 0; _i15 < _map12.size; ++_i15)
{
_key13 = iprot.readI32();
_val14 = iprot.readI32();
struct.output_slot_mapping.put(_key13, _val14);
}
}
struct.setOutputSlotMappingIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING);
struct.tablet_to_range = new java.util.HashMap<java.lang.Long,java.lang.String>(2*_map16.size);
long _key17;
@org.apache.thrift.annotation.Nullable java.lang.String _val18;
for (int _i19 = 0; _i19 < _map16.size; ++_i19)
{
_key17 = iprot.readI64();
_val18 = iprot.readString();
struct.tablet_to_range.put(_key17, _val18);
}
}
struct.setTabletToRangeIsSet(true);
}
if (incoming.get(4)) {
struct.force_refresh_query_cache = iprot.readBool();
struct.setForceRefreshQueryCacheIsSet(true);
}
if (incoming.get(5)) {
struct.entry_max_bytes = iprot.readI64();
struct.setEntryMaxBytesIsSet(true);
}
if (incoming.get(6)) {
struct.entry_max_rows = iprot.readI64();
struct.setEntryMaxRowsIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> 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();
}
}