TWarmUpCacheAsyncRequest.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 TWarmUpCacheAsyncRequest implements org.apache.thrift.TBase<TWarmUpCacheAsyncRequest, TWarmUpCacheAsyncRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TWarmUpCacheAsyncRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TWarmUpCacheAsyncRequest");
private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField BRPC_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("brpc_port", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField TABLET_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_ids", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TWarmUpCacheAsyncRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TWarmUpCacheAsyncRequestTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String host; // required
public int brpc_port; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablet_ids; // 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 {
HOST((short)1, "host"),
BRPC_PORT((short)2, "brpc_port"),
TABLET_IDS((short)3, "tablet_ids");
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: // HOST
return HOST;
case 2: // BRPC_PORT
return BRPC_PORT;
case 3: // TABLET_IDS
return TABLET_IDS;
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 __BRPC_PORT_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.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BRPC_PORT, new org.apache.thrift.meta_data.FieldMetaData("brpc_port", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TABLET_IDS, new org.apache.thrift.meta_data.FieldMetaData("tablet_ids", 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.I64))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TWarmUpCacheAsyncRequest.class, metaDataMap);
}
public TWarmUpCacheAsyncRequest() {
}
public TWarmUpCacheAsyncRequest(
java.lang.String host,
int brpc_port,
java.util.List<java.lang.Long> tablet_ids)
{
this();
this.host = host;
this.brpc_port = brpc_port;
setBrpcPortIsSet(true);
this.tablet_ids = tablet_ids;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TWarmUpCacheAsyncRequest(TWarmUpCacheAsyncRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetHost()) {
this.host = other.host;
}
this.brpc_port = other.brpc_port;
if (other.isSetTabletIds()) {
java.util.List<java.lang.Long> __this__tablet_ids = new java.util.ArrayList<java.lang.Long>(other.tablet_ids);
this.tablet_ids = __this__tablet_ids;
}
}
public TWarmUpCacheAsyncRequest deepCopy() {
return new TWarmUpCacheAsyncRequest(this);
}
@Override
public void clear() {
this.host = null;
setBrpcPortIsSet(false);
this.brpc_port = 0;
this.tablet_ids = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getHost() {
return this.host;
}
public TWarmUpCacheAsyncRequest setHost(@org.apache.thrift.annotation.Nullable java.lang.String host) {
this.host = host;
return this;
}
public void unsetHost() {
this.host = null;
}
/** Returns true if field host is set (has been assigned a value) and false otherwise */
public boolean isSetHost() {
return this.host != null;
}
public void setHostIsSet(boolean value) {
if (!value) {
this.host = null;
}
}
public int getBrpcPort() {
return this.brpc_port;
}
public TWarmUpCacheAsyncRequest setBrpcPort(int brpc_port) {
this.brpc_port = brpc_port;
setBrpcPortIsSet(true);
return this;
}
public void unsetBrpcPort() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BRPC_PORT_ISSET_ID);
}
/** Returns true if field brpc_port is set (has been assigned a value) and false otherwise */
public boolean isSetBrpcPort() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BRPC_PORT_ISSET_ID);
}
public void setBrpcPortIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BRPC_PORT_ISSET_ID, value);
}
public int getTabletIdsSize() {
return (this.tablet_ids == null) ? 0 : this.tablet_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getTabletIdsIterator() {
return (this.tablet_ids == null) ? null : this.tablet_ids.iterator();
}
public void addToTabletIds(long elem) {
if (this.tablet_ids == null) {
this.tablet_ids = new java.util.ArrayList<java.lang.Long>();
}
this.tablet_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getTabletIds() {
return this.tablet_ids;
}
public TWarmUpCacheAsyncRequest setTabletIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablet_ids) {
this.tablet_ids = tablet_ids;
return this;
}
public void unsetTabletIds() {
this.tablet_ids = null;
}
/** Returns true if field tablet_ids is set (has been assigned a value) and false otherwise */
public boolean isSetTabletIds() {
return this.tablet_ids != null;
}
public void setTabletIdsIsSet(boolean value) {
if (!value) {
this.tablet_ids = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case HOST:
if (value == null) {
unsetHost();
} else {
setHost((java.lang.String)value);
}
break;
case BRPC_PORT:
if (value == null) {
unsetBrpcPort();
} else {
setBrpcPort((java.lang.Integer)value);
}
break;
case TABLET_IDS:
if (value == null) {
unsetTabletIds();
} else {
setTabletIds((java.util.List<java.lang.Long>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST:
return getHost();
case BRPC_PORT:
return getBrpcPort();
case TABLET_IDS:
return getTabletIds();
}
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 HOST:
return isSetHost();
case BRPC_PORT:
return isSetBrpcPort();
case TABLET_IDS:
return isSetTabletIds();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TWarmUpCacheAsyncRequest)
return this.equals((TWarmUpCacheAsyncRequest)that);
return false;
}
public boolean equals(TWarmUpCacheAsyncRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_host = true && this.isSetHost();
boolean that_present_host = true && that.isSetHost();
if (this_present_host || that_present_host) {
if (!(this_present_host && that_present_host))
return false;
if (!this.host.equals(that.host))
return false;
}
boolean this_present_brpc_port = true;
boolean that_present_brpc_port = true;
if (this_present_brpc_port || that_present_brpc_port) {
if (!(this_present_brpc_port && that_present_brpc_port))
return false;
if (this.brpc_port != that.brpc_port)
return false;
}
boolean this_present_tablet_ids = true && this.isSetTabletIds();
boolean that_present_tablet_ids = true && that.isSetTabletIds();
if (this_present_tablet_ids || that_present_tablet_ids) {
if (!(this_present_tablet_ids && that_present_tablet_ids))
return false;
if (!this.tablet_ids.equals(that.tablet_ids))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetHost()) ? 131071 : 524287);
if (isSetHost())
hashCode = hashCode * 8191 + host.hashCode();
hashCode = hashCode * 8191 + brpc_port;
hashCode = hashCode * 8191 + ((isSetTabletIds()) ? 131071 : 524287);
if (isSetTabletIds())
hashCode = hashCode * 8191 + tablet_ids.hashCode();
return hashCode;
}
@Override
public int compareTo(TWarmUpCacheAsyncRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetHost(), other.isSetHost());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHost()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBrpcPort(), other.isSetBrpcPort());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBrpcPort()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brpc_port, other.brpc_port);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTabletIds(), other.isSetTabletIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTabletIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_ids, other.tablet_ids);
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("TWarmUpCacheAsyncRequest(");
boolean first = true;
sb.append("host:");
if (this.host == null) {
sb.append("null");
} else {
sb.append(this.host);
}
first = false;
if (!first) sb.append(", ");
sb.append("brpc_port:");
sb.append(this.brpc_port);
first = false;
if (!first) sb.append(", ");
sb.append("tablet_ids:");
if (this.tablet_ids == null) {
sb.append("null");
} else {
sb.append(this.tablet_ids);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (host == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'host' was not present! Struct: " + toString());
}
// alas, we cannot check 'brpc_port' because it's a primitive and you chose the non-beans generator.
if (tablet_ids == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablet_ids' 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 TWarmUpCacheAsyncRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TWarmUpCacheAsyncRequestStandardScheme getScheme() {
return new TWarmUpCacheAsyncRequestStandardScheme();
}
}
private static class TWarmUpCacheAsyncRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TWarmUpCacheAsyncRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TWarmUpCacheAsyncRequest 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: // HOST
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.host = iprot.readString();
struct.setHostIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // BRPC_PORT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.brpc_port = iprot.readI32();
struct.setBrpcPortIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TABLET_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list72 = iprot.readListBegin();
struct.tablet_ids = new java.util.ArrayList<java.lang.Long>(_list72.size);
long _elem73;
for (int _i74 = 0; _i74 < _list72.size; ++_i74)
{
_elem73 = iprot.readI64();
struct.tablet_ids.add(_elem73);
}
iprot.readListEnd();
}
struct.setTabletIdsIsSet(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.isSetBrpcPort()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'brpc_port' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TWarmUpCacheAsyncRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.host != null) {
oprot.writeFieldBegin(HOST_FIELD_DESC);
oprot.writeString(struct.host);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BRPC_PORT_FIELD_DESC);
oprot.writeI32(struct.brpc_port);
oprot.writeFieldEnd();
if (struct.tablet_ids != null) {
oprot.writeFieldBegin(TABLET_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.tablet_ids.size()));
for (long _iter75 : struct.tablet_ids)
{
oprot.writeI64(_iter75);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TWarmUpCacheAsyncRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TWarmUpCacheAsyncRequestTupleScheme getScheme() {
return new TWarmUpCacheAsyncRequestTupleScheme();
}
}
private static class TWarmUpCacheAsyncRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TWarmUpCacheAsyncRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TWarmUpCacheAsyncRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.host);
oprot.writeI32(struct.brpc_port);
{
oprot.writeI32(struct.tablet_ids.size());
for (long _iter76 : struct.tablet_ids)
{
oprot.writeI64(_iter76);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TWarmUpCacheAsyncRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.host = iprot.readString();
struct.setHostIsSet(true);
struct.brpc_port = iprot.readI32();
struct.setBrpcPortIsSet(true);
{
org.apache.thrift.protocol.TList _list77 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.tablet_ids = new java.util.ArrayList<java.lang.Long>(_list77.size);
long _elem78;
for (int _i79 = 0; _i79 < _list77.size; ++_i79)
{
_elem78 = iprot.readI64();
struct.tablet_ids.add(_elem78);
}
}
struct.setTabletIdsIsSet(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();
}
}