/**
* 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;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)", date = "2017-04-20")
public class TAgentStat implements org.apache.thrift.TBase<TAgentStat, TAgentStat._Fields>, java.io.Serializable, Cloneable, Comparable<TAgentStat> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAgentStat");
private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("startTimestamp", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField COLLECT_INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("collectInterval", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField GC_FIELD_DESC = new org.apache.thrift.protocol.TField("gc", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final org.apache.thrift.protocol.TField CPU_LOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuLoad", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)30);
private static final org.apache.thrift.protocol.TField ACTIVE_TRACE_FIELD_DESC = new org.apache.thrift.protocol.TField("activeTrace", org.apache.thrift.protocol.TType.STRUCT, (short)40);
private static final org.apache.thrift.protocol.TField DATA_SOURCE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("dataSourceList", org.apache.thrift.protocol.TType.STRUCT, (short)50);
private static final org.apache.thrift.protocol.TField RESPONSE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("responseTime", org.apache.thrift.protocol.TType.STRUCT, (short)60);
private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.STRING, (short)200);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAgentStatStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAgentStatTupleSchemeFactory();
private java.lang.String agentId; // optional
private long startTimestamp; // optional
private long timestamp; // optional
private long collectInterval; // optional
private TJvmGc gc; // optional
private TCpuLoad cpuLoad; // optional
private TTransaction transaction; // optional
private TActiveTrace activeTrace; // optional
private TDataSourceList dataSourceList; // optional
private TResponseTime responseTime; // optional
private java.lang.String metadata; // 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 {
AGENT_ID((short)1, "agentId"),
START_TIMESTAMP((short)2, "startTimestamp"),
TIMESTAMP((short)3, "timestamp"),
COLLECT_INTERVAL((short)4, "collectInterval"),
GC((short)10, "gc"),
CPU_LOAD((short)20, "cpuLoad"),
TRANSACTION((short)30, "transaction"),
ACTIVE_TRACE((short)40, "activeTrace"),
DATA_SOURCE_LIST((short)50, "dataSourceList"),
RESPONSE_TIME((short)60, "responseTime"),
METADATA((short)200, "metadata");
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: // AGENT_ID
return AGENT_ID;
case 2: // START_TIMESTAMP
return START_TIMESTAMP;
case 3: // TIMESTAMP
return TIMESTAMP;
case 4: // COLLECT_INTERVAL
return COLLECT_INTERVAL;
case 10: // GC
return GC;
case 20: // CPU_LOAD
return CPU_LOAD;
case 30: // TRANSACTION
return TRANSACTION;
case 40: // ACTIVE_TRACE
return ACTIVE_TRACE;
case 50: // DATA_SOURCE_LIST
return DATA_SOURCE_LIST;
case 60: // RESPONSE_TIME
return RESPONSE_TIME;
case 200: // METADATA
return METADATA;
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 __STARTTIMESTAMP_ISSET_ID = 0;
private static final int __TIMESTAMP_ISSET_ID = 1;
private static final int __COLLECTINTERVAL_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.AGENT_ID,_Fields.START_TIMESTAMP,_Fields.TIMESTAMP,_Fields.COLLECT_INTERVAL,_Fields.GC,_Fields.CPU_LOAD,_Fields.TRANSACTION,_Fields.ACTIVE_TRACE,_Fields.DATA_SOURCE_LIST,_Fields.RESPONSE_TIME,_Fields.METADATA};
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.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.START_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("startTimestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLLECT_INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("collectInterval", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.GC, new org.apache.thrift.meta_data.FieldMetaData("gc", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TJvmGc.class)));
tmpMap.put(_Fields.CPU_LOAD, new org.apache.thrift.meta_data.FieldMetaData("cpuLoad", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCpuLoad.class)));
tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransaction.class)));
tmpMap.put(_Fields.ACTIVE_TRACE, new org.apache.thrift.meta_data.FieldMetaData("activeTrace", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TActiveTrace.class)));
tmpMap.put(_Fields.DATA_SOURCE_LIST, new org.apache.thrift.meta_data.FieldMetaData("dataSourceList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TDataSourceList")));
tmpMap.put(_Fields.RESPONSE_TIME, new org.apache.thrift.meta_data.FieldMetaData("responseTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResponseTime.class)));
tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TAgentStat.class, metaDataMap);
}
public TAgentStat() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TAgentStat(TAgentStat other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetAgentId()) {
this.agentId = other.agentId;
}
this.startTimestamp = other.startTimestamp;
this.timestamp = other.timestamp;
this.collectInterval = other.collectInterval;
if (other.isSetGc()) {
this.gc = new TJvmGc(other.gc);
}
if (other.isSetCpuLoad()) {
this.cpuLoad = new TCpuLoad(other.cpuLoad);
}
if (other.isSetTransaction()) {
this.transaction = new TTransaction(other.transaction);
}
if (other.isSetActiveTrace()) {
this.activeTrace = new TActiveTrace(other.activeTrace);
}
if (other.isSetDataSourceList()) {
this.dataSourceList = new TDataSourceList(other.dataSourceList);
}
if (other.isSetResponseTime()) {
this.responseTime = new TResponseTime(other.responseTime);
}
if (other.isSetMetadata()) {
this.metadata = other.metadata;
}
}
public TAgentStat deepCopy() {
return new TAgentStat(this);
}
@Override
public void clear() {
this.agentId = null;
setStartTimestampIsSet(false);
this.startTimestamp = 0;
setTimestampIsSet(false);
this.timestamp = 0;
setCollectIntervalIsSet(false);
this.collectInterval = 0;
this.gc = null;
this.cpuLoad = null;
this.transaction = null;
this.activeTrace = null;
this.dataSourceList = null;
this.responseTime = null;
this.metadata = null;
}
public java.lang.String getAgentId() {
return this.agentId;
}
public void setAgentId(java.lang.String agentId) {
this.agentId = agentId;
}
public void unsetAgentId() {
this.agentId = null;
}
/** Returns true if field agentId is set (has been assigned a value) and false otherwise */
public boolean isSetAgentId() {
return this.agentId != null;
}
public void setAgentIdIsSet(boolean value) {
if (!value) {
this.agentId = null;
}
}
public long getStartTimestamp() {
return this.startTimestamp;
}
public void setStartTimestamp(long startTimestamp) {
this.startTimestamp = startTimestamp;
setStartTimestampIsSet(true);
}
public void unsetStartTimestamp() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIMESTAMP_ISSET_ID);
}
/** Returns true if field startTimestamp is set (has been assigned a value) and false otherwise */
public boolean isSetStartTimestamp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIMESTAMP_ISSET_ID);
}
public void setStartTimestampIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIMESTAMP_ISSET_ID, value);
}
public long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
}
public void unsetTimestamp() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public long getCollectInterval() {
return this.collectInterval;
}
public void setCollectInterval(long collectInterval) {
this.collectInterval = collectInterval;
setCollectIntervalIsSet(true);
}
public void unsetCollectInterval() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLLECTINTERVAL_ISSET_ID);
}
/** Returns true if field collectInterval is set (has been assigned a value) and false otherwise */
public boolean isSetCollectInterval() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLLECTINTERVAL_ISSET_ID);
}
public void setCollectIntervalIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLLECTINTERVAL_ISSET_ID, value);
}
public TJvmGc getGc() {
return this.gc;
}
public void setGc(TJvmGc gc) {
this.gc = gc;
}
public void unsetGc() {
this.gc = null;
}
/** Returns true if field gc is set (has been assigned a value) and false otherwise */
public boolean isSetGc() {
return this.gc != null;
}
public void setGcIsSet(boolean value) {
if (!value) {
this.gc = null;
}
}
public TCpuLoad getCpuLoad() {
return this.cpuLoad;
}
public void setCpuLoad(TCpuLoad cpuLoad) {
this.cpuLoad = cpuLoad;
}
public void unsetCpuLoad() {
this.cpuLoad = null;
}
/** Returns true if field cpuLoad is set (has been assigned a value) and false otherwise */
public boolean isSetCpuLoad() {
return this.cpuLoad != null;
}
public void setCpuLoadIsSet(boolean value) {
if (!value) {
this.cpuLoad = null;
}
}
public TTransaction getTransaction() {
return this.transaction;
}
public void setTransaction(TTransaction transaction) {
this.transaction = transaction;
}
public void unsetTransaction() {
this.transaction = null;
}
/** Returns true if field transaction is set (has been assigned a value) and false otherwise */
public boolean isSetTransaction() {
return this.transaction != null;
}
public void setTransactionIsSet(boolean value) {
if (!value) {
this.transaction = null;
}
}
public TActiveTrace getActiveTrace() {
return this.activeTrace;
}
public void setActiveTrace(TActiveTrace activeTrace) {
this.activeTrace = activeTrace;
}
public void unsetActiveTrace() {
this.activeTrace = null;
}
/** Returns true if field activeTrace is set (has been assigned a value) and false otherwise */
public boolean isSetActiveTrace() {
return this.activeTrace != null;
}
public void setActiveTraceIsSet(boolean value) {
if (!value) {
this.activeTrace = null;
}
}
public TDataSourceList getDataSourceList() {
return this.dataSourceList;
}
public void setDataSourceList(TDataSourceList dataSourceList) {
this.dataSourceList = dataSourceList;
}
public void unsetDataSourceList() {
this.dataSourceList = null;
}
/** Returns true if field dataSourceList is set (has been assigned a value) and false otherwise */
public boolean isSetDataSourceList() {
return this.dataSourceList != null;
}
public void setDataSourceListIsSet(boolean value) {
if (!value) {
this.dataSourceList = null;
}
}
public TResponseTime getResponseTime() {
return this.responseTime;
}
public void setResponseTime(TResponseTime responseTime) {
this.responseTime = responseTime;
}
public void unsetResponseTime() {
this.responseTime = null;
}
/** Returns true if field responseTime is set (has been assigned a value) and false otherwise */
public boolean isSetResponseTime() {
return this.responseTime != null;
}
public void setResponseTimeIsSet(boolean value) {
if (!value) {
this.responseTime = null;
}
}
public java.lang.String getMetadata() {
return this.metadata;
}
public void setMetadata(java.lang.String metadata) {
this.metadata = metadata;
}
public void unsetMetadata() {
this.metadata = null;
}
/** Returns true if field metadata is set (has been assigned a value) and false otherwise */
public boolean isSetMetadata() {
return this.metadata != null;
}
public void setMetadataIsSet(boolean value) {
if (!value) {
this.metadata = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AGENT_ID:
if (value == null) {
unsetAgentId();
} else {
setAgentId((java.lang.String)value);
}
break;
case START_TIMESTAMP:
if (value == null) {
unsetStartTimestamp();
} else {
setStartTimestamp((java.lang.Long)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((java.lang.Long)value);
}
break;
case COLLECT_INTERVAL:
if (value == null) {
unsetCollectInterval();
} else {
setCollectInterval((java.lang.Long)value);
}
break;
case GC:
if (value == null) {
unsetGc();
} else {
setGc((TJvmGc)value);
}
break;
case CPU_LOAD:
if (value == null) {
unsetCpuLoad();
} else {
setCpuLoad((TCpuLoad)value);
}
break;
case TRANSACTION:
if (value == null) {
unsetTransaction();
} else {
setTransaction((TTransaction)value);
}
break;
case ACTIVE_TRACE:
if (value == null) {
unsetActiveTrace();
} else {
setActiveTrace((TActiveTrace)value);
}
break;
case DATA_SOURCE_LIST:
if (value == null) {
unsetDataSourceList();
} else {
setDataSourceList((TDataSourceList)value);
}
break;
case RESPONSE_TIME:
if (value == null) {
unsetResponseTime();
} else {
setResponseTime((TResponseTime)value);
}
break;
case METADATA:
if (value == null) {
unsetMetadata();
} else {
setMetadata((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AGENT_ID:
return getAgentId();
case START_TIMESTAMP:
return getStartTimestamp();
case TIMESTAMP:
return getTimestamp();
case COLLECT_INTERVAL:
return getCollectInterval();
case GC:
return getGc();
case CPU_LOAD:
return getCpuLoad();
case TRANSACTION:
return getTransaction();
case ACTIVE_TRACE:
return getActiveTrace();
case DATA_SOURCE_LIST:
return getDataSourceList();
case RESPONSE_TIME:
return getResponseTime();
case METADATA:
return getMetadata();
}
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 AGENT_ID:
return isSetAgentId();
case START_TIMESTAMP:
return isSetStartTimestamp();
case TIMESTAMP:
return isSetTimestamp();
case COLLECT_INTERVAL:
return isSetCollectInterval();
case GC:
return isSetGc();
case CPU_LOAD:
return isSetCpuLoad();
case TRANSACTION:
return isSetTransaction();
case ACTIVE_TRACE:
return isSetActiveTrace();
case DATA_SOURCE_LIST:
return isSetDataSourceList();
case RESPONSE_TIME:
return isSetResponseTime();
case METADATA:
return isSetMetadata();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TAgentStat)
return this.equals((TAgentStat)that);
return false;
}
public boolean equals(TAgentStat that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_agentId = true && this.isSetAgentId();
boolean that_present_agentId = true && that.isSetAgentId();
if (this_present_agentId || that_present_agentId) {
if (!(this_present_agentId && that_present_agentId))
return false;
if (!this.agentId.equals(that.agentId))
return false;
}
boolean this_present_startTimestamp = true && this.isSetStartTimestamp();
boolean that_present_startTimestamp = true && that.isSetStartTimestamp();
if (this_present_startTimestamp || that_present_startTimestamp) {
if (!(this_present_startTimestamp && that_present_startTimestamp))
return false;
if (this.startTimestamp != that.startTimestamp)
return false;
}
boolean this_present_timestamp = true && this.isSetTimestamp();
boolean that_present_timestamp = true && that.isSetTimestamp();
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
boolean this_present_collectInterval = true && this.isSetCollectInterval();
boolean that_present_collectInterval = true && that.isSetCollectInterval();
if (this_present_collectInterval || that_present_collectInterval) {
if (!(this_present_collectInterval && that_present_collectInterval))
return false;
if (this.collectInterval != that.collectInterval)
return false;
}
boolean this_present_gc = true && this.isSetGc();
boolean that_present_gc = true && that.isSetGc();
if (this_present_gc || that_present_gc) {
if (!(this_present_gc && that_present_gc))
return false;
if (!this.gc.equals(that.gc))
return false;
}
boolean this_present_cpuLoad = true && this.isSetCpuLoad();
boolean that_present_cpuLoad = true && that.isSetCpuLoad();
if (this_present_cpuLoad || that_present_cpuLoad) {
if (!(this_present_cpuLoad && that_present_cpuLoad))
return false;
if (!this.cpuLoad.equals(that.cpuLoad))
return false;
}
boolean this_present_transaction = true && this.isSetTransaction();
boolean that_present_transaction = true && that.isSetTransaction();
if (this_present_transaction || that_present_transaction) {
if (!(this_present_transaction && that_present_transaction))
return false;
if (!this.transaction.equals(that.transaction))
return false;
}
boolean this_present_activeTrace = true && this.isSetActiveTrace();
boolean that_present_activeTrace = true && that.isSetActiveTrace();
if (this_present_activeTrace || that_present_activeTrace) {
if (!(this_present_activeTrace && that_present_activeTrace))
return false;
if (!this.activeTrace.equals(that.activeTrace))
return false;
}
boolean this_present_dataSourceList = true && this.isSetDataSourceList();
boolean that_present_dataSourceList = true && that.isSetDataSourceList();
if (this_present_dataSourceList || that_present_dataSourceList) {
if (!(this_present_dataSourceList && that_present_dataSourceList))
return false;
if (!this.dataSourceList.equals(that.dataSourceList))
return false;
}
boolean this_present_responseTime = true && this.isSetResponseTime();
boolean that_present_responseTime = true && that.isSetResponseTime();
if (this_present_responseTime || that_present_responseTime) {
if (!(this_present_responseTime && that_present_responseTime))
return false;
if (!this.responseTime.equals(that.responseTime))
return false;
}
boolean this_present_metadata = true && this.isSetMetadata();
boolean that_present_metadata = true && that.isSetMetadata();
if (this_present_metadata || that_present_metadata) {
if (!(this_present_metadata && that_present_metadata))
return false;
if (!this.metadata.equals(that.metadata))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAgentId()) ? 131071 : 524287);
if (isSetAgentId())
hashCode = hashCode * 8191 + agentId.hashCode();
hashCode = hashCode * 8191 + ((isSetStartTimestamp()) ? 131071 : 524287);
if (isSetStartTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTimestamp);
hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
if (isSetTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
hashCode = hashCode * 8191 + ((isSetCollectInterval()) ? 131071 : 524287);
if (isSetCollectInterval())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(collectInterval);
hashCode = hashCode * 8191 + ((isSetGc()) ? 131071 : 524287);
if (isSetGc())
hashCode = hashCode * 8191 + gc.hashCode();
hashCode = hashCode * 8191 + ((isSetCpuLoad()) ? 131071 : 524287);
if (isSetCpuLoad())
hashCode = hashCode * 8191 + cpuLoad.hashCode();
hashCode = hashCode * 8191 + ((isSetTransaction()) ? 131071 : 524287);
if (isSetTransaction())
hashCode = hashCode * 8191 + transaction.hashCode();
hashCode = hashCode * 8191 + ((isSetActiveTrace()) ? 131071 : 524287);
if (isSetActiveTrace())
hashCode = hashCode * 8191 + activeTrace.hashCode();
hashCode = hashCode * 8191 + ((isSetDataSourceList()) ? 131071 : 524287);
if (isSetDataSourceList())
hashCode = hashCode * 8191 + dataSourceList.hashCode();
hashCode = hashCode * 8191 + ((isSetResponseTime()) ? 131071 : 524287);
if (isSetResponseTime())
hashCode = hashCode * 8191 + responseTime.hashCode();
hashCode = hashCode * 8191 + ((isSetMetadata()) ? 131071 : 524287);
if (isSetMetadata())
hashCode = hashCode * 8191 + metadata.hashCode();
return hashCode;
}
@Override
public int compareTo(TAgentStat other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAgentId()).compareTo(other.isSetAgentId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAgentId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, other.agentId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetStartTimestamp()).compareTo(other.isSetStartTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTimestamp, other.startTimestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetCollectInterval()).compareTo(other.isSetCollectInterval());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCollectInterval()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collectInterval, other.collectInterval);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGc()).compareTo(other.isSetGc());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGc()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc, other.gc);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetCpuLoad()).compareTo(other.isSetCpuLoad());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCpuLoad()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuLoad, other.cpuLoad);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTransaction()).compareTo(other.isSetTransaction());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransaction()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, other.transaction);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetActiveTrace()).compareTo(other.isSetActiveTrace());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetActiveTrace()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeTrace, other.activeTrace);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetDataSourceList()).compareTo(other.isSetDataSourceList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDataSourceList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataSourceList, other.dataSourceList);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetResponseTime()).compareTo(other.isSetResponseTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResponseTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.responseTime, other.responseTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMetadata()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
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("TAgentStat(");
boolean first = true;
if (isSetAgentId()) {
sb.append("agentId:");
if (this.agentId == null) {
sb.append("null");
} else {
sb.append(this.agentId);
}
first = false;
}
if (isSetStartTimestamp()) {
if (!first) sb.append(", ");
sb.append("startTimestamp:");
sb.append(this.startTimestamp);
first = false;
}
if (isSetTimestamp()) {
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
}
if (isSetCollectInterval()) {
if (!first) sb.append(", ");
sb.append("collectInterval:");
sb.append(this.collectInterval);
first = false;
}
if (isSetGc()) {
if (!first) sb.append(", ");
sb.append("gc:");
if (this.gc == null) {
sb.append("null");
} else {
sb.append(this.gc);
}
first = false;
}
if (isSetCpuLoad()) {
if (!first) sb.append(", ");
sb.append("cpuLoad:");
if (this.cpuLoad == null) {
sb.append("null");
} else {
sb.append(this.cpuLoad);
}
first = false;
}
if (isSetTransaction()) {
if (!first) sb.append(", ");
sb.append("transaction:");
if (this.transaction == null) {
sb.append("null");
} else {
sb.append(this.transaction);
}
first = false;
}
if (isSetActiveTrace()) {
if (!first) sb.append(", ");
sb.append("activeTrace:");
if (this.activeTrace == null) {
sb.append("null");
} else {
sb.append(this.activeTrace);
}
first = false;
}
if (isSetDataSourceList()) {
if (!first) sb.append(", ");
sb.append("dataSourceList:");
if (this.dataSourceList == null) {
sb.append("null");
} else {
sb.append(this.dataSourceList);
}
first = false;
}
if (isSetResponseTime()) {
if (!first) sb.append(", ");
sb.append("responseTime:");
if (this.responseTime == null) {
sb.append("null");
} else {
sb.append(this.responseTime);
}
first = false;
}
if (isSetMetadata()) {
if (!first) sb.append(", ");
sb.append("metadata:");
if (this.metadata == null) {
sb.append("null");
} else {
sb.append(this.metadata);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (gc != null) {
gc.validate();
}
if (cpuLoad != null) {
cpuLoad.validate();
}
if (transaction != null) {
transaction.validate();
}
if (activeTrace != null) {
activeTrace.validate();
}
if (responseTime != null) {
responseTime.validate();
}
}
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 TAgentStatStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAgentStatStandardScheme getScheme() {
return new TAgentStatStandardScheme();
}
}
private static class TAgentStatStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAgentStat> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAgentStat 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: // AGENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.agentId = iprot.readString();
struct.setAgentIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.startTimestamp = iprot.readI64();
struct.setStartTimestampIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COLLECT_INTERVAL
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.collectInterval = iprot.readI64();
struct.setCollectIntervalIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // GC
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gc = new TJvmGc();
struct.gc.read(iprot);
struct.setGcIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 20: // CPU_LOAD
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.cpuLoad = new TCpuLoad();
struct.cpuLoad.read(iprot);
struct.setCpuLoadIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 30: // TRANSACTION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.transaction = new TTransaction();
struct.transaction.read(iprot);
struct.setTransactionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 40: // ACTIVE_TRACE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.activeTrace = new TActiveTrace();
struct.activeTrace.read(iprot);
struct.setActiveTraceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 50: // DATA_SOURCE_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.dataSourceList = new TDataSourceList();
struct.dataSourceList.read(iprot);
struct.setDataSourceListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 60: // RESPONSE_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.responseTime = new TResponseTime();
struct.responseTime.read(iprot);
struct.setResponseTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 200: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.metadata = iprot.readString();
struct.setMetadataIsSet(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, TAgentStat struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.agentId != null) {
if (struct.isSetAgentId()) {
oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
oprot.writeString(struct.agentId);
oprot.writeFieldEnd();
}
}
if (struct.isSetStartTimestamp()) {
oprot.writeFieldBegin(START_TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.startTimestamp);
oprot.writeFieldEnd();
}
if (struct.isSetTimestamp()) {
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
}
if (struct.isSetCollectInterval()) {
oprot.writeFieldBegin(COLLECT_INTERVAL_FIELD_DESC);
oprot.writeI64(struct.collectInterval);
oprot.writeFieldEnd();
}
if (struct.gc != null) {
if (struct.isSetGc()) {
oprot.writeFieldBegin(GC_FIELD_DESC);
struct.gc.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.cpuLoad != null) {
if (struct.isSetCpuLoad()) {
oprot.writeFieldBegin(CPU_LOAD_FIELD_DESC);
struct.cpuLoad.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.transaction != null) {
if (struct.isSetTransaction()) {
oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
struct.transaction.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.activeTrace != null) {
if (struct.isSetActiveTrace()) {
oprot.writeFieldBegin(ACTIVE_TRACE_FIELD_DESC);
struct.activeTrace.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.dataSourceList != null) {
if (struct.isSetDataSourceList()) {
oprot.writeFieldBegin(DATA_SOURCE_LIST_FIELD_DESC);
struct.dataSourceList.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.responseTime != null) {
if (struct.isSetResponseTime()) {
oprot.writeFieldBegin(RESPONSE_TIME_FIELD_DESC);
struct.responseTime.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.metadata != null) {
if (struct.isSetMetadata()) {
oprot.writeFieldBegin(METADATA_FIELD_DESC);
oprot.writeString(struct.metadata);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TAgentStatTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAgentStatTupleScheme getScheme() {
return new TAgentStatTupleScheme();
}
}
private static class TAgentStatTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAgentStat> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAgentStat 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.isSetAgentId()) {
optionals.set(0);
}
if (struct.isSetStartTimestamp()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
if (struct.isSetCollectInterval()) {
optionals.set(3);
}
if (struct.isSetGc()) {
optionals.set(4);
}
if (struct.isSetCpuLoad()) {
optionals.set(5);
}
if (struct.isSetTransaction()) {
optionals.set(6);
}
if (struct.isSetActiveTrace()) {
optionals.set(7);
}
if (struct.isSetDataSourceList()) {
optionals.set(8);
}
if (struct.isSetResponseTime()) {
optionals.set(9);
}
if (struct.isSetMetadata()) {
optionals.set(10);
}
oprot.writeBitSet(optionals, 11);
if (struct.isSetAgentId()) {
oprot.writeString(struct.agentId);
}
if (struct.isSetStartTimestamp()) {
oprot.writeI64(struct.startTimestamp);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
if (struct.isSetCollectInterval()) {
oprot.writeI64(struct.collectInterval);
}
if (struct.isSetGc()) {
struct.gc.write(oprot);
}
if (struct.isSetCpuLoad()) {
struct.cpuLoad.write(oprot);
}
if (struct.isSetTransaction()) {
struct.transaction.write(oprot);
}
if (struct.isSetActiveTrace()) {
struct.activeTrace.write(oprot);
}
if (struct.isSetDataSourceList()) {
struct.dataSourceList.write(oprot);
}
if (struct.isSetResponseTime()) {
struct.responseTime.write(oprot);
}
if (struct.isSetMetadata()) {
oprot.writeString(struct.metadata);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAgentStat struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
struct.agentId = iprot.readString();
struct.setAgentIdIsSet(true);
}
if (incoming.get(1)) {
struct.startTimestamp = iprot.readI64();
struct.setStartTimestampIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
if (incoming.get(3)) {
struct.collectInterval = iprot.readI64();
struct.setCollectIntervalIsSet(true);
}
if (incoming.get(4)) {
struct.gc = new TJvmGc();
struct.gc.read(iprot);
struct.setGcIsSet(true);
}
if (incoming.get(5)) {
struct.cpuLoad = new TCpuLoad();
struct.cpuLoad.read(iprot);
struct.setCpuLoadIsSet(true);
}
if (incoming.get(6)) {
struct.transaction = new TTransaction();
struct.transaction.read(iprot);
struct.setTransactionIsSet(true);
}
if (incoming.get(7)) {
struct.activeTrace = new TActiveTrace();
struct.activeTrace.read(iprot);
struct.setActiveTraceIsSet(true);
}
if (incoming.get(8)) {
struct.dataSourceList = new TDataSourceList();
struct.dataSourceList.read(iprot);
struct.setDataSourceListIsSet(true);
}
if (incoming.get(9)) {
struct.responseTime = new TResponseTime();
struct.responseTime.read(iprot);
struct.setResponseTimeIsSet(true);
}
if (incoming.get(10)) {
struct.metadata = iprot.readString();
struct.setMetadataIsSet(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();
}
}