/**
* 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 TCommandThreadDumpResponse implements org.apache.thrift.TBase<TCommandThreadDumpResponse, TCommandThreadDumpResponse._Fields>, java.io.Serializable, Cloneable, Comparable<TCommandThreadDumpResponse> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCommandThreadDumpResponse");
private static final org.apache.thrift.protocol.TField THREAD_DUMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("threadDumps", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCommandThreadDumpResponseStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCommandThreadDumpResponseTupleSchemeFactory();
private java.util.List<TThreadDump> threadDumps; // 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_DUMPS((short)1, "threadDumps");
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_DUMPS
return THREAD_DUMPS;
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
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_DUMPS, new org.apache.thrift.meta_data.FieldMetaData("threadDumps", 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, TThreadDump.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCommandThreadDumpResponse.class, metaDataMap);
}
public TCommandThreadDumpResponse() {
}
public TCommandThreadDumpResponse(
java.util.List<TThreadDump> threadDumps)
{
this();
this.threadDumps = threadDumps;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TCommandThreadDumpResponse(TCommandThreadDumpResponse other) {
if (other.isSetThreadDumps()) {
java.util.List<TThreadDump> __this__threadDumps = new java.util.ArrayList<TThreadDump>(other.threadDumps.size());
for (TThreadDump other_element : other.threadDumps) {
__this__threadDumps.add(new TThreadDump(other_element));
}
this.threadDumps = __this__threadDumps;
}
}
public TCommandThreadDumpResponse deepCopy() {
return new TCommandThreadDumpResponse(this);
}
@Override
public void clear() {
this.threadDumps = null;
}
public int getThreadDumpsSize() {
return (this.threadDumps == null) ? 0 : this.threadDumps.size();
}
public java.util.Iterator<TThreadDump> getThreadDumpsIterator() {
return (this.threadDumps == null) ? null : this.threadDumps.iterator();
}
public void addToThreadDumps(TThreadDump elem) {
if (this.threadDumps == null) {
this.threadDumps = new java.util.ArrayList<TThreadDump>();
}
this.threadDumps.add(elem);
}
public java.util.List<TThreadDump> getThreadDumps() {
return this.threadDumps;
}
public void setThreadDumps(java.util.List<TThreadDump> threadDumps) {
this.threadDumps = threadDumps;
}
public void unsetThreadDumps() {
this.threadDumps = null;
}
/** Returns true if field threadDumps is set (has been assigned a value) and false otherwise */
public boolean isSetThreadDumps() {
return this.threadDumps != null;
}
public void setThreadDumpsIsSet(boolean value) {
if (!value) {
this.threadDumps = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case THREAD_DUMPS:
if (value == null) {
unsetThreadDumps();
} else {
setThreadDumps((java.util.List<TThreadDump>)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case THREAD_DUMPS:
return getThreadDumps();
}
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_DUMPS:
return isSetThreadDumps();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TCommandThreadDumpResponse)
return this.equals((TCommandThreadDumpResponse)that);
return false;
}
public boolean equals(TCommandThreadDumpResponse that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_threadDumps = true && this.isSetThreadDumps();
boolean that_present_threadDumps = true && that.isSetThreadDumps();
if (this_present_threadDumps || that_present_threadDumps) {
if (!(this_present_threadDumps && that_present_threadDumps))
return false;
if (!this.threadDumps.equals(that.threadDumps))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetThreadDumps()) ? 131071 : 524287);
if (isSetThreadDumps())
hashCode = hashCode * 8191 + threadDumps.hashCode();
return hashCode;
}
@Override
public int compareTo(TCommandThreadDumpResponse other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetThreadDumps()).compareTo(other.isSetThreadDumps());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetThreadDumps()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadDumps, other.threadDumps);
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("TCommandThreadDumpResponse(");
boolean first = true;
sb.append("threadDumps:");
if (this.threadDumps == null) {
sb.append("null");
} else {
sb.append(this.threadDumps);
}
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 {
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 TCommandThreadDumpResponseStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCommandThreadDumpResponseStandardScheme getScheme() {
return new TCommandThreadDumpResponseStandardScheme();
}
}
private static class TCommandThreadDumpResponseStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCommandThreadDumpResponse> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCommandThreadDumpResponse 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_DUMPS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
struct.threadDumps = new java.util.ArrayList<TThreadDump>(_list24.size);
TThreadDump _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = new TThreadDump();
_elem25.read(iprot);
struct.threadDumps.add(_elem25);
}
iprot.readListEnd();
}
struct.setThreadDumpsIsSet(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, TCommandThreadDumpResponse struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.threadDumps != null) {
oprot.writeFieldBegin(THREAD_DUMPS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.threadDumps.size()));
for (TThreadDump _iter27 : struct.threadDumps)
{
_iter27.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TCommandThreadDumpResponseTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCommandThreadDumpResponseTupleScheme getScheme() {
return new TCommandThreadDumpResponseTupleScheme();
}
}
private static class TCommandThreadDumpResponseTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCommandThreadDumpResponse> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCommandThreadDumpResponse 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.isSetThreadDumps()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetThreadDumps()) {
{
oprot.writeI32(struct.threadDumps.size());
for (TThreadDump _iter28 : struct.threadDumps)
{
_iter28.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCommandThreadDumpResponse struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.threadDumps = new java.util.ArrayList<TThreadDump>(_list29.size);
TThreadDump _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = new TThreadDump();
_elem30.read(iprot);
struct.threadDumps.add(_elem30);
}
}
struct.setThreadDumpsIsSet(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();
}
}