TGetJvmThreadsInfoResponse.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 TGetJvmThreadsInfoResponse implements org.apache.thrift.TBase<TGetJvmThreadsInfoResponse, TGetJvmThreadsInfoResponse._Fields>, java.io.Serializable, Cloneable, Comparable<TGetJvmThreadsInfoResponse> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetJvmThreadsInfoResponse");
private static final org.apache.thrift.protocol.TField TOTAL_THREAD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("total_thread_count", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField DAEMON_THREAD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("daemon_thread_count", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField PEAK_THREAD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("peak_thread_count", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("threads", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TGetJvmThreadsInfoResponseStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TGetJvmThreadsInfoResponseTupleSchemeFactory();
public int total_thread_count; // required
public int daemon_thread_count; // required
public int peak_thread_count; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TJvmThreadInfo> threads; // 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 {
TOTAL_THREAD_COUNT((short)1, "total_thread_count"),
DAEMON_THREAD_COUNT((short)2, "daemon_thread_count"),
PEAK_THREAD_COUNT((short)3, "peak_thread_count"),
THREADS((short)4, "threads");
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: // TOTAL_THREAD_COUNT
return TOTAL_THREAD_COUNT;
case 2: // DAEMON_THREAD_COUNT
return DAEMON_THREAD_COUNT;
case 3: // PEAK_THREAD_COUNT
return PEAK_THREAD_COUNT;
case 4: // THREADS
return THREADS;
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 __TOTAL_THREAD_COUNT_ISSET_ID = 0;
private static final int __DAEMON_THREAD_COUNT_ISSET_ID = 1;
private static final int __PEAK_THREAD_COUNT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.THREADS};
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.TOTAL_THREAD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("total_thread_count", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DAEMON_THREAD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("daemon_thread_count", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PEAK_THREAD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("peak_thread_count", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.THREADS, new org.apache.thrift.meta_data.FieldMetaData("threads", 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, TJvmThreadInfo.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetJvmThreadsInfoResponse.class, metaDataMap);
}
public TGetJvmThreadsInfoResponse() {
}
public TGetJvmThreadsInfoResponse(
int total_thread_count,
int daemon_thread_count,
int peak_thread_count)
{
this();
this.total_thread_count = total_thread_count;
setTotalThreadCountIsSet(true);
this.daemon_thread_count = daemon_thread_count;
setDaemonThreadCountIsSet(true);
this.peak_thread_count = peak_thread_count;
setPeakThreadCountIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TGetJvmThreadsInfoResponse(TGetJvmThreadsInfoResponse other) {
__isset_bitfield = other.__isset_bitfield;
this.total_thread_count = other.total_thread_count;
this.daemon_thread_count = other.daemon_thread_count;
this.peak_thread_count = other.peak_thread_count;
if (other.isSetThreads()) {
java.util.List<TJvmThreadInfo> __this__threads = new java.util.ArrayList<TJvmThreadInfo>(other.threads.size());
for (TJvmThreadInfo other_element : other.threads) {
__this__threads.add(new TJvmThreadInfo(other_element));
}
this.threads = __this__threads;
}
}
public TGetJvmThreadsInfoResponse deepCopy() {
return new TGetJvmThreadsInfoResponse(this);
}
@Override
public void clear() {
setTotalThreadCountIsSet(false);
this.total_thread_count = 0;
setDaemonThreadCountIsSet(false);
this.daemon_thread_count = 0;
setPeakThreadCountIsSet(false);
this.peak_thread_count = 0;
this.threads = null;
}
public int getTotalThreadCount() {
return this.total_thread_count;
}
public TGetJvmThreadsInfoResponse setTotalThreadCount(int total_thread_count) {
this.total_thread_count = total_thread_count;
setTotalThreadCountIsSet(true);
return this;
}
public void unsetTotalThreadCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_THREAD_COUNT_ISSET_ID);
}
/** Returns true if field total_thread_count is set (has been assigned a value) and false otherwise */
public boolean isSetTotalThreadCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_THREAD_COUNT_ISSET_ID);
}
public void setTotalThreadCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_THREAD_COUNT_ISSET_ID, value);
}
public int getDaemonThreadCount() {
return this.daemon_thread_count;
}
public TGetJvmThreadsInfoResponse setDaemonThreadCount(int daemon_thread_count) {
this.daemon_thread_count = daemon_thread_count;
setDaemonThreadCountIsSet(true);
return this;
}
public void unsetDaemonThreadCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DAEMON_THREAD_COUNT_ISSET_ID);
}
/** Returns true if field daemon_thread_count is set (has been assigned a value) and false otherwise */
public boolean isSetDaemonThreadCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DAEMON_THREAD_COUNT_ISSET_ID);
}
public void setDaemonThreadCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DAEMON_THREAD_COUNT_ISSET_ID, value);
}
public int getPeakThreadCount() {
return this.peak_thread_count;
}
public TGetJvmThreadsInfoResponse setPeakThreadCount(int peak_thread_count) {
this.peak_thread_count = peak_thread_count;
setPeakThreadCountIsSet(true);
return this;
}
public void unsetPeakThreadCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PEAK_THREAD_COUNT_ISSET_ID);
}
/** Returns true if field peak_thread_count is set (has been assigned a value) and false otherwise */
public boolean isSetPeakThreadCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PEAK_THREAD_COUNT_ISSET_ID);
}
public void setPeakThreadCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PEAK_THREAD_COUNT_ISSET_ID, value);
}
public int getThreadsSize() {
return (this.threads == null) ? 0 : this.threads.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TJvmThreadInfo> getThreadsIterator() {
return (this.threads == null) ? null : this.threads.iterator();
}
public void addToThreads(TJvmThreadInfo elem) {
if (this.threads == null) {
this.threads = new java.util.ArrayList<TJvmThreadInfo>();
}
this.threads.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TJvmThreadInfo> getThreads() {
return this.threads;
}
public TGetJvmThreadsInfoResponse setThreads(@org.apache.thrift.annotation.Nullable java.util.List<TJvmThreadInfo> threads) {
this.threads = threads;
return this;
}
public void unsetThreads() {
this.threads = null;
}
/** Returns true if field threads is set (has been assigned a value) and false otherwise */
public boolean isSetThreads() {
return this.threads != null;
}
public void setThreadsIsSet(boolean value) {
if (!value) {
this.threads = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TOTAL_THREAD_COUNT:
if (value == null) {
unsetTotalThreadCount();
} else {
setTotalThreadCount((java.lang.Integer)value);
}
break;
case DAEMON_THREAD_COUNT:
if (value == null) {
unsetDaemonThreadCount();
} else {
setDaemonThreadCount((java.lang.Integer)value);
}
break;
case PEAK_THREAD_COUNT:
if (value == null) {
unsetPeakThreadCount();
} else {
setPeakThreadCount((java.lang.Integer)value);
}
break;
case THREADS:
if (value == null) {
unsetThreads();
} else {
setThreads((java.util.List<TJvmThreadInfo>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOTAL_THREAD_COUNT:
return getTotalThreadCount();
case DAEMON_THREAD_COUNT:
return getDaemonThreadCount();
case PEAK_THREAD_COUNT:
return getPeakThreadCount();
case THREADS:
return getThreads();
}
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 TOTAL_THREAD_COUNT:
return isSetTotalThreadCount();
case DAEMON_THREAD_COUNT:
return isSetDaemonThreadCount();
case PEAK_THREAD_COUNT:
return isSetPeakThreadCount();
case THREADS:
return isSetThreads();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetJvmThreadsInfoResponse)
return this.equals((TGetJvmThreadsInfoResponse)that);
return false;
}
public boolean equals(TGetJvmThreadsInfoResponse that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_total_thread_count = true;
boolean that_present_total_thread_count = true;
if (this_present_total_thread_count || that_present_total_thread_count) {
if (!(this_present_total_thread_count && that_present_total_thread_count))
return false;
if (this.total_thread_count != that.total_thread_count)
return false;
}
boolean this_present_daemon_thread_count = true;
boolean that_present_daemon_thread_count = true;
if (this_present_daemon_thread_count || that_present_daemon_thread_count) {
if (!(this_present_daemon_thread_count && that_present_daemon_thread_count))
return false;
if (this.daemon_thread_count != that.daemon_thread_count)
return false;
}
boolean this_present_peak_thread_count = true;
boolean that_present_peak_thread_count = true;
if (this_present_peak_thread_count || that_present_peak_thread_count) {
if (!(this_present_peak_thread_count && that_present_peak_thread_count))
return false;
if (this.peak_thread_count != that.peak_thread_count)
return false;
}
boolean this_present_threads = true && this.isSetThreads();
boolean that_present_threads = true && that.isSetThreads();
if (this_present_threads || that_present_threads) {
if (!(this_present_threads && that_present_threads))
return false;
if (!this.threads.equals(that.threads))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + total_thread_count;
hashCode = hashCode * 8191 + daemon_thread_count;
hashCode = hashCode * 8191 + peak_thread_count;
hashCode = hashCode * 8191 + ((isSetThreads()) ? 131071 : 524287);
if (isSetThreads())
hashCode = hashCode * 8191 + threads.hashCode();
return hashCode;
}
@Override
public int compareTo(TGetJvmThreadsInfoResponse other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTotalThreadCount(), other.isSetTotalThreadCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTotalThreadCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.total_thread_count, other.total_thread_count);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDaemonThreadCount(), other.isSetDaemonThreadCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDaemonThreadCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.daemon_thread_count, other.daemon_thread_count);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPeakThreadCount(), other.isSetPeakThreadCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPeakThreadCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peak_thread_count, other.peak_thread_count);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetThreads(), other.isSetThreads());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetThreads()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threads, other.threads);
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("TGetJvmThreadsInfoResponse(");
boolean first = true;
sb.append("total_thread_count:");
sb.append(this.total_thread_count);
first = false;
if (!first) sb.append(", ");
sb.append("daemon_thread_count:");
sb.append(this.daemon_thread_count);
first = false;
if (!first) sb.append(", ");
sb.append("peak_thread_count:");
sb.append(this.peak_thread_count);
first = false;
if (isSetThreads()) {
if (!first) sb.append(", ");
sb.append("threads:");
if (this.threads == null) {
sb.append("null");
} else {
sb.append(this.threads);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'total_thread_count' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'daemon_thread_count' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'peak_thread_count' 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 TGetJvmThreadsInfoResponseStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetJvmThreadsInfoResponseStandardScheme getScheme() {
return new TGetJvmThreadsInfoResponseStandardScheme();
}
}
private static class TGetJvmThreadsInfoResponseStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetJvmThreadsInfoResponse> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetJvmThreadsInfoResponse 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: // TOTAL_THREAD_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.total_thread_count = iprot.readI32();
struct.setTotalThreadCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DAEMON_THREAD_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.daemon_thread_count = iprot.readI32();
struct.setDaemonThreadCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PEAK_THREAD_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.peak_thread_count = iprot.readI32();
struct.setPeakThreadCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // THREADS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
struct.threads = new java.util.ArrayList<TJvmThreadInfo>(_list48.size);
@org.apache.thrift.annotation.Nullable TJvmThreadInfo _elem49;
for (int _i50 = 0; _i50 < _list48.size; ++_i50)
{
_elem49 = new TJvmThreadInfo();
_elem49.read(iprot);
struct.threads.add(_elem49);
}
iprot.readListEnd();
}
struct.setThreadsIsSet(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.isSetTotalThreadCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'total_thread_count' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDaemonThreadCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'daemon_thread_count' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetPeakThreadCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'peak_thread_count' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetJvmThreadsInfoResponse struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TOTAL_THREAD_COUNT_FIELD_DESC);
oprot.writeI32(struct.total_thread_count);
oprot.writeFieldEnd();
oprot.writeFieldBegin(DAEMON_THREAD_COUNT_FIELD_DESC);
oprot.writeI32(struct.daemon_thread_count);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PEAK_THREAD_COUNT_FIELD_DESC);
oprot.writeI32(struct.peak_thread_count);
oprot.writeFieldEnd();
if (struct.threads != null) {
if (struct.isSetThreads()) {
oprot.writeFieldBegin(THREADS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.threads.size()));
for (TJvmThreadInfo _iter51 : struct.threads)
{
_iter51.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetJvmThreadsInfoResponseTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetJvmThreadsInfoResponseTupleScheme getScheme() {
return new TGetJvmThreadsInfoResponseTupleScheme();
}
}
private static class TGetJvmThreadsInfoResponseTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetJvmThreadsInfoResponse> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetJvmThreadsInfoResponse struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.total_thread_count);
oprot.writeI32(struct.daemon_thread_count);
oprot.writeI32(struct.peak_thread_count);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetThreads()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetThreads()) {
{
oprot.writeI32(struct.threads.size());
for (TJvmThreadInfo _iter52 : struct.threads)
{
_iter52.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetJvmThreadsInfoResponse struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.total_thread_count = iprot.readI32();
struct.setTotalThreadCountIsSet(true);
struct.daemon_thread_count = iprot.readI32();
struct.setDaemonThreadCountIsSet(true);
struct.peak_thread_count = iprot.readI32();
struct.setPeakThreadCountIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.threads = new java.util.ArrayList<TJvmThreadInfo>(_list53.size);
@org.apache.thrift.annotation.Nullable TJvmThreadInfo _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
_elem54 = new TJvmThreadInfo();
_elem54.read(iprot);
struct.threads.add(_elem54);
}
}
struct.setThreadsIsSet(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();
}
}