TTxnLoadInfo.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 TTxnLoadInfo implements org.apache.thrift.TBase<TTxnLoadInfo, TTxnLoadInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TTxnLoadInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTxnLoadInfo");
private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dbId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField TIMEOUT_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutTimestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField ALL_SUB_TXN_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("allSubTxnNum", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField SUB_TXN_INFOS_FIELD_DESC = new org.apache.thrift.protocol.TField("subTxnInfos", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TTxnLoadInfoStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TTxnLoadInfoTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String label; // optional
public long dbId; // optional
public long txnId; // optional
public long timeoutTimestamp; // optional
public long allSubTxnNum; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TSubTxnInfo> subTxnInfos; // 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 {
LABEL((short)1, "label"),
DB_ID((short)2, "dbId"),
TXN_ID((short)3, "txnId"),
TIMEOUT_TIMESTAMP((short)4, "timeoutTimestamp"),
ALL_SUB_TXN_NUM((short)5, "allSubTxnNum"),
SUB_TXN_INFOS((short)6, "subTxnInfos");
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: // LABEL
return LABEL;
case 2: // DB_ID
return DB_ID;
case 3: // TXN_ID
return TXN_ID;
case 4: // TIMEOUT_TIMESTAMP
return TIMEOUT_TIMESTAMP;
case 5: // ALL_SUB_TXN_NUM
return ALL_SUB_TXN_NUM;
case 6: // SUB_TXN_INFOS
return SUB_TXN_INFOS;
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 __DBID_ISSET_ID = 0;
private static final int __TXNID_ISSET_ID = 1;
private static final int __TIMEOUTTIMESTAMP_ISSET_ID = 2;
private static final int __ALLSUBTXNNUM_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.LABEL,_Fields.DB_ID,_Fields.TXN_ID,_Fields.TIMEOUT_TIMESTAMP,_Fields.ALL_SUB_TXN_NUM,_Fields.SUB_TXN_INFOS};
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.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("dbId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TIMEOUT_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timeoutTimestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.ALL_SUB_TXN_NUM, new org.apache.thrift.meta_data.FieldMetaData("allSubTxnNum", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SUB_TXN_INFOS, new org.apache.thrift.meta_data.FieldMetaData("subTxnInfos", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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, TSubTxnInfo.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTxnLoadInfo.class, metaDataMap);
}
public TTxnLoadInfo() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TTxnLoadInfo(TTxnLoadInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetLabel()) {
this.label = other.label;
}
this.dbId = other.dbId;
this.txnId = other.txnId;
this.timeoutTimestamp = other.timeoutTimestamp;
this.allSubTxnNum = other.allSubTxnNum;
if (other.isSetSubTxnInfos()) {
java.util.List<TSubTxnInfo> __this__subTxnInfos = new java.util.ArrayList<TSubTxnInfo>(other.subTxnInfos.size());
for (TSubTxnInfo other_element : other.subTxnInfos) {
__this__subTxnInfos.add(new TSubTxnInfo(other_element));
}
this.subTxnInfos = __this__subTxnInfos;
}
}
public TTxnLoadInfo deepCopy() {
return new TTxnLoadInfo(this);
}
@Override
public void clear() {
this.label = null;
setDbIdIsSet(false);
this.dbId = 0;
setTxnIdIsSet(false);
this.txnId = 0;
setTimeoutTimestampIsSet(false);
this.timeoutTimestamp = 0;
setAllSubTxnNumIsSet(false);
this.allSubTxnNum = 0;
this.subTxnInfos = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getLabel() {
return this.label;
}
public TTxnLoadInfo setLabel(@org.apache.thrift.annotation.Nullable java.lang.String label) {
this.label = label;
return this;
}
public void unsetLabel() {
this.label = null;
}
/** Returns true if field label is set (has been assigned a value) and false otherwise */
public boolean isSetLabel() {
return this.label != null;
}
public void setLabelIsSet(boolean value) {
if (!value) {
this.label = null;
}
}
public long getDbId() {
return this.dbId;
}
public TTxnLoadInfo setDbId(long dbId) {
this.dbId = dbId;
setDbIdIsSet(true);
return this;
}
public void unsetDbId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DBID_ISSET_ID);
}
/** Returns true if field dbId is set (has been assigned a value) and false otherwise */
public boolean isSetDbId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DBID_ISSET_ID);
}
public void setDbIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DBID_ISSET_ID, value);
}
public long getTxnId() {
return this.txnId;
}
public TTxnLoadInfo setTxnId(long txnId) {
this.txnId = txnId;
setTxnIdIsSet(true);
return this;
}
public void unsetTxnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
}
/** Returns true if field txnId is set (has been assigned a value) and false otherwise */
public boolean isSetTxnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
}
public void setTxnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
}
public long getTimeoutTimestamp() {
return this.timeoutTimestamp;
}
public TTxnLoadInfo setTimeoutTimestamp(long timeoutTimestamp) {
this.timeoutTimestamp = timeoutTimestamp;
setTimeoutTimestampIsSet(true);
return this;
}
public void unsetTimeoutTimestamp() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTTIMESTAMP_ISSET_ID);
}
/** Returns true if field timeoutTimestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimeoutTimestamp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTTIMESTAMP_ISSET_ID);
}
public void setTimeoutTimestampIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTTIMESTAMP_ISSET_ID, value);
}
public long getAllSubTxnNum() {
return this.allSubTxnNum;
}
public TTxnLoadInfo setAllSubTxnNum(long allSubTxnNum) {
this.allSubTxnNum = allSubTxnNum;
setAllSubTxnNumIsSet(true);
return this;
}
public void unsetAllSubTxnNum() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ALLSUBTXNNUM_ISSET_ID);
}
/** Returns true if field allSubTxnNum is set (has been assigned a value) and false otherwise */
public boolean isSetAllSubTxnNum() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ALLSUBTXNNUM_ISSET_ID);
}
public void setAllSubTxnNumIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ALLSUBTXNNUM_ISSET_ID, value);
}
public int getSubTxnInfosSize() {
return (this.subTxnInfos == null) ? 0 : this.subTxnInfos.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TSubTxnInfo> getSubTxnInfosIterator() {
return (this.subTxnInfos == null) ? null : this.subTxnInfos.iterator();
}
public void addToSubTxnInfos(TSubTxnInfo elem) {
if (this.subTxnInfos == null) {
this.subTxnInfos = new java.util.ArrayList<TSubTxnInfo>();
}
this.subTxnInfos.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TSubTxnInfo> getSubTxnInfos() {
return this.subTxnInfos;
}
public TTxnLoadInfo setSubTxnInfos(@org.apache.thrift.annotation.Nullable java.util.List<TSubTxnInfo> subTxnInfos) {
this.subTxnInfos = subTxnInfos;
return this;
}
public void unsetSubTxnInfos() {
this.subTxnInfos = null;
}
/** Returns true if field subTxnInfos is set (has been assigned a value) and false otherwise */
public boolean isSetSubTxnInfos() {
return this.subTxnInfos != null;
}
public void setSubTxnInfosIsSet(boolean value) {
if (!value) {
this.subTxnInfos = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LABEL:
if (value == null) {
unsetLabel();
} else {
setLabel((java.lang.String)value);
}
break;
case DB_ID:
if (value == null) {
unsetDbId();
} else {
setDbId((java.lang.Long)value);
}
break;
case TXN_ID:
if (value == null) {
unsetTxnId();
} else {
setTxnId((java.lang.Long)value);
}
break;
case TIMEOUT_TIMESTAMP:
if (value == null) {
unsetTimeoutTimestamp();
} else {
setTimeoutTimestamp((java.lang.Long)value);
}
break;
case ALL_SUB_TXN_NUM:
if (value == null) {
unsetAllSubTxnNum();
} else {
setAllSubTxnNum((java.lang.Long)value);
}
break;
case SUB_TXN_INFOS:
if (value == null) {
unsetSubTxnInfos();
} else {
setSubTxnInfos((java.util.List<TSubTxnInfo>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LABEL:
return getLabel();
case DB_ID:
return getDbId();
case TXN_ID:
return getTxnId();
case TIMEOUT_TIMESTAMP:
return getTimeoutTimestamp();
case ALL_SUB_TXN_NUM:
return getAllSubTxnNum();
case SUB_TXN_INFOS:
return getSubTxnInfos();
}
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 LABEL:
return isSetLabel();
case DB_ID:
return isSetDbId();
case TXN_ID:
return isSetTxnId();
case TIMEOUT_TIMESTAMP:
return isSetTimeoutTimestamp();
case ALL_SUB_TXN_NUM:
return isSetAllSubTxnNum();
case SUB_TXN_INFOS:
return isSetSubTxnInfos();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TTxnLoadInfo)
return this.equals((TTxnLoadInfo)that);
return false;
}
public boolean equals(TTxnLoadInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_label = true && this.isSetLabel();
boolean that_present_label = true && that.isSetLabel();
if (this_present_label || that_present_label) {
if (!(this_present_label && that_present_label))
return false;
if (!this.label.equals(that.label))
return false;
}
boolean this_present_dbId = true && this.isSetDbId();
boolean that_present_dbId = true && that.isSetDbId();
if (this_present_dbId || that_present_dbId) {
if (!(this_present_dbId && that_present_dbId))
return false;
if (this.dbId != that.dbId)
return false;
}
boolean this_present_txnId = true && this.isSetTxnId();
boolean that_present_txnId = true && that.isSetTxnId();
if (this_present_txnId || that_present_txnId) {
if (!(this_present_txnId && that_present_txnId))
return false;
if (this.txnId != that.txnId)
return false;
}
boolean this_present_timeoutTimestamp = true && this.isSetTimeoutTimestamp();
boolean that_present_timeoutTimestamp = true && that.isSetTimeoutTimestamp();
if (this_present_timeoutTimestamp || that_present_timeoutTimestamp) {
if (!(this_present_timeoutTimestamp && that_present_timeoutTimestamp))
return false;
if (this.timeoutTimestamp != that.timeoutTimestamp)
return false;
}
boolean this_present_allSubTxnNum = true && this.isSetAllSubTxnNum();
boolean that_present_allSubTxnNum = true && that.isSetAllSubTxnNum();
if (this_present_allSubTxnNum || that_present_allSubTxnNum) {
if (!(this_present_allSubTxnNum && that_present_allSubTxnNum))
return false;
if (this.allSubTxnNum != that.allSubTxnNum)
return false;
}
boolean this_present_subTxnInfos = true && this.isSetSubTxnInfos();
boolean that_present_subTxnInfos = true && that.isSetSubTxnInfos();
if (this_present_subTxnInfos || that_present_subTxnInfos) {
if (!(this_present_subTxnInfos && that_present_subTxnInfos))
return false;
if (!this.subTxnInfos.equals(that.subTxnInfos))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetLabel()) ? 131071 : 524287);
if (isSetLabel())
hashCode = hashCode * 8191 + label.hashCode();
hashCode = hashCode * 8191 + ((isSetDbId()) ? 131071 : 524287);
if (isSetDbId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(dbId);
hashCode = hashCode * 8191 + ((isSetTxnId()) ? 131071 : 524287);
if (isSetTxnId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(txnId);
hashCode = hashCode * 8191 + ((isSetTimeoutTimestamp()) ? 131071 : 524287);
if (isSetTimeoutTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutTimestamp);
hashCode = hashCode * 8191 + ((isSetAllSubTxnNum()) ? 131071 : 524287);
if (isSetAllSubTxnNum())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(allSubTxnNum);
hashCode = hashCode * 8191 + ((isSetSubTxnInfos()) ? 131071 : 524287);
if (isSetSubTxnInfos())
hashCode = hashCode * 8191 + subTxnInfos.hashCode();
return hashCode;
}
@Override
public int compareTo(TTxnLoadInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetLabel(), other.isSetLabel());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLabel()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDbId(), other.isSetDbId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDbId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbId, other.dbId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTxnId(), other.isSetTxnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTxnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, other.txnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTimeoutTimestamp(), other.isSetTimeoutTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeoutTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutTimestamp, other.timeoutTimestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAllSubTxnNum(), other.isSetAllSubTxnNum());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAllSubTxnNum()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allSubTxnNum, other.allSubTxnNum);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSubTxnInfos(), other.isSetSubTxnInfos());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSubTxnInfos()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subTxnInfos, other.subTxnInfos);
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("TTxnLoadInfo(");
boolean first = true;
if (isSetLabel()) {
sb.append("label:");
if (this.label == null) {
sb.append("null");
} else {
sb.append(this.label);
}
first = false;
}
if (isSetDbId()) {
if (!first) sb.append(", ");
sb.append("dbId:");
sb.append(this.dbId);
first = false;
}
if (isSetTxnId()) {
if (!first) sb.append(", ");
sb.append("txnId:");
sb.append(this.txnId);
first = false;
}
if (isSetTimeoutTimestamp()) {
if (!first) sb.append(", ");
sb.append("timeoutTimestamp:");
sb.append(this.timeoutTimestamp);
first = false;
}
if (isSetAllSubTxnNum()) {
if (!first) sb.append(", ");
sb.append("allSubTxnNum:");
sb.append(this.allSubTxnNum);
first = false;
}
if (isSetSubTxnInfos()) {
if (!first) sb.append(", ");
sb.append("subTxnInfos:");
if (this.subTxnInfos == null) {
sb.append("null");
} else {
sb.append(this.subTxnInfos);
}
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 TTxnLoadInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTxnLoadInfoStandardScheme getScheme() {
return new TTxnLoadInfoStandardScheme();
}
}
private static class TTxnLoadInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TTxnLoadInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TTxnLoadInfo 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: // LABEL
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.label = iprot.readString();
struct.setLabelIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DB_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.dbId = iprot.readI64();
struct.setDbIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TXN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.txnId = iprot.readI64();
struct.setTxnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMEOUT_TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeoutTimestamp = iprot.readI64();
struct.setTimeoutTimestampIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // ALL_SUB_TXN_NUM
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.allSubTxnNum = iprot.readI64();
struct.setAllSubTxnNumIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // SUB_TXN_INFOS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list272 = iprot.readListBegin();
struct.subTxnInfos = new java.util.ArrayList<TSubTxnInfo>(_list272.size);
@org.apache.thrift.annotation.Nullable TSubTxnInfo _elem273;
for (int _i274 = 0; _i274 < _list272.size; ++_i274)
{
_elem273 = new TSubTxnInfo();
_elem273.read(iprot);
struct.subTxnInfos.add(_elem273);
}
iprot.readListEnd();
}
struct.setSubTxnInfosIsSet(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, TTxnLoadInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.label != null) {
if (struct.isSetLabel()) {
oprot.writeFieldBegin(LABEL_FIELD_DESC);
oprot.writeString(struct.label);
oprot.writeFieldEnd();
}
}
if (struct.isSetDbId()) {
oprot.writeFieldBegin(DB_ID_FIELD_DESC);
oprot.writeI64(struct.dbId);
oprot.writeFieldEnd();
}
if (struct.isSetTxnId()) {
oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
oprot.writeI64(struct.txnId);
oprot.writeFieldEnd();
}
if (struct.isSetTimeoutTimestamp()) {
oprot.writeFieldBegin(TIMEOUT_TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timeoutTimestamp);
oprot.writeFieldEnd();
}
if (struct.isSetAllSubTxnNum()) {
oprot.writeFieldBegin(ALL_SUB_TXN_NUM_FIELD_DESC);
oprot.writeI64(struct.allSubTxnNum);
oprot.writeFieldEnd();
}
if (struct.subTxnInfos != null) {
if (struct.isSetSubTxnInfos()) {
oprot.writeFieldBegin(SUB_TXN_INFOS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.subTxnInfos.size()));
for (TSubTxnInfo _iter275 : struct.subTxnInfos)
{
_iter275.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TTxnLoadInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTxnLoadInfoTupleScheme getScheme() {
return new TTxnLoadInfoTupleScheme();
}
}
private static class TTxnLoadInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TTxnLoadInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTxnLoadInfo 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.isSetLabel()) {
optionals.set(0);
}
if (struct.isSetDbId()) {
optionals.set(1);
}
if (struct.isSetTxnId()) {
optionals.set(2);
}
if (struct.isSetTimeoutTimestamp()) {
optionals.set(3);
}
if (struct.isSetAllSubTxnNum()) {
optionals.set(4);
}
if (struct.isSetSubTxnInfos()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetLabel()) {
oprot.writeString(struct.label);
}
if (struct.isSetDbId()) {
oprot.writeI64(struct.dbId);
}
if (struct.isSetTxnId()) {
oprot.writeI64(struct.txnId);
}
if (struct.isSetTimeoutTimestamp()) {
oprot.writeI64(struct.timeoutTimestamp);
}
if (struct.isSetAllSubTxnNum()) {
oprot.writeI64(struct.allSubTxnNum);
}
if (struct.isSetSubTxnInfos()) {
{
oprot.writeI32(struct.subTxnInfos.size());
for (TSubTxnInfo _iter276 : struct.subTxnInfos)
{
_iter276.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TTxnLoadInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.label = iprot.readString();
struct.setLabelIsSet(true);
}
if (incoming.get(1)) {
struct.dbId = iprot.readI64();
struct.setDbIdIsSet(true);
}
if (incoming.get(2)) {
struct.txnId = iprot.readI64();
struct.setTxnIdIsSet(true);
}
if (incoming.get(3)) {
struct.timeoutTimestamp = iprot.readI64();
struct.setTimeoutTimestampIsSet(true);
}
if (incoming.get(4)) {
struct.allSubTxnNum = iprot.readI64();
struct.setAllSubTxnNumIsSet(true);
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TList _list277 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.subTxnInfos = new java.util.ArrayList<TSubTxnInfo>(_list277.size);
@org.apache.thrift.annotation.Nullable TSubTxnInfo _elem278;
for (int _i279 = 0; _i279 < _list277.size; ++_i279)
{
_elem278 = new TSubTxnInfo();
_elem278.read(iprot);
struct.subTxnInfos.add(_elem278);
}
}
struct.setSubTxnInfosIsSet(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();
}
}