/**
* Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.navercorp.pinpoint.thrift.dto.command;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)", date = "2017-03-16")
public class TThreadDump implements org.apache.thrift.TBase<TThreadDump, TThreadDump._Fields>, java.io.Serializable, Cloneable, Comparable<TThreadDump> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TThreadDump");
private static final org.apache.thrift.protocol.TField THREAD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("threadName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField THREAD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("threadId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField BLOCKED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedTime", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField BLOCKED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedCount", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField WAITED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("waitedTime", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField WAITED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("waitedCount", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField LOCK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lockName", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField LOCK_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockOwnerId", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField LOCK_OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lockOwnerName", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.protocol.TField IN_NATIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("inNative", org.apache.thrift.protocol.TType.BOOL, (short)10);
private static final org.apache.thrift.protocol.TField SUSPENDED_FIELD_DESC = new org.apache.thrift.protocol.TField("suspended", org.apache.thrift.protocol.TType.BOOL, (short)11);
private static final org.apache.thrift.protocol.TField THREAD_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("threadState", org.apache.thrift.protocol.TType.I32, (short)12);
private static final org.apache.thrift.protocol.TField STACK_TRACE_FIELD_DESC = new org.apache.thrift.protocol.TField("stackTrace", org.apache.thrift.protocol.TType.LIST, (short)13);
private static final org.apache.thrift.protocol.TField LOCKED_MONITORS_FIELD_DESC = new org.apache.thrift.protocol.TField("lockedMonitors", org.apache.thrift.protocol.TType.LIST, (short)14);
private static final org.apache.thrift.protocol.TField LOCKED_SYNCHRONIZERS_FIELD_DESC = new org.apache.thrift.protocol.TField("lockedSynchronizers", org.apache.thrift.protocol.TType.LIST, (short)15);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TThreadDumpStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TThreadDumpTupleSchemeFactory();
private java.lang.String threadName; // required
private long threadId; // required
private long blockedTime; // required
private long blockedCount; // required
private long waitedTime; // required
private long waitedCount; // required
private java.lang.String lockName; // required
private long lockOwnerId; // required
private java.lang.String lockOwnerName; // required
private boolean inNative; // required
private boolean suspended; // required
private TThreadState threadState; // required
private java.util.List<java.lang.String> stackTrace; // required
private java.util.List<TMonitorInfo> lockedMonitors; // required
private java.util.List<java.lang.String> lockedSynchronizers; // 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 {
THREAD_NAME((short)1, "threadName"),
THREAD_ID((short)2, "threadId"),
BLOCKED_TIME((short)3, "blockedTime"),
BLOCKED_COUNT((short)4, "blockedCount"),
WAITED_TIME((short)5, "waitedTime"),
WAITED_COUNT((short)6, "waitedCount"),
LOCK_NAME((short)7, "lockName"),
LOCK_OWNER_ID((short)8, "lockOwnerId"),
LOCK_OWNER_NAME((short)9, "lockOwnerName"),
IN_NATIVE((short)10, "inNative"),
SUSPENDED((short)11, "suspended"),
/**
*
* @see TThreadState
*/
THREAD_STATE((short)12, "threadState"),
STACK_TRACE((short)13, "stackTrace"),
LOCKED_MONITORS((short)14, "lockedMonitors"),
LOCKED_SYNCHRONIZERS((short)15, "lockedSynchronizers");
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.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // THREAD_NAME
return THREAD_NAME;
case 2: // THREAD_ID
return THREAD_ID;
case 3: // BLOCKED_TIME
return BLOCKED_TIME;
case 4: // BLOCKED_COUNT
return BLOCKED_COUNT;
case 5: // WAITED_TIME
return WAITED_TIME;
case 6: // WAITED_COUNT
return WAITED_COUNT;
case 7: // LOCK_NAME
return LOCK_NAME;
case 8: // LOCK_OWNER_ID
return LOCK_OWNER_ID;
case 9: // LOCK_OWNER_NAME
return LOCK_OWNER_NAME;
case 10: // IN_NATIVE
return IN_NATIVE;
case 11: // SUSPENDED
return SUSPENDED;
case 12: // THREAD_STATE
return THREAD_STATE;
case 13: // STACK_TRACE
return STACK_TRACE;
case 14: // LOCKED_MONITORS
return LOCKED_MONITORS;
case 15: // LOCKED_SYNCHRONIZERS
return LOCKED_SYNCHRONIZERS;
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.
*/
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 __THREADID_ISSET_ID = 0;
private static final int __BLOCKEDTIME_ISSET_ID = 1;
private static final int __BLOCKEDCOUNT_ISSET_ID = 2;
private static final int __WAITEDTIME_ISSET_ID = 3;
private static final int __WAITEDCOUNT_ISSET_ID = 4;
private static final int __LOCKOWNERID_ISSET_ID = 5;
private static final int __INNATIVE_ISSET_ID = 6;
private static final int __SUSPENDED_ISSET_ID = 7;
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.THREAD_NAME, new org.apache.thrift.meta_data.FieldMetaData("threadName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.BLOCKED_TIME, new org.apache.thrift.meta_data.FieldMetaData("blockedTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.BLOCKED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("blockedCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.WAITED_TIME, new org.apache.thrift.meta_data.FieldMetaData("waitedTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.WAITED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("waitedCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LOCK_NAME, new org.apache.thrift.meta_data.FieldMetaData("lockName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LOCK_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("lockOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LOCK_OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("lockOwnerName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IN_NATIVE, new org.apache.thrift.meta_data.FieldMetaData("inNative", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.SUSPENDED, new org.apache.thrift.meta_data.FieldMetaData("suspended", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.THREAD_STATE, new org.apache.thrift.meta_data.FieldMetaData("threadState", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TThreadState.class)));
tmpMap.put(_Fields.STACK_TRACE, new org.apache.thrift.meta_data.FieldMetaData("stackTrace", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.LOCKED_MONITORS, new org.apache.thrift.meta_data.FieldMetaData("lockedMonitors", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMonitorInfo.class))));
tmpMap.put(_Fields.LOCKED_SYNCHRONIZERS, new org.apache.thrift.meta_data.FieldMetaData("lockedSynchronizers", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TThreadDump.class, metaDataMap);
}
public TThreadDump() {
}
public TThreadDump(
java.lang.String threadName,
long threadId,
long blockedTime,
long blockedCount,
long waitedTime,
long waitedCount,
java.lang.String lockName,
long lockOwnerId,
java.lang.String lockOwnerName,
boolean inNative,
boolean suspended,
TThreadState threadState,
java.util.List<java.lang.String> stackTrace,
java.util.List<TMonitorInfo> lockedMonitors,
java.util.List<java.lang.String> lockedSynchronizers)
{
this();
this.threadName = threadName;
this.threadId = threadId;
setThreadIdIsSet(true);
this.blockedTime = blockedTime;
setBlockedTimeIsSet(true);
this.blockedCount = blockedCount;
setBlockedCountIsSet(true);
this.waitedTime = waitedTime;
setWaitedTimeIsSet(true);
this.waitedCount = waitedCount;
setWaitedCountIsSet(true);
this.lockName = lockName;
this.lockOwnerId = lockOwnerId;
setLockOwnerIdIsSet(true);
this.lockOwnerName = lockOwnerName;
this.inNative = inNative;
setInNativeIsSet(true);
this.suspended = suspended;
setSuspendedIsSet(true);
this.threadState = threadState;
this.stackTrace = stackTrace;
this.lockedMonitors = lockedMonitors;
this.lockedSynchronizers = lockedSynchronizers;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TThreadDump(TThreadDump other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetThreadName()) {
this.threadName = other.threadName;
}
this.threadId = other.threadId;
this.blockedTime = other.blockedTime;
this.blockedCount = other.blockedCount;
this.waitedTime = other.waitedTime;
this.waitedCount = other.waitedCount;
if (other.isSetLockName()) {
this.lockName = other.lockName;
}
this.lockOwnerId = other.lockOwnerId;
if (other.isSetLockOwnerName()) {
this.lockOwnerName = other.lockOwnerName;
}
this.inNative = other.inNative;
this.suspended = other.suspended;
if (other.isSetThreadState()) {
this.threadState = other.threadState;
}
if (other.isSetStackTrace()) {
java.util.List<java.lang.String> __this__stackTrace = new java.util.ArrayList<java.lang.String>(other.stackTrace);
this.stackTrace = __this__stackTrace;
}
if (other.isSetLockedMonitors()) {
java.util.List<TMonitorInfo> __this__lockedMonitors = new java.util.ArrayList<TMonitorInfo>(other.lockedMonitors.size());
for (TMonitorInfo other_element : other.lockedMonitors) {
__this__lockedMonitors.add(new TMonitorInfo(other_element));
}
this.lockedMonitors = __this__lockedMonitors;
}
if (other.isSetLockedSynchronizers()) {
java.util.List<java.lang.String> __this__lockedSynchronizers = new java.util.ArrayList<java.lang.String>(other.lockedSynchronizers);
this.lockedSynchronizers = __this__lockedSynchronizers;
}
}
public TThreadDump deepCopy() {
return new TThreadDump(this);
}
@Override
public void clear() {
this.threadName = null;
setThreadIdIsSet(false);
this.threadId = 0;
setBlockedTimeIsSet(false);
this.blockedTime = 0;
setBlockedCountIsSet(false);
this.blockedCount = 0;
setWaitedTimeIsSet(false);
this.waitedTime = 0;
setWaitedCountIsSet(false);
this.waitedCount = 0;
this.lockName = null;
setLockOwnerIdIsSet(false);
this.lockOwnerId = 0;
this.lockOwnerName = null;
setInNativeIsSet(false);
this.inNative = false;
setSuspendedIsSet(false);
this.suspended = false;
this.threadState = null;
this.stackTrace = null;
this.lockedMonitors = null;
this.lockedSynchronizers = null;
}
public java.lang.String getThreadName() {
return this.threadName;
}
public void setThreadName(java.lang.String threadName) {
this.threadName = threadName;
}
public void unsetThreadName() {
this.threadName = null;
}
/** Returns true if field threadName is set (has been assigned a value) and false otherwise */
public boolean isSetThreadName() {
return this.threadName != null;
}
public void setThreadNameIsSet(boolean value) {
if (!value) {
this.threadName = null;
}
}
public long getThreadId() {
return this.threadId;
}
public void setThreadId(long threadId) {
this.threadId = threadId;
setThreadIdIsSet(true);
}
public void unsetThreadId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADID_ISSET_ID);
}
/** Returns true if field threadId is set (has been assigned a value) and false otherwise */
public boolean isSetThreadId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADID_ISSET_ID);
}
public void setThreadIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADID_ISSET_ID, value);
}
public long getBlockedTime() {
return this.blockedTime;
}
public void setBlockedTime(long blockedTime) {
this.blockedTime = blockedTime;
setBlockedTimeIsSet(true);
}
public void unsetBlockedTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDTIME_ISSET_ID);
}
/** Returns true if field blockedTime is set (has been assigned a value) and false otherwise */
public boolean isSetBlockedTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOCKEDTIME_ISSET_ID);
}
public void setBlockedTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOCKEDTIME_ISSET_ID, value);
}
public long getBlockedCount() {
return this.blockedCount;
}
public void setBlockedCount(long blockedCount) {
this.blockedCount = blockedCount;
setBlockedCountIsSet(true);
}
public void unsetBlockedCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDCOUNT_ISSET_ID);
}
/** Returns true if field blockedCount is set (has been assigned a value) and false otherwise */
public boolean isSetBlockedCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOCKEDCOUNT_ISSET_ID);
}
public void setBlockedCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOCKEDCOUNT_ISSET_ID, value);
}
public long getWaitedTime() {
return this.waitedTime;
}
public void setWaitedTime(long waitedTime) {
this.waitedTime = waitedTime;
setWaitedTimeIsSet(true);
}
public void unsetWaitedTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WAITEDTIME_ISSET_ID);
}
/** Returns true if field waitedTime is set (has been assigned a value) and false otherwise */
public boolean isSetWaitedTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WAITEDTIME_ISSET_ID);
}
public void setWaitedTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WAITEDTIME_ISSET_ID, value);
}
public long getWaitedCount() {
return this.waitedCount;
}
public void setWaitedCount(long waitedCount) {
this.waitedCount = waitedCount;
setWaitedCountIsSet(true);
}
public void unsetWaitedCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WAITEDCOUNT_ISSET_ID);
}
/** Returns true if field waitedCount is set (has been assigned a value) and false otherwise */
public boolean isSetWaitedCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WAITEDCOUNT_ISSET_ID);
}
public void setWaitedCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WAITEDCOUNT_ISSET_ID, value);
}
public java.lang.String getLockName() {
return this.lockName;
}
public void setLockName(java.lang.String lockName) {
this.lockName = lockName;
}
public void unsetLockName() {
this.lockName = null;
}
/** Returns true if field lockName is set (has been assigned a value) and false otherwise */
public boolean isSetLockName() {
return this.lockName != null;
}
public void setLockNameIsSet(boolean value) {
if (!value) {
this.lockName = null;
}
}
public long getLockOwnerId() {
return this.lockOwnerId;
}
public void setLockOwnerId(long lockOwnerId) {
this.lockOwnerId = lockOwnerId;
setLockOwnerIdIsSet(true);
}
public void unsetLockOwnerId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LOCKOWNERID_ISSET_ID);
}
/** Returns true if field lockOwnerId is set (has been assigned a value) and false otherwise */
public boolean isSetLockOwnerId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LOCKOWNERID_ISSET_ID);
}
public void setLockOwnerIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LOCKOWNERID_ISSET_ID, value);
}
public java.lang.String getLockOwnerName() {
return this.lockOwnerName;
}
public void setLockOwnerName(java.lang.String lockOwnerName) {
this.lockOwnerName = lockOwnerName;
}
public void unsetLockOwnerName() {
this.lockOwnerName = null;
}
/** Returns true if field lockOwnerName is set (has been assigned a value) and false otherwise */
public boolean isSetLockOwnerName() {
return this.lockOwnerName != null;
}
public void setLockOwnerNameIsSet(boolean value) {
if (!value) {
this.lockOwnerName = null;
}
}
public boolean isInNative() {
return this.inNative;
}
public void setInNative(boolean inNative) {
this.inNative = inNative;
setInNativeIsSet(true);
}
public void unsetInNative() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INNATIVE_ISSET_ID);
}
/** Returns true if field inNative is set (has been assigned a value) and false otherwise */
public boolean isSetInNative() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INNATIVE_ISSET_ID);
}
public void setInNativeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INNATIVE_ISSET_ID, value);
}
public boolean isSuspended() {
return this.suspended;
}
public void setSuspended(boolean suspended) {
this.suspended = suspended;
setSuspendedIsSet(true);
}
public void unsetSuspended() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUSPENDED_ISSET_ID);
}
/** Returns true if field suspended is set (has been assigned a value) and false otherwise */
public boolean isSetSuspended() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUSPENDED_ISSET_ID);
}
public void setSuspendedIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUSPENDED_ISSET_ID, value);
}
/**
*
* @see TThreadState
*/
public TThreadState getThreadState() {
return this.threadState;
}
/**
*
* @see TThreadState
*/
public void setThreadState(TThreadState threadState) {
this.threadState = threadState;
}
public void unsetThreadState() {
this.threadState = null;
}
/** Returns true if field threadState is set (has been assigned a value) and false otherwise */
public boolean isSetThreadState() {
return this.threadState != null;
}
public void setThreadStateIsSet(boolean value) {
if (!value) {
this.threadState = null;
}
}
public int getStackTraceSize() {
return (this.stackTrace == null) ? 0 : this.stackTrace.size();
}
public java.util.Iterator<java.lang.String> getStackTraceIterator() {
return (this.stackTrace == null) ? null : this.stackTrace.iterator();
}
public void addToStackTrace(java.lang.String elem) {
if (this.stackTrace == null) {
this.stackTrace = new java.util.ArrayList<java.lang.String>();
}
this.stackTrace.add(elem);
}
public java.util.List<java.lang.String> getStackTrace() {
return this.stackTrace;
}
public void setStackTrace(java.util.List<java.lang.String> stackTrace) {
this.stackTrace = stackTrace;
}
public void unsetStackTrace() {
this.stackTrace = null;
}
/** Returns true if field stackTrace is set (has been assigned a value) and false otherwise */
public boolean isSetStackTrace() {
return this.stackTrace != null;
}
public void setStackTraceIsSet(boolean value) {
if (!value) {
this.stackTrace = null;
}
}
public int getLockedMonitorsSize() {
return (this.lockedMonitors == null) ? 0 : this.lockedMonitors.size();
}
public java.util.Iterator<TMonitorInfo> getLockedMonitorsIterator() {
return (this.lockedMonitors == null) ? null : this.lockedMonitors.iterator();
}
public void addToLockedMonitors(TMonitorInfo elem) {
if (this.lockedMonitors == null) {
this.lockedMonitors = new java.util.ArrayList<TMonitorInfo>();
}
this.lockedMonitors.add(elem);
}
public java.util.List<TMonitorInfo> getLockedMonitors() {
return this.lockedMonitors;
}
public void setLockedMonitors(java.util.List<TMonitorInfo> lockedMonitors) {
this.lockedMonitors = lockedMonitors;
}
public void unsetLockedMonitors() {
this.lockedMonitors = null;
}
/** Returns true if field lockedMonitors is set (has been assigned a value) and false otherwise */
public boolean isSetLockedMonitors() {
return this.lockedMonitors != null;
}
public void setLockedMonitorsIsSet(boolean value) {
if (!value) {
this.lockedMonitors = null;
}
}
public int getLockedSynchronizersSize() {
return (this.lockedSynchronizers == null) ? 0 : this.lockedSynchronizers.size();
}
public java.util.Iterator<java.lang.String> getLockedSynchronizersIterator() {
return (this.lockedSynchronizers == null) ? null : this.lockedSynchronizers.iterator();
}
public void addToLockedSynchronizers(java.lang.String elem) {
if (this.lockedSynchronizers == null) {
this.lockedSynchronizers = new java.util.ArrayList<java.lang.String>();
}
this.lockedSynchronizers.add(elem);
}
public java.util.List<java.lang.String> getLockedSynchronizers() {
return this.lockedSynchronizers;
}
public void setLockedSynchronizers(java.util.List<java.lang.String> lockedSynchronizers) {
this.lockedSynchronizers = lockedSynchronizers;
}
public void unsetLockedSynchronizers() {
this.lockedSynchronizers = null;
}
/** Returns true if field lockedSynchronizers is set (has been assigned a value) and false otherwise */
public boolean isSetLockedSynchronizers() {
return this.lockedSynchronizers != null;
}
public void setLockedSynchronizersIsSet(boolean value) {
if (!value) {
this.lockedSynchronizers = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case THREAD_NAME:
if (value == null) {
unsetThreadName();
} else {
setThreadName((java.lang.String)value);
}
break;
case THREAD_ID:
if (value == null) {
unsetThreadId();
} else {
setThreadId((java.lang.Long)value);
}
break;
case BLOCKED_TIME:
if (value == null) {
unsetBlockedTime();
} else {
setBlockedTime((java.lang.Long)value);
}
break;
case BLOCKED_COUNT:
if (value == null) {
unsetBlockedCount();
} else {
setBlockedCount((java.lang.Long)value);
}
break;
case WAITED_TIME:
if (value == null) {
unsetWaitedTime();
} else {
setWaitedTime((java.lang.Long)value);
}
break;
case WAITED_COUNT:
if (value == null) {
unsetWaitedCount();
} else {
setWaitedCount((java.lang.Long)value);
}
break;
case LOCK_NAME:
if (value == null) {
unsetLockName();
} else {
setLockName((java.lang.String)value);
}
break;
case LOCK_OWNER_ID:
if (value == null) {
unsetLockOwnerId();
} else {
setLockOwnerId((java.lang.Long)value);
}
break;
case LOCK_OWNER_NAME:
if (value == null) {
unsetLockOwnerName();
} else {
setLockOwnerName((java.lang.String)value);
}
break;
case IN_NATIVE:
if (value == null) {
unsetInNative();
} else {
setInNative((java.lang.Boolean)value);
}
break;
case SUSPENDED:
if (value == null) {
unsetSuspended();
} else {
setSuspended((java.lang.Boolean)value);
}
break;
case THREAD_STATE:
if (value == null) {
unsetThreadState();
} else {
setThreadState((TThreadState)value);
}
break;
case STACK_TRACE:
if (value == null) {
unsetStackTrace();
} else {
setStackTrace((java.util.List<java.lang.String>)value);
}
break;
case LOCKED_MONITORS:
if (value == null) {
unsetLockedMonitors();
} else {
setLockedMonitors((java.util.List<TMonitorInfo>)value);
}
break;
case LOCKED_SYNCHRONIZERS:
if (value == null) {
unsetLockedSynchronizers();
} else {
setLockedSynchronizers((java.util.List<java.lang.String>)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case THREAD_NAME:
return getThreadName();
case THREAD_ID:
return getThreadId();
case BLOCKED_TIME:
return getBlockedTime();
case BLOCKED_COUNT:
return getBlockedCount();
case WAITED_TIME:
return getWaitedTime();
case WAITED_COUNT:
return getWaitedCount();
case LOCK_NAME:
return getLockName();
case LOCK_OWNER_ID:
return getLockOwnerId();
case LOCK_OWNER_NAME:
return getLockOwnerName();
case IN_NATIVE:
return isInNative();
case SUSPENDED:
return isSuspended();
case THREAD_STATE:
return getThreadState();
case STACK_TRACE:
return getStackTrace();
case LOCKED_MONITORS:
return getLockedMonitors();
case LOCKED_SYNCHRONIZERS:
return getLockedSynchronizers();
}
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 THREAD_NAME:
return isSetThreadName();
case THREAD_ID:
return isSetThreadId();
case BLOCKED_TIME:
return isSetBlockedTime();
case BLOCKED_COUNT:
return isSetBlockedCount();
case WAITED_TIME:
return isSetWaitedTime();
case WAITED_COUNT:
return isSetWaitedCount();
case LOCK_NAME:
return isSetLockName();
case LOCK_OWNER_ID:
return isSetLockOwnerId();
case LOCK_OWNER_NAME:
return isSetLockOwnerName();
case IN_NATIVE:
return isSetInNative();
case SUSPENDED:
return isSetSuspended();
case THREAD_STATE:
return isSetThreadState();
case STACK_TRACE:
return isSetStackTrace();
case LOCKED_MONITORS:
return isSetLockedMonitors();
case LOCKED_SYNCHRONIZERS:
return isSetLockedSynchronizers();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TThreadDump)
return this.equals((TThreadDump)that);
return false;
}
public boolean equals(TThreadDump that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_threadName = true && this.isSetThreadName();
boolean that_present_threadName = true && that.isSetThreadName();
if (this_present_threadName || that_present_threadName) {
if (!(this_present_threadName && that_present_threadName))
return false;
if (!this.threadName.equals(that.threadName))
return false;
}
boolean this_present_threadId = true;
boolean that_present_threadId = true;
if (this_present_threadId || that_present_threadId) {
if (!(this_present_threadId && that_present_threadId))
return false;
if (this.threadId != that.threadId)
return false;
}
boolean this_present_blockedTime = true;
boolean that_present_blockedTime = true;
if (this_present_blockedTime || that_present_blockedTime) {
if (!(this_present_blockedTime && that_present_blockedTime))
return false;
if (this.blockedTime != that.blockedTime)
return false;
}
boolean this_present_blockedCount = true;
boolean that_present_blockedCount = true;
if (this_present_blockedCount || that_present_blockedCount) {
if (!(this_present_blockedCount && that_present_blockedCount))
return false;
if (this.blockedCount != that.blockedCount)
return false;
}
boolean this_present_waitedTime = true;
boolean that_present_waitedTime = true;
if (this_present_waitedTime || that_present_waitedTime) {
if (!(this_present_waitedTime && that_present_waitedTime))
return false;
if (this.waitedTime != that.waitedTime)
return false;
}
boolean this_present_waitedCount = true;
boolean that_present_waitedCount = true;
if (this_present_waitedCount || that_present_waitedCount) {
if (!(this_present_waitedCount && that_present_waitedCount))
return false;
if (this.waitedCount != that.waitedCount)
return false;
}
boolean this_present_lockName = true && this.isSetLockName();
boolean that_present_lockName = true && that.isSetLockName();
if (this_present_lockName || that_present_lockName) {
if (!(this_present_lockName && that_present_lockName))
return false;
if (!this.lockName.equals(that.lockName))
return false;
}
boolean this_present_lockOwnerId = true;
boolean that_present_lockOwnerId = true;
if (this_present_lockOwnerId || that_present_lockOwnerId) {
if (!(this_present_lockOwnerId && that_present_lockOwnerId))
return false;
if (this.lockOwnerId != that.lockOwnerId)
return false;
}
boolean this_present_lockOwnerName = true && this.isSetLockOwnerName();
boolean that_present_lockOwnerName = true && that.isSetLockOwnerName();
if (this_present_lockOwnerName || that_present_lockOwnerName) {
if (!(this_present_lockOwnerName && that_present_lockOwnerName))
return false;
if (!this.lockOwnerName.equals(that.lockOwnerName))
return false;
}
boolean this_present_inNative = true;
boolean that_present_inNative = true;
if (this_present_inNative || that_present_inNative) {
if (!(this_present_inNative && that_present_inNative))
return false;
if (this.inNative != that.inNative)
return false;
}
boolean this_present_suspended = true;
boolean that_present_suspended = true;
if (this_present_suspended || that_present_suspended) {
if (!(this_present_suspended && that_present_suspended))
return false;
if (this.suspended != that.suspended)
return false;
}
boolean this_present_threadState = true && this.isSetThreadState();
boolean that_present_threadState = true && that.isSetThreadState();
if (this_present_threadState || that_present_threadState) {
if (!(this_present_threadState && that_present_threadState))
return false;
if (!this.threadState.equals(that.threadState))
return false;
}
boolean this_present_stackTrace = true && this.isSetStackTrace();
boolean that_present_stackTrace = true && that.isSetStackTrace();
if (this_present_stackTrace || that_present_stackTrace) {
if (!(this_present_stackTrace && that_present_stackTrace))
return false;
if (!this.stackTrace.equals(that.stackTrace))
return false;
}
boolean this_present_lockedMonitors = true && this.isSetLockedMonitors();
boolean that_present_lockedMonitors = true && that.isSetLockedMonitors();
if (this_present_lockedMonitors || that_present_lockedMonitors) {
if (!(this_present_lockedMonitors && that_present_lockedMonitors))
return false;
if (!this.lockedMonitors.equals(that.lockedMonitors))
return false;
}
boolean this_present_lockedSynchronizers = true && this.isSetLockedSynchronizers();
boolean that_present_lockedSynchronizers = true && that.isSetLockedSynchronizers();
if (this_present_lockedSynchronizers || that_present_lockedSynchronizers) {
if (!(this_present_lockedSynchronizers && that_present_lockedSynchronizers))
return false;
if (!this.lockedSynchronizers.equals(that.lockedSynchronizers))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetThreadName()) ? 131071 : 524287);
if (isSetThreadName())
hashCode = hashCode * 8191 + threadName.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(threadId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(blockedTime);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(blockedCount);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(waitedTime);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(waitedCount);
hashCode = hashCode * 8191 + ((isSetLockName()) ? 131071 : 524287);
if (isSetLockName())
hashCode = hashCode * 8191 + lockName.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lockOwnerId);
hashCode = hashCode * 8191 + ((isSetLockOwnerName()) ? 131071 : 524287);
if (isSetLockOwnerName())
hashCode = hashCode * 8191 + lockOwnerName.hashCode();
hashCode = hashCode * 8191 + ((inNative) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((suspended) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetThreadState()) ? 131071 : 524287);
if (isSetThreadState())
hashCode = hashCode * 8191 + threadState.getValue();
hashCode = hashCode * 8191 + ((isSetStackTrace()) ? 131071 : 524287);
if (isSetStackTrace())
hashCode = hashCode * 8191 + stackTrace.hashCode();
hashCode = hashCode * 8191 + ((isSetLockedMonitors()) ? 131071 : 524287);
if (isSetLockedMonitors())
hashCode = hashCode * 8191 + lockedMonitors.hashCode();
hashCode = hashCode * 8191 + ((isSetLockedSynchronizers()) ? 131071 : 524287);
if (isSetLockedSynchronizers())
hashCode = hashCode * 8191 + lockedSynchronizers.hashCode();
return hashCode;
}
@Override
public int compareTo(TThreadDump other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetThreadName()).compareTo(other.isSetThreadName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetThreadName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadName, other.threadName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetThreadId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadId, other.threadId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetBlockedTime()).compareTo(other.isSetBlockedTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockedTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedTime, other.blockedTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetBlockedCount()).compareTo(other.isSetBlockedCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockedCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedCount, other.blockedCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetWaitedTime()).compareTo(other.isSetWaitedTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWaitedTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.waitedTime, other.waitedTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetWaitedCount()).compareTo(other.isSetWaitedCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWaitedCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.waitedCount, other.waitedCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLockName()).compareTo(other.isSetLockName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLockName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockName, other.lockName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLockOwnerId()).compareTo(other.isSetLockOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLockOwnerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockOwnerId, other.lockOwnerId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLockOwnerName()).compareTo(other.isSetLockOwnerName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLockOwnerName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockOwnerName, other.lockOwnerName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetInNative()).compareTo(other.isSetInNative());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInNative()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inNative, other.inNative);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetSuspended()).compareTo(other.isSetSuspended());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuspended()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suspended, other.suspended);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetThreadState()).compareTo(other.isSetThreadState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetThreadState()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadState, other.threadState);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetStackTrace()).compareTo(other.isSetStackTrace());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStackTrace()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stackTrace, other.stackTrace);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLockedMonitors()).compareTo(other.isSetLockedMonitors());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLockedMonitors()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockedMonitors, other.lockedMonitors);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLockedSynchronizers()).compareTo(other.isSetLockedSynchronizers());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLockedSynchronizers()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockedSynchronizers, other.lockedSynchronizers);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
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("TThreadDump(");
boolean first = true;
sb.append("threadName:");
if (this.threadName == null) {
sb.append("null");
} else {
sb.append(this.threadName);
}
first = false;
if (!first) sb.append(", ");
sb.append("threadId:");
sb.append(this.threadId);
first = false;
if (!first) sb.append(", ");
sb.append("blockedTime:");
sb.append(this.blockedTime);
first = false;
if (!first) sb.append(", ");
sb.append("blockedCount:");
sb.append(this.blockedCount);
first = false;
if (!first) sb.append(", ");
sb.append("waitedTime:");
sb.append(this.waitedTime);
first = false;
if (!first) sb.append(", ");
sb.append("waitedCount:");
sb.append(this.waitedCount);
first = false;
if (!first) sb.append(", ");
sb.append("lockName:");
if (this.lockName == null) {
sb.append("null");
} else {
sb.append(this.lockName);
}
first = false;
if (!first) sb.append(", ");
sb.append("lockOwnerId:");
sb.append(this.lockOwnerId);
first = false;
if (!first) sb.append(", ");
sb.append("lockOwnerName:");
if (this.lockOwnerName == null) {
sb.append("null");
} else {
sb.append(this.lockOwnerName);
}
first = false;
if (!first) sb.append(", ");
sb.append("inNative:");
sb.append(this.inNative);
first = false;
if (!first) sb.append(", ");
sb.append("suspended:");
sb.append(this.suspended);
first = false;
if (!first) sb.append(", ");
sb.append("threadState:");
if (this.threadState == null) {
sb.append("null");
} else {
sb.append(this.threadState);
}
first = false;
if (!first) sb.append(", ");
sb.append("stackTrace:");
if (this.stackTrace == null) {
sb.append("null");
} else {
sb.append(this.stackTrace);
}
first = false;
if (!first) sb.append(", ");
sb.append("lockedMonitors:");
if (this.lockedMonitors == null) {
sb.append("null");
} else {
sb.append(this.lockedMonitors);
}
first = false;
if (!first) sb.append(", ");
sb.append("lockedSynchronizers:");
if (this.lockedSynchronizers == null) {
sb.append("null");
} else {
sb.append(this.lockedSynchronizers);
}
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 TThreadDumpStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TThreadDumpStandardScheme getScheme() {
return new TThreadDumpStandardScheme();
}
}
private static class TThreadDumpStandardScheme extends org.apache.thrift.scheme.StandardScheme<TThreadDump> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TThreadDump 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: // THREAD_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.threadName = iprot.readString();
struct.setThreadNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // THREAD_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.threadId = iprot.readI64();
struct.setThreadIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // BLOCKED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockedTime = iprot.readI64();
struct.setBlockedTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // BLOCKED_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockedCount = iprot.readI64();
struct.setBlockedCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // WAITED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.waitedTime = iprot.readI64();
struct.setWaitedTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // WAITED_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.waitedCount = iprot.readI64();
struct.setWaitedCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // LOCK_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.lockName = iprot.readString();
struct.setLockNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // LOCK_OWNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.lockOwnerId = iprot.readI64();
struct.setLockOwnerIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // LOCK_OWNER_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.lockOwnerName = iprot.readString();
struct.setLockOwnerNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // IN_NATIVE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.inNative = iprot.readBool();
struct.setInNativeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // SUSPENDED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.suspended = iprot.readBool();
struct.setSuspendedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // THREAD_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.threadState = com.navercorp.pinpoint.thrift.dto.command.TThreadState.findByValue(iprot.readI32());
struct.setThreadStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // STACK_TRACE
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.stackTrace = new java.util.ArrayList<java.lang.String>(_list0.size);
java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
struct.stackTrace.add(_elem1);
}
iprot.readListEnd();
}
struct.setStackTraceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // LOCKED_MONITORS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
struct.lockedMonitors = new java.util.ArrayList<TMonitorInfo>(_list3.size);
TMonitorInfo _elem4;
for (int _i5 = 0; _i5 < _list3.size; ++_i5)
{
_elem4 = new TMonitorInfo();
_elem4.read(iprot);
struct.lockedMonitors.add(_elem4);
}
iprot.readListEnd();
}
struct.setLockedMonitorsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // LOCKED_SYNCHRONIZERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
struct.lockedSynchronizers = new java.util.ArrayList<java.lang.String>(_list6.size);
java.lang.String _elem7;
for (int _i8 = 0; _i8 < _list6.size; ++_i8)
{
_elem7 = iprot.readString();
struct.lockedSynchronizers.add(_elem7);
}
iprot.readListEnd();
}
struct.setLockedSynchronizersIsSet(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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TThreadDump struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.threadName != null) {
oprot.writeFieldBegin(THREAD_NAME_FIELD_DESC);
oprot.writeString(struct.threadName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(THREAD_ID_FIELD_DESC);
oprot.writeI64(struct.threadId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BLOCKED_TIME_FIELD_DESC);
oprot.writeI64(struct.blockedTime);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BLOCKED_COUNT_FIELD_DESC);
oprot.writeI64(struct.blockedCount);
oprot.writeFieldEnd();
oprot.writeFieldBegin(WAITED_TIME_FIELD_DESC);
oprot.writeI64(struct.waitedTime);
oprot.writeFieldEnd();
oprot.writeFieldBegin(WAITED_COUNT_FIELD_DESC);
oprot.writeI64(struct.waitedCount);
oprot.writeFieldEnd();
if (struct.lockName != null) {
oprot.writeFieldBegin(LOCK_NAME_FIELD_DESC);
oprot.writeString(struct.lockName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(LOCK_OWNER_ID_FIELD_DESC);
oprot.writeI64(struct.lockOwnerId);
oprot.writeFieldEnd();
if (struct.lockOwnerName != null) {
oprot.writeFieldBegin(LOCK_OWNER_NAME_FIELD_DESC);
oprot.writeString(struct.lockOwnerName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(IN_NATIVE_FIELD_DESC);
oprot.writeBool(struct.inNative);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SUSPENDED_FIELD_DESC);
oprot.writeBool(struct.suspended);
oprot.writeFieldEnd();
if (struct.threadState != null) {
oprot.writeFieldBegin(THREAD_STATE_FIELD_DESC);
oprot.writeI32(struct.threadState.getValue());
oprot.writeFieldEnd();
}
if (struct.stackTrace != null) {
oprot.writeFieldBegin(STACK_TRACE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.stackTrace.size()));
for (java.lang.String _iter9 : struct.stackTrace)
{
oprot.writeString(_iter9);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.lockedMonitors != null) {
oprot.writeFieldBegin(LOCKED_MONITORS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.lockedMonitors.size()));
for (TMonitorInfo _iter10 : struct.lockedMonitors)
{
_iter10.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.lockedSynchronizers != null) {
oprot.writeFieldBegin(LOCKED_SYNCHRONIZERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.lockedSynchronizers.size()));
for (java.lang.String _iter11 : struct.lockedSynchronizers)
{
oprot.writeString(_iter11);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TThreadDumpTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TThreadDumpTupleScheme getScheme() {
return new TThreadDumpTupleScheme();
}
}
private static class TThreadDumpTupleScheme extends org.apache.thrift.scheme.TupleScheme<TThreadDump> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TThreadDump 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.isSetThreadName()) {
optionals.set(0);
}
if (struct.isSetThreadId()) {
optionals.set(1);
}
if (struct.isSetBlockedTime()) {
optionals.set(2);
}
if (struct.isSetBlockedCount()) {
optionals.set(3);
}
if (struct.isSetWaitedTime()) {
optionals.set(4);
}
if (struct.isSetWaitedCount()) {
optionals.set(5);
}
if (struct.isSetLockName()) {
optionals.set(6);
}
if (struct.isSetLockOwnerId()) {
optionals.set(7);
}
if (struct.isSetLockOwnerName()) {
optionals.set(8);
}
if (struct.isSetInNative()) {
optionals.set(9);
}
if (struct.isSetSuspended()) {
optionals.set(10);
}
if (struct.isSetThreadState()) {
optionals.set(11);
}
if (struct.isSetStackTrace()) {
optionals.set(12);
}
if (struct.isSetLockedMonitors()) {
optionals.set(13);
}
if (struct.isSetLockedSynchronizers()) {
optionals.set(14);
}
oprot.writeBitSet(optionals, 15);
if (struct.isSetThreadName()) {
oprot.writeString(struct.threadName);
}
if (struct.isSetThreadId()) {
oprot.writeI64(struct.threadId);
}
if (struct.isSetBlockedTime()) {
oprot.writeI64(struct.blockedTime);
}
if (struct.isSetBlockedCount()) {
oprot.writeI64(struct.blockedCount);
}
if (struct.isSetWaitedTime()) {
oprot.writeI64(struct.waitedTime);
}
if (struct.isSetWaitedCount()) {
oprot.writeI64(struct.waitedCount);
}
if (struct.isSetLockName()) {
oprot.writeString(struct.lockName);
}
if (struct.isSetLockOwnerId()) {
oprot.writeI64(struct.lockOwnerId);
}
if (struct.isSetLockOwnerName()) {
oprot.writeString(struct.lockOwnerName);
}
if (struct.isSetInNative()) {
oprot.writeBool(struct.inNative);
}
if (struct.isSetSuspended()) {
oprot.writeBool(struct.suspended);
}
if (struct.isSetThreadState()) {
oprot.writeI32(struct.threadState.getValue());
}
if (struct.isSetStackTrace()) {
{
oprot.writeI32(struct.stackTrace.size());
for (java.lang.String _iter12 : struct.stackTrace)
{
oprot.writeString(_iter12);
}
}
}
if (struct.isSetLockedMonitors()) {
{
oprot.writeI32(struct.lockedMonitors.size());
for (TMonitorInfo _iter13 : struct.lockedMonitors)
{
_iter13.write(oprot);
}
}
}
if (struct.isSetLockedSynchronizers()) {
{
oprot.writeI32(struct.lockedSynchronizers.size());
for (java.lang.String _iter14 : struct.lockedSynchronizers)
{
oprot.writeString(_iter14);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TThreadDump struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
struct.threadName = iprot.readString();
struct.setThreadNameIsSet(true);
}
if (incoming.get(1)) {
struct.threadId = iprot.readI64();
struct.setThreadIdIsSet(true);
}
if (incoming.get(2)) {
struct.blockedTime = iprot.readI64();
struct.setBlockedTimeIsSet(true);
}
if (incoming.get(3)) {
struct.blockedCount = iprot.readI64();
struct.setBlockedCountIsSet(true);
}
if (incoming.get(4)) {
struct.waitedTime = iprot.readI64();
struct.setWaitedTimeIsSet(true);
}
if (incoming.get(5)) {
struct.waitedCount = iprot.readI64();
struct.setWaitedCountIsSet(true);
}
if (incoming.get(6)) {
struct.lockName = iprot.readString();
struct.setLockNameIsSet(true);
}
if (incoming.get(7)) {
struct.lockOwnerId = iprot.readI64();
struct.setLockOwnerIdIsSet(true);
}
if (incoming.get(8)) {
struct.lockOwnerName = iprot.readString();
struct.setLockOwnerNameIsSet(true);
}
if (incoming.get(9)) {
struct.inNative = iprot.readBool();
struct.setInNativeIsSet(true);
}
if (incoming.get(10)) {
struct.suspended = iprot.readBool();
struct.setSuspendedIsSet(true);
}
if (incoming.get(11)) {
struct.threadState = com.navercorp.pinpoint.thrift.dto.command.TThreadState.findByValue(iprot.readI32());
struct.setThreadStateIsSet(true);
}
if (incoming.get(12)) {
{
org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.stackTrace = new java.util.ArrayList<java.lang.String>(_list15.size);
java.lang.String _elem16;
for (int _i17 = 0; _i17 < _list15.size; ++_i17)
{
_elem16 = iprot.readString();
struct.stackTrace.add(_elem16);
}
}
struct.setStackTraceIsSet(true);
}
if (incoming.get(13)) {
{
org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.lockedMonitors = new java.util.ArrayList<TMonitorInfo>(_list18.size);
TMonitorInfo _elem19;
for (int _i20 = 0; _i20 < _list18.size; ++_i20)
{
_elem19 = new TMonitorInfo();
_elem19.read(iprot);
struct.lockedMonitors.add(_elem19);
}
}
struct.setLockedMonitorsIsSet(true);
}
if (incoming.get(14)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.lockedSynchronizers = new java.util.ArrayList<java.lang.String>(_list21.size);
java.lang.String _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = iprot.readString();
struct.lockedSynchronizers.add(_elem22);
}
}
struct.setLockedSynchronizersIsSet(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();
}
}