From 483da5155d1a4c8089f67f3960394fcb44fa7fb9 Mon Sep 17 00:00:00 2001 From: Chisu Yu Date: Wed, 24 Apr 2013 07:16:35 +0000 Subject: [PATCH] =?UTF-8?q?[=EC=9C=A0=EC=B9=98=EC=88=98]=20[PINPOINT-184]?= =?UTF-8?q?=20spanchunk=EC=97=90=20service=20type,=20endpoint=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1546 84d0f5b1-2673-498c-a247-62c4ff18d310 --- build.sh | 3 +- makethrift.sh | 2 +- .../profiler/common/dto/thrift/AgentInfo.java | 2307 ++++---- .../common/dto/thrift/Annotation.java | 2313 ++++---- .../common/dto/thrift/ApiMetaData.java | 1717 +++--- .../common/dto/thrift/JVMInfoThriftDTO.java | 2829 +++++----- .../dto/thrift/RequestDataListThriftDTO.java | 1263 ++--- .../dto/thrift/RequestDataThriftDTO.java | 3071 +++++------ .../common/dto/thrift/RequestThriftDTO.java | 4043 +++++++------- .../com/profiler/common/dto/thrift/Span.java | 4659 +++++++++-------- .../profiler/common/dto/thrift/SpanChunk.java | 2214 ++++---- .../profiler/common/dto/thrift/SpanEvent.java | 4069 +++++++------- .../common/dto/thrift/SqlMetaData.java | 1527 +++--- .../java/com/profiler/context/SpanChunk.java | 14 +- src/main/thrift/Trace.thrift | 13 +- 15 files changed, 15140 insertions(+), 14904 deletions(-) diff --git a/build.sh b/build.sh index bee6b7a79..5d9956b0a 100755 --- a/build.sh +++ b/build.sh @@ -1 +1,2 @@ -# do nothing \ No newline at end of file +# do nothing +echo "Build from profiler-bootstrap" \ No newline at end of file diff --git a/makethrift.sh b/makethrift.sh index f63e35733..ce68b4652 100755 --- a/makethrift.sh +++ b/makethrift.sh @@ -1 +1 @@ -mvn clean eclipse:eclipse -P withThrift -Dthrift.executable.property=/Users/netspider/DEV-TOOLS/thrift-0.9.0/bin/thrift +mvn -P withThrift -Dthrift.executable.property=/Users/netspider/DEV-TOOLS/thrift-0.9.0/bin/thrift diff --git a/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java b/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java index 310f2693c..2a5653b0e 100644 --- a/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java +++ b/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java @@ -1,1152 +1,1155 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AgentInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AgentInfo"); - - private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField IP_FIELD_DESC = new org.apache.thrift.protocol.TField("ip", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ports", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationName", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)6); - private static final org.apache.thrift.protocol.TField IS_ALIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlive", org.apache.thrift.protocol.TType.BOOL, (short)7); - 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)8); - private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.I16, (short)9); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AgentInfoStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AgentInfoTupleSchemeFactory()); - } - - private String hostname; // required - private String ip; // required - private String ports; // required - private String agentId; // required - private String applicationName; // required - private short serviceType; // required - private boolean isAlive; // required - private long timestamp; // required - private short identifier; // 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 { - HOSTNAME((short)1, "hostname"), - IP((short)2, "ip"), - PORTS((short)3, "ports"), - AGENT_ID((short)4, "agentId"), - APPLICATION_NAME((short)5, "applicationName"), - SERVICE_TYPE((short)6, "serviceType"), - IS_ALIVE((short)7, "isAlive"), - TIMESTAMP((short)8, "timestamp"), - IDENTIFIER((short)9, "identifier"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // HOSTNAME - return HOSTNAME; - case 2: // IP - return IP; - case 3: // PORTS - return PORTS; - case 4: // AGENT_ID - return AGENT_ID; - case 5: // APPLICATION_NAME - return APPLICATION_NAME; - case 6: // SERVICE_TYPE - return SERVICE_TYPE; - case 7: // IS_ALIVE - return IS_ALIVE; - case 8: // TIMESTAMP - return TIMESTAMP; - case 9: // IDENTIFIER - return IDENTIFIER; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SERVICETYPE_ISSET_ID = 0; - private static final int __ISALIVE_ISSET_ID = 1; - private static final int __TIMESTAMP_ISSET_ID = 2; - private static final int __IDENTIFIER_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IP, new org.apache.thrift.meta_data.FieldMetaData("ip", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PORTS, new org.apache.thrift.meta_data.FieldMetaData("ports", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("applicationName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.IS_ALIVE, new org.apache.thrift.meta_data.FieldMetaData("isAlive", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AgentInfo.class, metaDataMap); - } - - public AgentInfo() { - } - - public AgentInfo( - String hostname, - String ip, - String ports, - String agentId, - String applicationName, - short serviceType, - boolean isAlive, - long timestamp, - short identifier) - { - this(); - this.hostname = hostname; - this.ip = ip; - this.ports = ports; - this.agentId = agentId; - this.applicationName = applicationName; - this.serviceType = serviceType; - setServiceTypeIsSet(true); - this.isAlive = isAlive; - setIsAliveIsSet(true); - this.timestamp = timestamp; - setTimestampIsSet(true); - this.identifier = identifier; - setIdentifierIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public AgentInfo(AgentInfo other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetHostname()) { - this.hostname = other.hostname; - } - if (other.isSetIp()) { - this.ip = other.ip; - } - if (other.isSetPorts()) { - this.ports = other.ports; - } - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - if (other.isSetApplicationName()) { - this.applicationName = other.applicationName; - } - this.serviceType = other.serviceType; - this.isAlive = other.isAlive; - this.timestamp = other.timestamp; - this.identifier = other.identifier; - } - - public AgentInfo deepCopy() { - return new AgentInfo(this); - } - - @Override - public void clear() { - this.hostname = null; - this.ip = null; - this.ports = null; - this.agentId = null; - this.applicationName = null; - setServiceTypeIsSet(false); - this.serviceType = 0; - setIsAliveIsSet(false); - this.isAlive = false; - setTimestampIsSet(false); - this.timestamp = 0; - setIdentifierIsSet(false); - this.identifier = 0; - } - - public String getHostname() { - return this.hostname; - } - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - public void unsetHostname() { - this.hostname = null; - } - - /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ - public boolean isSetHostname() { - return this.hostname != null; - } - - public void setHostnameIsSet(boolean value) { - if (!value) { - this.hostname = null; - } - } - - public String getIp() { - return this.ip; - } - - public void setIp(String ip) { - this.ip = ip; - } - - public void unsetIp() { - this.ip = null; - } - - /** Returns true if field ip is set (has been assigned a value) and false otherwise */ - public boolean isSetIp() { - return this.ip != null; - } - - public void setIpIsSet(boolean value) { - if (!value) { - this.ip = null; - } - } - - public String getPorts() { - return this.ports; - } - - public void setPorts(String ports) { - this.ports = ports; - } - - public void unsetPorts() { - this.ports = null; - } - - /** Returns true if field ports is set (has been assigned a value) and false otherwise */ - public boolean isSetPorts() { - return this.ports != null; - } - - public void setPortsIsSet(boolean value) { - if (!value) { - this.ports = null; - } - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 String getApplicationName() { - return this.applicationName; - } - - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - - public void unsetApplicationName() { - this.applicationName = null; - } - - /** Returns true if field applicationName is set (has been assigned a value) and false otherwise */ - public boolean isSetApplicationName() { - return this.applicationName != null; - } - - public void setApplicationNameIsSet(boolean value) { - if (!value) { - this.applicationName = null; - } - } - - public short getServiceType() { - return this.serviceType; - } - - public void setServiceType(short serviceType) { - this.serviceType = serviceType; - setServiceTypeIsSet(true); - } - - public void unsetServiceType() { - __isset_bit_vector.clear(__SERVICETYPE_ISSET_ID); - } - - /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ - public boolean isSetServiceType() { - return __isset_bit_vector.get(__SERVICETYPE_ISSET_ID); - } - - public void setServiceTypeIsSet(boolean value) { - __isset_bit_vector.set(__SERVICETYPE_ISSET_ID, value); - } - - public boolean isIsAlive() { - return this.isAlive; - } - - public void setIsAlive(boolean isAlive) { - this.isAlive = isAlive; - setIsAliveIsSet(true); - } - - public void unsetIsAlive() { - __isset_bit_vector.clear(__ISALIVE_ISSET_ID); - } - - /** Returns true if field isAlive is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAlive() { - return __isset_bit_vector.get(__ISALIVE_ISSET_ID); - } - - public void setIsAliveIsSet(boolean value) { - __isset_bit_vector.set(__ISALIVE_ISSET_ID, value); - } - - public long getTimestamp() { - return this.timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - setTimestampIsSet(true); - } - - public void unsetTimestamp() { - __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); - } - - /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamp() { - return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); - } - - public void setTimestampIsSet(boolean value) { - __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); - } - - public short getIdentifier() { - return this.identifier; - } - - public void setIdentifier(short identifier) { - this.identifier = identifier; - setIdentifierIsSet(true); - } - - public void unsetIdentifier() { - __isset_bit_vector.clear(__IDENTIFIER_ISSET_ID); - } - - /** Returns true if field identifier is set (has been assigned a value) and false otherwise */ - public boolean isSetIdentifier() { - return __isset_bit_vector.get(__IDENTIFIER_ISSET_ID); - } - - public void setIdentifierIsSet(boolean value) { - __isset_bit_vector.set(__IDENTIFIER_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case HOSTNAME: - if (value == null) { - unsetHostname(); - } else { - setHostname((String)value); - } - break; - - case IP: - if (value == null) { - unsetIp(); - } else { - setIp((String)value); - } - break; - - case PORTS: - if (value == null) { - unsetPorts(); - } else { - setPorts((String)value); - } - break; - - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case APPLICATION_NAME: - if (value == null) { - unsetApplicationName(); - } else { - setApplicationName((String)value); - } - break; - - case SERVICE_TYPE: - if (value == null) { - unsetServiceType(); - } else { - setServiceType((Short)value); - } - break; - - case IS_ALIVE: - if (value == null) { - unsetIsAlive(); - } else { - setIsAlive((Boolean)value); - } - break; - - case TIMESTAMP: - if (value == null) { - unsetTimestamp(); - } else { - setTimestamp((Long)value); - } - break; - - case IDENTIFIER: - if (value == null) { - unsetIdentifier(); - } else { - setIdentifier((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case HOSTNAME: - return getHostname(); - - case IP: - return getIp(); - - case PORTS: - return getPorts(); - - case AGENT_ID: - return getAgentId(); - - case APPLICATION_NAME: - return getApplicationName(); - - case SERVICE_TYPE: - return Short.valueOf(getServiceType()); - - case IS_ALIVE: - return Boolean.valueOf(isIsAlive()); - - case TIMESTAMP: - return Long.valueOf(getTimestamp()); - - case IDENTIFIER: - return Short.valueOf(getIdentifier()); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case HOSTNAME: - return isSetHostname(); - case IP: - return isSetIp(); - case PORTS: - return isSetPorts(); - case AGENT_ID: - return isSetAgentId(); - case APPLICATION_NAME: - return isSetApplicationName(); - case SERVICE_TYPE: - return isSetServiceType(); - case IS_ALIVE: - return isSetIsAlive(); - case TIMESTAMP: - return isSetTimestamp(); - case IDENTIFIER: - return isSetIdentifier(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AgentInfo) - return this.equals((AgentInfo)that); - return false; - } - - public boolean equals(AgentInfo that) { - if (that == null) - return false; - - boolean this_present_hostname = true && this.isSetHostname(); - boolean that_present_hostname = true && that.isSetHostname(); - if (this_present_hostname || that_present_hostname) { - if (!(this_present_hostname && that_present_hostname)) - return false; - if (!this.hostname.equals(that.hostname)) - return false; - } - - boolean this_present_ip = true && this.isSetIp(); - boolean that_present_ip = true && that.isSetIp(); - if (this_present_ip || that_present_ip) { - if (!(this_present_ip && that_present_ip)) - return false; - if (!this.ip.equals(that.ip)) - return false; - } - - boolean this_present_ports = true && this.isSetPorts(); - boolean that_present_ports = true && that.isSetPorts(); - if (this_present_ports || that_present_ports) { - if (!(this_present_ports && that_present_ports)) - return false; - if (!this.ports.equals(that.ports)) - return false; - } - - 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_applicationName = true && this.isSetApplicationName(); - boolean that_present_applicationName = true && that.isSetApplicationName(); - if (this_present_applicationName || that_present_applicationName) { - if (!(this_present_applicationName && that_present_applicationName)) - return false; - if (!this.applicationName.equals(that.applicationName)) - return false; - } - - boolean this_present_serviceType = true; - boolean that_present_serviceType = true; - if (this_present_serviceType || that_present_serviceType) { - if (!(this_present_serviceType && that_present_serviceType)) - return false; - if (this.serviceType != that.serviceType) - return false; - } - - boolean this_present_isAlive = true; - boolean that_present_isAlive = true; - if (this_present_isAlive || that_present_isAlive) { - if (!(this_present_isAlive && that_present_isAlive)) - return false; - if (this.isAlive != that.isAlive) - return false; - } - - boolean this_present_timestamp = true; - boolean that_present_timestamp = true; - 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_identifier = true; - boolean that_present_identifier = true; - if (this_present_identifier || that_present_identifier) { - if (!(this_present_identifier && that_present_identifier)) - return false; - if (this.identifier != that.identifier) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(AgentInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - AgentInfo typedOther = (AgentInfo)other; - - lastComparison = Boolean.valueOf(isSetHostname()).compareTo(typedOther.isSetHostname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHostname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, typedOther.hostname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIp()).compareTo(typedOther.isSetIp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ip, typedOther.ip); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPorts()).compareTo(typedOther.isSetPorts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPorts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ports, typedOther.ports); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApplicationName()).compareTo(typedOther.isSetApplicationName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApplicationName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationName, typedOther.applicationName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServiceType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsAlive()).compareTo(typedOther.isSetIsAlive()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAlive()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlive, typedOther.isAlive); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(typedOther.isSetIdentifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIdentifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, typedOther.identifier); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("AgentInfo("); - boolean first = true; - - sb.append("hostname:"); - if (this.hostname == null) { - sb.append("null"); - } else { - sb.append(this.hostname); - } - first = false; - if (!first) sb.append(", "); - sb.append("ip:"); - if (this.ip == null) { - sb.append("null"); - } else { - sb.append(this.ip); - } - first = false; - if (!first) sb.append(", "); - sb.append("ports:"); - if (this.ports == null) { - sb.append("null"); - } else { - sb.append(this.ports); - } - first = false; - if (!first) sb.append(", "); - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("applicationName:"); - if (this.applicationName == null) { - sb.append("null"); - } else { - sb.append(this.applicationName); - } - first = false; - if (!first) sb.append(", "); - sb.append("serviceType:"); - sb.append(this.serviceType); - first = false; - if (!first) sb.append(", "); - sb.append("isAlive:"); - sb.append(this.isAlive); - first = false; - if (!first) sb.append(", "); - sb.append("timestamp:"); - sb.append(this.timestamp); - first = false; - if (!first) sb.append(", "); - sb.append("identifier:"); - sb.append(this.identifier); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 AgentInfoStandardSchemeFactory implements SchemeFactory { - public AgentInfoStandardScheme getScheme() { - return new AgentInfoStandardScheme(); - } - } - - private static class AgentInfoStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AgentInfo 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: // HOSTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IP - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ip = iprot.readString(); - struct.setIpIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PORTS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ports = iprot.readString(); - struct.setPortsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // 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 5: // APPLICATION_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.applicationName = iprot.readString(); - struct.setApplicationNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // SERVICE_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.serviceType = iprot.readI16(); - struct.setServiceTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // IS_ALIVE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAlive = iprot.readBool(); - struct.setIsAliveIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // 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 9: // IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.identifier = iprot.readI16(); - struct.setIdentifierIsSet(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, AgentInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.hostname != null) { - oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); - oprot.writeString(struct.hostname); - oprot.writeFieldEnd(); - } - if (struct.ip != null) { - oprot.writeFieldBegin(IP_FIELD_DESC); - oprot.writeString(struct.ip); - oprot.writeFieldEnd(); - } - if (struct.ports != null) { - oprot.writeFieldBegin(PORTS_FIELD_DESC); - oprot.writeString(struct.ports); - oprot.writeFieldEnd(); - } - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - if (struct.applicationName != null) { - oprot.writeFieldBegin(APPLICATION_NAME_FIELD_DESC); - oprot.writeString(struct.applicationName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); - oprot.writeI16(struct.serviceType); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_ALIVE_FIELD_DESC); - oprot.writeBool(struct.isAlive); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); - oprot.writeI64(struct.timestamp); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC); - oprot.writeI16(struct.identifier); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AgentInfoTupleSchemeFactory implements SchemeFactory { - public AgentInfoTupleScheme getScheme() { - return new AgentInfoTupleScheme(); - } - } - - private static class AgentInfoTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AgentInfo struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetHostname()) { - optionals.set(0); - } - if (struct.isSetIp()) { - optionals.set(1); - } - if (struct.isSetPorts()) { - optionals.set(2); - } - if (struct.isSetAgentId()) { - optionals.set(3); - } - if (struct.isSetApplicationName()) { - optionals.set(4); - } - if (struct.isSetServiceType()) { - optionals.set(5); - } - if (struct.isSetIsAlive()) { - optionals.set(6); - } - if (struct.isSetTimestamp()) { - optionals.set(7); - } - if (struct.isSetIdentifier()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetHostname()) { - oprot.writeString(struct.hostname); - } - if (struct.isSetIp()) { - oprot.writeString(struct.ip); - } - if (struct.isSetPorts()) { - oprot.writeString(struct.ports); - } - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetApplicationName()) { - oprot.writeString(struct.applicationName); - } - if (struct.isSetServiceType()) { - oprot.writeI16(struct.serviceType); - } - if (struct.isSetIsAlive()) { - oprot.writeBool(struct.isAlive); - } - if (struct.isSetTimestamp()) { - oprot.writeI64(struct.timestamp); - } - if (struct.isSetIdentifier()) { - oprot.writeI16(struct.identifier); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AgentInfo struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(9); - if (incoming.get(0)) { - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - } - if (incoming.get(1)) { - struct.ip = iprot.readString(); - struct.setIpIsSet(true); - } - if (incoming.get(2)) { - struct.ports = iprot.readString(); - struct.setPortsIsSet(true); - } - if (incoming.get(3)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(4)) { - struct.applicationName = iprot.readString(); - struct.setApplicationNameIsSet(true); - } - if (incoming.get(5)) { - struct.serviceType = iprot.readI16(); - struct.setServiceTypeIsSet(true); - } - if (incoming.get(6)) { - struct.isAlive = iprot.readBool(); - struct.setIsAliveIsSet(true); - } - if (incoming.get(7)) { - struct.timestamp = iprot.readI64(); - struct.setTimestampIsSet(true); - } - if (incoming.get(8)) { - struct.identifier = iprot.readI16(); - struct.setIdentifierIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AgentInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AgentInfo"); + + private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IP_FIELD_DESC = new org.apache.thrift.protocol.TField("ip", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ports", org.apache.thrift.protocol.TType.STRING, (short)3); + 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)4); + private static final org.apache.thrift.protocol.TField APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationName", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)6); + private static final org.apache.thrift.protocol.TField IS_ALIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlive", org.apache.thrift.protocol.TType.BOOL, (short)7); + 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)8); + private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.I16, (short)9); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AgentInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AgentInfoTupleSchemeFactory()); + } + + private String hostname; // required + private String ip; // required + private String ports; // required + private String agentId; // required + private String applicationName; // required + private short serviceType; // required + private boolean isAlive; // required + private long timestamp; // required + private short identifier; // 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 { + HOSTNAME((short)1, "hostname"), + IP((short)2, "ip"), + PORTS((short)3, "ports"), + AGENT_ID((short)4, "agentId"), + APPLICATION_NAME((short)5, "applicationName"), + SERVICE_TYPE((short)6, "serviceType"), + IS_ALIVE((short)7, "isAlive"), + TIMESTAMP((short)8, "timestamp"), + IDENTIFIER((short)9, "identifier"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // HOSTNAME + return HOSTNAME; + case 2: // IP + return IP; + case 3: // PORTS + return PORTS; + case 4: // AGENT_ID + return AGENT_ID; + case 5: // APPLICATION_NAME + return APPLICATION_NAME; + case 6: // SERVICE_TYPE + return SERVICE_TYPE; + case 7: // IS_ALIVE + return IS_ALIVE; + case 8: // TIMESTAMP + return TIMESTAMP; + case 9: // IDENTIFIER + return IDENTIFIER; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SERVICETYPE_ISSET_ID = 0; + private static final int __ISALIVE_ISSET_ID = 1; + private static final int __TIMESTAMP_ISSET_ID = 2; + private static final int __IDENTIFIER_ISSET_ID = 3; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IP, new org.apache.thrift.meta_data.FieldMetaData("ip", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PORTS, new org.apache.thrift.meta_data.FieldMetaData("ports", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("applicationName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.IS_ALIVE, new org.apache.thrift.meta_data.FieldMetaData("isAlive", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AgentInfo.class, metaDataMap); + } + + public AgentInfo() { + } + + public AgentInfo( + String hostname, + String ip, + String ports, + String agentId, + String applicationName, + short serviceType, + boolean isAlive, + long timestamp, + short identifier) + { + this(); + this.hostname = hostname; + this.ip = ip; + this.ports = ports; + this.agentId = agentId; + this.applicationName = applicationName; + this.serviceType = serviceType; + setServiceTypeIsSet(true); + this.isAlive = isAlive; + setIsAliveIsSet(true); + this.timestamp = timestamp; + setTimestampIsSet(true); + this.identifier = identifier; + setIdentifierIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public AgentInfo(AgentInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetHostname()) { + this.hostname = other.hostname; + } + if (other.isSetIp()) { + this.ip = other.ip; + } + if (other.isSetPorts()) { + this.ports = other.ports; + } + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + if (other.isSetApplicationName()) { + this.applicationName = other.applicationName; + } + this.serviceType = other.serviceType; + this.isAlive = other.isAlive; + this.timestamp = other.timestamp; + this.identifier = other.identifier; + } + + public AgentInfo deepCopy() { + return new AgentInfo(this); + } + + @Override + public void clear() { + this.hostname = null; + this.ip = null; + this.ports = null; + this.agentId = null; + this.applicationName = null; + setServiceTypeIsSet(false); + this.serviceType = 0; + setIsAliveIsSet(false); + this.isAlive = false; + setTimestampIsSet(false); + this.timestamp = 0; + setIdentifierIsSet(false); + this.identifier = 0; + } + + public String getHostname() { + return this.hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public void unsetHostname() { + this.hostname = null; + } + + /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ + public boolean isSetHostname() { + return this.hostname != null; + } + + public void setHostnameIsSet(boolean value) { + if (!value) { + this.hostname = null; + } + } + + public String getIp() { + return this.ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public void unsetIp() { + this.ip = null; + } + + /** Returns true if field ip is set (has been assigned a value) and false otherwise */ + public boolean isSetIp() { + return this.ip != null; + } + + public void setIpIsSet(boolean value) { + if (!value) { + this.ip = null; + } + } + + public String getPorts() { + return this.ports; + } + + public void setPorts(String ports) { + this.ports = ports; + } + + public void unsetPorts() { + this.ports = null; + } + + /** Returns true if field ports is set (has been assigned a value) and false otherwise */ + public boolean isSetPorts() { + return this.ports != null; + } + + public void setPortsIsSet(boolean value) { + if (!value) { + this.ports = null; + } + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 String getApplicationName() { + return this.applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + public void unsetApplicationName() { + this.applicationName = null; + } + + /** Returns true if field applicationName is set (has been assigned a value) and false otherwise */ + public boolean isSetApplicationName() { + return this.applicationName != null; + } + + public void setApplicationNameIsSet(boolean value) { + if (!value) { + this.applicationName = null; + } + } + + public short getServiceType() { + return this.serviceType; + } + + public void setServiceType(short serviceType) { + this.serviceType = serviceType; + setServiceTypeIsSet(true); + } + + public void unsetServiceType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ + public boolean isSetServiceType() { + return EncodingUtils.testBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + public void setServiceTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVICETYPE_ISSET_ID, value); + } + + public boolean isIsAlive() { + return this.isAlive; + } + + public void setIsAlive(boolean isAlive) { + this.isAlive = isAlive; + setIsAliveIsSet(true); + } + + public void unsetIsAlive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISALIVE_ISSET_ID); + } + + /** Returns true if field isAlive is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAlive() { + return EncodingUtils.testBit(__isset_bitfield, __ISALIVE_ISSET_ID); + } + + public void setIsAliveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISALIVE_ISSET_ID, value); + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + } + + public void unsetTimestamp() { + __isset_bitfield = 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 EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); + } + + public short getIdentifier() { + return this.identifier; + } + + public void setIdentifier(short identifier) { + this.identifier = identifier; + setIdentifierIsSet(true); + } + + public void unsetIdentifier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IDENTIFIER_ISSET_ID); + } + + /** Returns true if field identifier is set (has been assigned a value) and false otherwise */ + public boolean isSetIdentifier() { + return EncodingUtils.testBit(__isset_bitfield, __IDENTIFIER_ISSET_ID); + } + + public void setIdentifierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IDENTIFIER_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case HOSTNAME: + if (value == null) { + unsetHostname(); + } else { + setHostname((String)value); + } + break; + + case IP: + if (value == null) { + unsetIp(); + } else { + setIp((String)value); + } + break; + + case PORTS: + if (value == null) { + unsetPorts(); + } else { + setPorts((String)value); + } + break; + + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case APPLICATION_NAME: + if (value == null) { + unsetApplicationName(); + } else { + setApplicationName((String)value); + } + break; + + case SERVICE_TYPE: + if (value == null) { + unsetServiceType(); + } else { + setServiceType((Short)value); + } + break; + + case IS_ALIVE: + if (value == null) { + unsetIsAlive(); + } else { + setIsAlive((Boolean)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case IDENTIFIER: + if (value == null) { + unsetIdentifier(); + } else { + setIdentifier((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case HOSTNAME: + return getHostname(); + + case IP: + return getIp(); + + case PORTS: + return getPorts(); + + case AGENT_ID: + return getAgentId(); + + case APPLICATION_NAME: + return getApplicationName(); + + case SERVICE_TYPE: + return Short.valueOf(getServiceType()); + + case IS_ALIVE: + return Boolean.valueOf(isIsAlive()); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case IDENTIFIER: + return Short.valueOf(getIdentifier()); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case HOSTNAME: + return isSetHostname(); + case IP: + return isSetIp(); + case PORTS: + return isSetPorts(); + case AGENT_ID: + return isSetAgentId(); + case APPLICATION_NAME: + return isSetApplicationName(); + case SERVICE_TYPE: + return isSetServiceType(); + case IS_ALIVE: + return isSetIsAlive(); + case TIMESTAMP: + return isSetTimestamp(); + case IDENTIFIER: + return isSetIdentifier(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AgentInfo) + return this.equals((AgentInfo)that); + return false; + } + + public boolean equals(AgentInfo that) { + if (that == null) + return false; + + boolean this_present_hostname = true && this.isSetHostname(); + boolean that_present_hostname = true && that.isSetHostname(); + if (this_present_hostname || that_present_hostname) { + if (!(this_present_hostname && that_present_hostname)) + return false; + if (!this.hostname.equals(that.hostname)) + return false; + } + + boolean this_present_ip = true && this.isSetIp(); + boolean that_present_ip = true && that.isSetIp(); + if (this_present_ip || that_present_ip) { + if (!(this_present_ip && that_present_ip)) + return false; + if (!this.ip.equals(that.ip)) + return false; + } + + boolean this_present_ports = true && this.isSetPorts(); + boolean that_present_ports = true && that.isSetPorts(); + if (this_present_ports || that_present_ports) { + if (!(this_present_ports && that_present_ports)) + return false; + if (!this.ports.equals(that.ports)) + return false; + } + + 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_applicationName = true && this.isSetApplicationName(); + boolean that_present_applicationName = true && that.isSetApplicationName(); + if (this_present_applicationName || that_present_applicationName) { + if (!(this_present_applicationName && that_present_applicationName)) + return false; + if (!this.applicationName.equals(that.applicationName)) + return false; + } + + boolean this_present_serviceType = true; + boolean that_present_serviceType = true; + if (this_present_serviceType || that_present_serviceType) { + if (!(this_present_serviceType && that_present_serviceType)) + return false; + if (this.serviceType != that.serviceType) + return false; + } + + boolean this_present_isAlive = true; + boolean that_present_isAlive = true; + if (this_present_isAlive || that_present_isAlive) { + if (!(this_present_isAlive && that_present_isAlive)) + return false; + if (this.isAlive != that.isAlive) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + 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_identifier = true; + boolean that_present_identifier = true; + if (this_present_identifier || that_present_identifier) { + if (!(this_present_identifier && that_present_identifier)) + return false; + if (this.identifier != that.identifier) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(AgentInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + AgentInfo typedOther = (AgentInfo)other; + + lastComparison = Boolean.valueOf(isSetHostname()).compareTo(typedOther.isSetHostname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHostname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, typedOther.hostname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIp()).compareTo(typedOther.isSetIp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ip, typedOther.ip); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPorts()).compareTo(typedOther.isSetPorts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPorts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ports, typedOther.ports); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetApplicationName()).compareTo(typedOther.isSetApplicationName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetApplicationName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationName, typedOther.applicationName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServiceType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsAlive()).compareTo(typedOther.isSetIsAlive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAlive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlive, typedOther.isAlive); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(typedOther.isSetIdentifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIdentifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, typedOther.identifier); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AgentInfo("); + boolean first = true; + + sb.append("hostname:"); + if (this.hostname == null) { + sb.append("null"); + } else { + sb.append(this.hostname); + } + first = false; + if (!first) sb.append(", "); + sb.append("ip:"); + if (this.ip == null) { + sb.append("null"); + } else { + sb.append(this.ip); + } + first = false; + if (!first) sb.append(", "); + sb.append("ports:"); + if (this.ports == null) { + sb.append("null"); + } else { + sb.append(this.ports); + } + first = false; + if (!first) sb.append(", "); + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("applicationName:"); + if (this.applicationName == null) { + sb.append("null"); + } else { + sb.append(this.applicationName); + } + first = false; + if (!first) sb.append(", "); + sb.append("serviceType:"); + sb.append(this.serviceType); + first = false; + if (!first) sb.append(", "); + sb.append("isAlive:"); + sb.append(this.isAlive); + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("identifier:"); + sb.append(this.identifier); + 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, 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 AgentInfoStandardSchemeFactory implements SchemeFactory { + public AgentInfoStandardScheme getScheme() { + return new AgentInfoStandardScheme(); + } + } + + private static class AgentInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AgentInfo 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: // HOSTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IP + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ip = iprot.readString(); + struct.setIpIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PORTS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ports = iprot.readString(); + struct.setPortsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // 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 5: // APPLICATION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.applicationName = iprot.readString(); + struct.setApplicationNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SERVICE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // IS_ALIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAlive = iprot.readBool(); + struct.setIsAliveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // 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 9: // IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.identifier = iprot.readI16(); + struct.setIdentifierIsSet(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, AgentInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.hostname != null) { + oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); + oprot.writeString(struct.hostname); + oprot.writeFieldEnd(); + } + if (struct.ip != null) { + oprot.writeFieldBegin(IP_FIELD_DESC); + oprot.writeString(struct.ip); + oprot.writeFieldEnd(); + } + if (struct.ports != null) { + oprot.writeFieldBegin(PORTS_FIELD_DESC); + oprot.writeString(struct.ports); + oprot.writeFieldEnd(); + } + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + if (struct.applicationName != null) { + oprot.writeFieldBegin(APPLICATION_NAME_FIELD_DESC); + oprot.writeString(struct.applicationName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); + oprot.writeI16(struct.serviceType); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ALIVE_FIELD_DESC); + oprot.writeBool(struct.isAlive); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC); + oprot.writeI16(struct.identifier); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AgentInfoTupleSchemeFactory implements SchemeFactory { + public AgentInfoTupleScheme getScheme() { + return new AgentInfoTupleScheme(); + } + } + + private static class AgentInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AgentInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetHostname()) { + optionals.set(0); + } + if (struct.isSetIp()) { + optionals.set(1); + } + if (struct.isSetPorts()) { + optionals.set(2); + } + if (struct.isSetAgentId()) { + optionals.set(3); + } + if (struct.isSetApplicationName()) { + optionals.set(4); + } + if (struct.isSetServiceType()) { + optionals.set(5); + } + if (struct.isSetIsAlive()) { + optionals.set(6); + } + if (struct.isSetTimestamp()) { + optionals.set(7); + } + if (struct.isSetIdentifier()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetHostname()) { + oprot.writeString(struct.hostname); + } + if (struct.isSetIp()) { + oprot.writeString(struct.ip); + } + if (struct.isSetPorts()) { + oprot.writeString(struct.ports); + } + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetApplicationName()) { + oprot.writeString(struct.applicationName); + } + if (struct.isSetServiceType()) { + oprot.writeI16(struct.serviceType); + } + if (struct.isSetIsAlive()) { + oprot.writeBool(struct.isAlive); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetIdentifier()) { + oprot.writeI16(struct.identifier); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AgentInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + } + if (incoming.get(1)) { + struct.ip = iprot.readString(); + struct.setIpIsSet(true); + } + if (incoming.get(2)) { + struct.ports = iprot.readString(); + struct.setPortsIsSet(true); + } + if (incoming.get(3)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(4)) { + struct.applicationName = iprot.readString(); + struct.setApplicationNameIsSet(true); + } + if (incoming.get(5)) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } + if (incoming.get(6)) { + struct.isAlive = iprot.readBool(); + struct.setIsAliveIsSet(true); + } + if (incoming.get(7)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(8)) { + struct.identifier = iprot.readI16(); + struct.setIdentifierIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/Annotation.java b/src/main/java/com/profiler/common/dto/thrift/Annotation.java index 9e3e4e5f3..36be787bc 100644 --- a/src/main/java/com/profiler/common/dto/thrift/Annotation.java +++ b/src/main/java/com/profiler/common/dto/thrift/Annotation.java @@ -1,1155 +1,1158 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Annotation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Annotation"); - - private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField STRING_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("stringValue", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField BOOL_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("boolValue", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField INT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("intValue", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField LONG_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("longValue", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField SHORT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("shortValue", org.apache.thrift.protocol.TType.I16, (short)6); - private static final org.apache.thrift.protocol.TField DOUBLE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleValue", org.apache.thrift.protocol.TType.DOUBLE, (short)7); - private static final org.apache.thrift.protocol.TField BINARY_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryValue", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField BYTE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("byteValue", org.apache.thrift.protocol.TType.BYTE, (short)9); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AnnotationStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AnnotationTupleSchemeFactory()); - } - - private int key; // required - private String stringValue; // optional - private boolean boolValue; // optional - private int intValue; // optional - private long longValue; // optional - private short shortValue; // optional - private double doubleValue; // optional - private ByteBuffer binaryValue; // optional - private byte byteValue; // 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 { - KEY((short)1, "key"), - STRING_VALUE((short)2, "stringValue"), - BOOL_VALUE((short)3, "boolValue"), - INT_VALUE((short)4, "intValue"), - LONG_VALUE((short)5, "longValue"), - SHORT_VALUE((short)6, "shortValue"), - DOUBLE_VALUE((short)7, "doubleValue"), - BINARY_VALUE((short)8, "binaryValue"), - BYTE_VALUE((short)9, "byteValue"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // KEY - return KEY; - case 2: // STRING_VALUE - return STRING_VALUE; - case 3: // BOOL_VALUE - return BOOL_VALUE; - case 4: // INT_VALUE - return INT_VALUE; - case 5: // LONG_VALUE - return LONG_VALUE; - case 6: // SHORT_VALUE - return SHORT_VALUE; - case 7: // DOUBLE_VALUE - return DOUBLE_VALUE; - case 8: // BINARY_VALUE - return BINARY_VALUE; - case 9: // BYTE_VALUE - return BYTE_VALUE; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __KEY_ISSET_ID = 0; - private static final int __BOOLVALUE_ISSET_ID = 1; - private static final int __INTVALUE_ISSET_ID = 2; - private static final int __LONGVALUE_ISSET_ID = 3; - private static final int __SHORTVALUE_ISSET_ID = 4; - private static final int __DOUBLEVALUE_ISSET_ID = 5; - private static final int __BYTEVALUE_ISSET_ID = 6; - private BitSet __isset_bit_vector = new BitSet(7); - private _Fields optionals[] = {_Fields.STRING_VALUE,_Fields.BOOL_VALUE,_Fields.INT_VALUE,_Fields.LONG_VALUE,_Fields.SHORT_VALUE,_Fields.DOUBLE_VALUE,_Fields.BINARY_VALUE,_Fields.BYTE_VALUE}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.STRING_VALUE, new org.apache.thrift.meta_data.FieldMetaData("stringValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.BOOL_VALUE, new org.apache.thrift.meta_data.FieldMetaData("boolValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.INT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("intValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.LONG_VALUE, new org.apache.thrift.meta_data.FieldMetaData("longValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SHORT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("shortValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.DOUBLE_VALUE, new org.apache.thrift.meta_data.FieldMetaData("doubleValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - tmpMap.put(_Fields.BINARY_VALUE, new org.apache.thrift.meta_data.FieldMetaData("binaryValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.BYTE_VALUE, new org.apache.thrift.meta_data.FieldMetaData("byteValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Annotation.class, metaDataMap); - } - - public Annotation() { - } - - public Annotation( - int key) - { - this(); - this.key = key; - setKeyIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Annotation(Annotation other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.key = other.key; - if (other.isSetStringValue()) { - this.stringValue = other.stringValue; - } - this.boolValue = other.boolValue; - this.intValue = other.intValue; - this.longValue = other.longValue; - this.shortValue = other.shortValue; - this.doubleValue = other.doubleValue; - if (other.isSetBinaryValue()) { - this.binaryValue = org.apache.thrift.TBaseHelper.copyBinary(other.binaryValue); -; - } - this.byteValue = other.byteValue; - } - - public Annotation deepCopy() { - return new Annotation(this); - } - - @Override - public void clear() { - setKeyIsSet(false); - this.key = 0; - this.stringValue = null; - setBoolValueIsSet(false); - this.boolValue = false; - setIntValueIsSet(false); - this.intValue = 0; - setLongValueIsSet(false); - this.longValue = 0; - setShortValueIsSet(false); - this.shortValue = 0; - setDoubleValueIsSet(false); - this.doubleValue = 0.0; - this.binaryValue = null; - setByteValueIsSet(false); - this.byteValue = 0; - } - - public int getKey() { - return this.key; - } - - public void setKey(int key) { - this.key = key; - setKeyIsSet(true); - } - - public void unsetKey() { - __isset_bit_vector.clear(__KEY_ISSET_ID); - } - - /** Returns true if field key is set (has been assigned a value) and false otherwise */ - public boolean isSetKey() { - return __isset_bit_vector.get(__KEY_ISSET_ID); - } - - public void setKeyIsSet(boolean value) { - __isset_bit_vector.set(__KEY_ISSET_ID, value); - } - - public String getStringValue() { - return this.stringValue; - } - - public void setStringValue(String stringValue) { - this.stringValue = stringValue; - } - - public void unsetStringValue() { - this.stringValue = null; - } - - /** Returns true if field stringValue is set (has been assigned a value) and false otherwise */ - public boolean isSetStringValue() { - return this.stringValue != null; - } - - public void setStringValueIsSet(boolean value) { - if (!value) { - this.stringValue = null; - } - } - - public boolean isBoolValue() { - return this.boolValue; - } - - public void setBoolValue(boolean boolValue) { - this.boolValue = boolValue; - setBoolValueIsSet(true); - } - - public void unsetBoolValue() { - __isset_bit_vector.clear(__BOOLVALUE_ISSET_ID); - } - - /** Returns true if field boolValue is set (has been assigned a value) and false otherwise */ - public boolean isSetBoolValue() { - return __isset_bit_vector.get(__BOOLVALUE_ISSET_ID); - } - - public void setBoolValueIsSet(boolean value) { - __isset_bit_vector.set(__BOOLVALUE_ISSET_ID, value); - } - - public int getIntValue() { - return this.intValue; - } - - public void setIntValue(int intValue) { - this.intValue = intValue; - setIntValueIsSet(true); - } - - public void unsetIntValue() { - __isset_bit_vector.clear(__INTVALUE_ISSET_ID); - } - - /** Returns true if field intValue is set (has been assigned a value) and false otherwise */ - public boolean isSetIntValue() { - return __isset_bit_vector.get(__INTVALUE_ISSET_ID); - } - - public void setIntValueIsSet(boolean value) { - __isset_bit_vector.set(__INTVALUE_ISSET_ID, value); - } - - public long getLongValue() { - return this.longValue; - } - - public void setLongValue(long longValue) { - this.longValue = longValue; - setLongValueIsSet(true); - } - - public void unsetLongValue() { - __isset_bit_vector.clear(__LONGVALUE_ISSET_ID); - } - - /** Returns true if field longValue is set (has been assigned a value) and false otherwise */ - public boolean isSetLongValue() { - return __isset_bit_vector.get(__LONGVALUE_ISSET_ID); - } - - public void setLongValueIsSet(boolean value) { - __isset_bit_vector.set(__LONGVALUE_ISSET_ID, value); - } - - public short getShortValue() { - return this.shortValue; - } - - public void setShortValue(short shortValue) { - this.shortValue = shortValue; - setShortValueIsSet(true); - } - - public void unsetShortValue() { - __isset_bit_vector.clear(__SHORTVALUE_ISSET_ID); - } - - /** Returns true if field shortValue is set (has been assigned a value) and false otherwise */ - public boolean isSetShortValue() { - return __isset_bit_vector.get(__SHORTVALUE_ISSET_ID); - } - - public void setShortValueIsSet(boolean value) { - __isset_bit_vector.set(__SHORTVALUE_ISSET_ID, value); - } - - public double getDoubleValue() { - return this.doubleValue; - } - - public void setDoubleValue(double doubleValue) { - this.doubleValue = doubleValue; - setDoubleValueIsSet(true); - } - - public void unsetDoubleValue() { - __isset_bit_vector.clear(__DOUBLEVALUE_ISSET_ID); - } - - /** Returns true if field doubleValue is set (has been assigned a value) and false otherwise */ - public boolean isSetDoubleValue() { - return __isset_bit_vector.get(__DOUBLEVALUE_ISSET_ID); - } - - public void setDoubleValueIsSet(boolean value) { - __isset_bit_vector.set(__DOUBLEVALUE_ISSET_ID, value); - } - - public byte[] getBinaryValue() { - setBinaryValue(org.apache.thrift.TBaseHelper.rightSize(binaryValue)); - return binaryValue == null ? null : binaryValue.array(); - } - - public ByteBuffer bufferForBinaryValue() { - return binaryValue; - } - - public void setBinaryValue(byte[] binaryValue) { - setBinaryValue(binaryValue == null ? (ByteBuffer)null : ByteBuffer.wrap(binaryValue)); - } - - public void setBinaryValue(ByteBuffer binaryValue) { - this.binaryValue = binaryValue; - } - - public void unsetBinaryValue() { - this.binaryValue = null; - } - - /** Returns true if field binaryValue is set (has been assigned a value) and false otherwise */ - public boolean isSetBinaryValue() { - return this.binaryValue != null; - } - - public void setBinaryValueIsSet(boolean value) { - if (!value) { - this.binaryValue = null; - } - } - - public byte getByteValue() { - return this.byteValue; - } - - public void setByteValue(byte byteValue) { - this.byteValue = byteValue; - setByteValueIsSet(true); - } - - public void unsetByteValue() { - __isset_bit_vector.clear(__BYTEVALUE_ISSET_ID); - } - - /** Returns true if field byteValue is set (has been assigned a value) and false otherwise */ - public boolean isSetByteValue() { - return __isset_bit_vector.get(__BYTEVALUE_ISSET_ID); - } - - public void setByteValueIsSet(boolean value) { - __isset_bit_vector.set(__BYTEVALUE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case KEY: - if (value == null) { - unsetKey(); - } else { - setKey((Integer)value); - } - break; - - case STRING_VALUE: - if (value == null) { - unsetStringValue(); - } else { - setStringValue((String)value); - } - break; - - case BOOL_VALUE: - if (value == null) { - unsetBoolValue(); - } else { - setBoolValue((Boolean)value); - } - break; - - case INT_VALUE: - if (value == null) { - unsetIntValue(); - } else { - setIntValue((Integer)value); - } - break; - - case LONG_VALUE: - if (value == null) { - unsetLongValue(); - } else { - setLongValue((Long)value); - } - break; - - case SHORT_VALUE: - if (value == null) { - unsetShortValue(); - } else { - setShortValue((Short)value); - } - break; - - case DOUBLE_VALUE: - if (value == null) { - unsetDoubleValue(); - } else { - setDoubleValue((Double)value); - } - break; - - case BINARY_VALUE: - if (value == null) { - unsetBinaryValue(); - } else { - setBinaryValue((ByteBuffer)value); - } - break; - - case BYTE_VALUE: - if (value == null) { - unsetByteValue(); - } else { - setByteValue((Byte)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case KEY: - return Integer.valueOf(getKey()); - - case STRING_VALUE: - return getStringValue(); - - case BOOL_VALUE: - return Boolean.valueOf(isBoolValue()); - - case INT_VALUE: - return Integer.valueOf(getIntValue()); - - case LONG_VALUE: - return Long.valueOf(getLongValue()); - - case SHORT_VALUE: - return Short.valueOf(getShortValue()); - - case DOUBLE_VALUE: - return Double.valueOf(getDoubleValue()); - - case BINARY_VALUE: - return getBinaryValue(); - - case BYTE_VALUE: - return Byte.valueOf(getByteValue()); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case KEY: - return isSetKey(); - case STRING_VALUE: - return isSetStringValue(); - case BOOL_VALUE: - return isSetBoolValue(); - case INT_VALUE: - return isSetIntValue(); - case LONG_VALUE: - return isSetLongValue(); - case SHORT_VALUE: - return isSetShortValue(); - case DOUBLE_VALUE: - return isSetDoubleValue(); - case BINARY_VALUE: - return isSetBinaryValue(); - case BYTE_VALUE: - return isSetByteValue(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Annotation) - return this.equals((Annotation)that); - return false; - } - - public boolean equals(Annotation that) { - if (that == null) - return false; - - boolean this_present_key = true; - boolean that_present_key = true; - if (this_present_key || that_present_key) { - if (!(this_present_key && that_present_key)) - return false; - if (this.key != that.key) - return false; - } - - boolean this_present_stringValue = true && this.isSetStringValue(); - boolean that_present_stringValue = true && that.isSetStringValue(); - if (this_present_stringValue || that_present_stringValue) { - if (!(this_present_stringValue && that_present_stringValue)) - return false; - if (!this.stringValue.equals(that.stringValue)) - return false; - } - - boolean this_present_boolValue = true && this.isSetBoolValue(); - boolean that_present_boolValue = true && that.isSetBoolValue(); - if (this_present_boolValue || that_present_boolValue) { - if (!(this_present_boolValue && that_present_boolValue)) - return false; - if (this.boolValue != that.boolValue) - return false; - } - - boolean this_present_intValue = true && this.isSetIntValue(); - boolean that_present_intValue = true && that.isSetIntValue(); - if (this_present_intValue || that_present_intValue) { - if (!(this_present_intValue && that_present_intValue)) - return false; - if (this.intValue != that.intValue) - return false; - } - - boolean this_present_longValue = true && this.isSetLongValue(); - boolean that_present_longValue = true && that.isSetLongValue(); - if (this_present_longValue || that_present_longValue) { - if (!(this_present_longValue && that_present_longValue)) - return false; - if (this.longValue != that.longValue) - return false; - } - - boolean this_present_shortValue = true && this.isSetShortValue(); - boolean that_present_shortValue = true && that.isSetShortValue(); - if (this_present_shortValue || that_present_shortValue) { - if (!(this_present_shortValue && that_present_shortValue)) - return false; - if (this.shortValue != that.shortValue) - return false; - } - - boolean this_present_doubleValue = true && this.isSetDoubleValue(); - boolean that_present_doubleValue = true && that.isSetDoubleValue(); - if (this_present_doubleValue || that_present_doubleValue) { - if (!(this_present_doubleValue && that_present_doubleValue)) - return false; - if (this.doubleValue != that.doubleValue) - return false; - } - - boolean this_present_binaryValue = true && this.isSetBinaryValue(); - boolean that_present_binaryValue = true && that.isSetBinaryValue(); - if (this_present_binaryValue || that_present_binaryValue) { - if (!(this_present_binaryValue && that_present_binaryValue)) - return false; - if (!this.binaryValue.equals(that.binaryValue)) - return false; - } - - boolean this_present_byteValue = true && this.isSetByteValue(); - boolean that_present_byteValue = true && that.isSetByteValue(); - if (this_present_byteValue || that_present_byteValue) { - if (!(this_present_byteValue && that_present_byteValue)) - return false; - if (this.byteValue != that.byteValue) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(Annotation other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - Annotation typedOther = (Annotation)other; - - lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStringValue()).compareTo(typedOther.isSetStringValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStringValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stringValue, typedOther.stringValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBoolValue()).compareTo(typedOther.isSetBoolValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBoolValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.boolValue, typedOther.boolValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIntValue()).compareTo(typedOther.isSetIntValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIntValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.intValue, typedOther.intValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLongValue()).compareTo(typedOther.isSetLongValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLongValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.longValue, typedOther.longValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetShortValue()).compareTo(typedOther.isSetShortValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetShortValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortValue, typedOther.shortValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDoubleValue()).compareTo(typedOther.isSetDoubleValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDoubleValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doubleValue, typedOther.doubleValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBinaryValue()).compareTo(typedOther.isSetBinaryValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBinaryValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryValue, typedOther.binaryValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetByteValue()).compareTo(typedOther.isSetByteValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetByteValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.byteValue, typedOther.byteValue); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Annotation("); - boolean first = true; - - sb.append("key:"); - sb.append(this.key); - first = false; - if (isSetStringValue()) { - if (!first) sb.append(", "); - sb.append("stringValue:"); - if (this.stringValue == null) { - sb.append("null"); - } else { - sb.append(this.stringValue); - } - first = false; - } - if (isSetBoolValue()) { - if (!first) sb.append(", "); - sb.append("boolValue:"); - sb.append(this.boolValue); - first = false; - } - if (isSetIntValue()) { - if (!first) sb.append(", "); - sb.append("intValue:"); - sb.append(this.intValue); - first = false; - } - if (isSetLongValue()) { - if (!first) sb.append(", "); - sb.append("longValue:"); - sb.append(this.longValue); - first = false; - } - if (isSetShortValue()) { - if (!first) sb.append(", "); - sb.append("shortValue:"); - sb.append(this.shortValue); - first = false; - } - if (isSetDoubleValue()) { - if (!first) sb.append(", "); - sb.append("doubleValue:"); - sb.append(this.doubleValue); - first = false; - } - if (isSetBinaryValue()) { - if (!first) sb.append(", "); - sb.append("binaryValue:"); - if (this.binaryValue == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.binaryValue, sb); - } - first = false; - } - if (isSetByteValue()) { - if (!first) sb.append(", "); - sb.append("byteValue:"); - sb.append(this.byteValue); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 AnnotationStandardSchemeFactory implements SchemeFactory { - public AnnotationStandardScheme getScheme() { - return new AnnotationStandardScheme(); - } - } - - private static class AnnotationStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Annotation 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: // KEY - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.key = iprot.readI32(); - struct.setKeyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STRING_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.stringValue = iprot.readString(); - struct.setStringValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // BOOL_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.boolValue = iprot.readBool(); - struct.setBoolValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // INT_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.intValue = iprot.readI32(); - struct.setIntValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LONG_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.longValue = iprot.readI64(); - struct.setLongValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // SHORT_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.shortValue = iprot.readI16(); - struct.setShortValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // DOUBLE_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { - struct.doubleValue = iprot.readDouble(); - struct.setDoubleValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // BINARY_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.binaryValue = iprot.readBinary(); - struct.setBinaryValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // BYTE_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { - struct.byteValue = iprot.readByte(); - struct.setByteValueIsSet(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, Annotation struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(KEY_FIELD_DESC); - oprot.writeI32(struct.key); - oprot.writeFieldEnd(); - if (struct.stringValue != null) { - if (struct.isSetStringValue()) { - oprot.writeFieldBegin(STRING_VALUE_FIELD_DESC); - oprot.writeString(struct.stringValue); - oprot.writeFieldEnd(); - } - } - if (struct.isSetBoolValue()) { - oprot.writeFieldBegin(BOOL_VALUE_FIELD_DESC); - oprot.writeBool(struct.boolValue); - oprot.writeFieldEnd(); - } - if (struct.isSetIntValue()) { - oprot.writeFieldBegin(INT_VALUE_FIELD_DESC); - oprot.writeI32(struct.intValue); - oprot.writeFieldEnd(); - } - if (struct.isSetLongValue()) { - oprot.writeFieldBegin(LONG_VALUE_FIELD_DESC); - oprot.writeI64(struct.longValue); - oprot.writeFieldEnd(); - } - if (struct.isSetShortValue()) { - oprot.writeFieldBegin(SHORT_VALUE_FIELD_DESC); - oprot.writeI16(struct.shortValue); - oprot.writeFieldEnd(); - } - if (struct.isSetDoubleValue()) { - oprot.writeFieldBegin(DOUBLE_VALUE_FIELD_DESC); - oprot.writeDouble(struct.doubleValue); - oprot.writeFieldEnd(); - } - if (struct.binaryValue != null) { - if (struct.isSetBinaryValue()) { - oprot.writeFieldBegin(BINARY_VALUE_FIELD_DESC); - oprot.writeBinary(struct.binaryValue); - oprot.writeFieldEnd(); - } - } - if (struct.isSetByteValue()) { - oprot.writeFieldBegin(BYTE_VALUE_FIELD_DESC); - oprot.writeByte(struct.byteValue); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AnnotationTupleSchemeFactory implements SchemeFactory { - public AnnotationTupleScheme getScheme() { - return new AnnotationTupleScheme(); - } - } - - private static class AnnotationTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetKey()) { - optionals.set(0); - } - if (struct.isSetStringValue()) { - optionals.set(1); - } - if (struct.isSetBoolValue()) { - optionals.set(2); - } - if (struct.isSetIntValue()) { - optionals.set(3); - } - if (struct.isSetLongValue()) { - optionals.set(4); - } - if (struct.isSetShortValue()) { - optionals.set(5); - } - if (struct.isSetDoubleValue()) { - optionals.set(6); - } - if (struct.isSetBinaryValue()) { - optionals.set(7); - } - if (struct.isSetByteValue()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetKey()) { - oprot.writeI32(struct.key); - } - if (struct.isSetStringValue()) { - oprot.writeString(struct.stringValue); - } - if (struct.isSetBoolValue()) { - oprot.writeBool(struct.boolValue); - } - if (struct.isSetIntValue()) { - oprot.writeI32(struct.intValue); - } - if (struct.isSetLongValue()) { - oprot.writeI64(struct.longValue); - } - if (struct.isSetShortValue()) { - oprot.writeI16(struct.shortValue); - } - if (struct.isSetDoubleValue()) { - oprot.writeDouble(struct.doubleValue); - } - if (struct.isSetBinaryValue()) { - oprot.writeBinary(struct.binaryValue); - } - if (struct.isSetByteValue()) { - oprot.writeByte(struct.byteValue); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(9); - if (incoming.get(0)) { - struct.key = iprot.readI32(); - struct.setKeyIsSet(true); - } - if (incoming.get(1)) { - struct.stringValue = iprot.readString(); - struct.setStringValueIsSet(true); - } - if (incoming.get(2)) { - struct.boolValue = iprot.readBool(); - struct.setBoolValueIsSet(true); - } - if (incoming.get(3)) { - struct.intValue = iprot.readI32(); - struct.setIntValueIsSet(true); - } - if (incoming.get(4)) { - struct.longValue = iprot.readI64(); - struct.setLongValueIsSet(true); - } - if (incoming.get(5)) { - struct.shortValue = iprot.readI16(); - struct.setShortValueIsSet(true); - } - if (incoming.get(6)) { - struct.doubleValue = iprot.readDouble(); - struct.setDoubleValueIsSet(true); - } - if (incoming.get(7)) { - struct.binaryValue = iprot.readBinary(); - struct.setBinaryValueIsSet(true); - } - if (incoming.get(8)) { - struct.byteValue = iprot.readByte(); - struct.setByteValueIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Annotation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Annotation"); + + private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField STRING_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("stringValue", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField BOOL_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("boolValue", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField INT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("intValue", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField LONG_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("longValue", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField SHORT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("shortValue", org.apache.thrift.protocol.TType.I16, (short)6); + private static final org.apache.thrift.protocol.TField DOUBLE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleValue", org.apache.thrift.protocol.TType.DOUBLE, (short)7); + private static final org.apache.thrift.protocol.TField BINARY_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryValue", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField BYTE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("byteValue", org.apache.thrift.protocol.TType.BYTE, (short)9); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AnnotationStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AnnotationTupleSchemeFactory()); + } + + private int key; // required + private String stringValue; // optional + private boolean boolValue; // optional + private int intValue; // optional + private long longValue; // optional + private short shortValue; // optional + private double doubleValue; // optional + private ByteBuffer binaryValue; // optional + private byte byteValue; // 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 { + KEY((short)1, "key"), + STRING_VALUE((short)2, "stringValue"), + BOOL_VALUE((short)3, "boolValue"), + INT_VALUE((short)4, "intValue"), + LONG_VALUE((short)5, "longValue"), + SHORT_VALUE((short)6, "shortValue"), + DOUBLE_VALUE((short)7, "doubleValue"), + BINARY_VALUE((short)8, "binaryValue"), + BYTE_VALUE((short)9, "byteValue"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // KEY + return KEY; + case 2: // STRING_VALUE + return STRING_VALUE; + case 3: // BOOL_VALUE + return BOOL_VALUE; + case 4: // INT_VALUE + return INT_VALUE; + case 5: // LONG_VALUE + return LONG_VALUE; + case 6: // SHORT_VALUE + return SHORT_VALUE; + case 7: // DOUBLE_VALUE + return DOUBLE_VALUE; + case 8: // BINARY_VALUE + return BINARY_VALUE; + case 9: // BYTE_VALUE + return BYTE_VALUE; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __KEY_ISSET_ID = 0; + private static final int __BOOLVALUE_ISSET_ID = 1; + private static final int __INTVALUE_ISSET_ID = 2; + private static final int __LONGVALUE_ISSET_ID = 3; + private static final int __SHORTVALUE_ISSET_ID = 4; + private static final int __DOUBLEVALUE_ISSET_ID = 5; + private static final int __BYTEVALUE_ISSET_ID = 6; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.STRING_VALUE,_Fields.BOOL_VALUE,_Fields.INT_VALUE,_Fields.LONG_VALUE,_Fields.SHORT_VALUE,_Fields.DOUBLE_VALUE,_Fields.BINARY_VALUE,_Fields.BYTE_VALUE}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.STRING_VALUE, new org.apache.thrift.meta_data.FieldMetaData("stringValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.BOOL_VALUE, new org.apache.thrift.meta_data.FieldMetaData("boolValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.INT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("intValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.LONG_VALUE, new org.apache.thrift.meta_data.FieldMetaData("longValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SHORT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("shortValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.DOUBLE_VALUE, new org.apache.thrift.meta_data.FieldMetaData("doubleValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.BINARY_VALUE, new org.apache.thrift.meta_data.FieldMetaData("binaryValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.BYTE_VALUE, new org.apache.thrift.meta_data.FieldMetaData("byteValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Annotation.class, metaDataMap); + } + + public Annotation() { + } + + public Annotation( + int key) + { + this(); + this.key = key; + setKeyIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public Annotation(Annotation other) { + __isset_bitfield = other.__isset_bitfield; + this.key = other.key; + if (other.isSetStringValue()) { + this.stringValue = other.stringValue; + } + this.boolValue = other.boolValue; + this.intValue = other.intValue; + this.longValue = other.longValue; + this.shortValue = other.shortValue; + this.doubleValue = other.doubleValue; + if (other.isSetBinaryValue()) { + this.binaryValue = org.apache.thrift.TBaseHelper.copyBinary(other.binaryValue); +; + } + this.byteValue = other.byteValue; + } + + public Annotation deepCopy() { + return new Annotation(this); + } + + @Override + public void clear() { + setKeyIsSet(false); + this.key = 0; + this.stringValue = null; + setBoolValueIsSet(false); + this.boolValue = false; + setIntValueIsSet(false); + this.intValue = 0; + setLongValueIsSet(false); + this.longValue = 0; + setShortValueIsSet(false); + this.shortValue = 0; + setDoubleValueIsSet(false); + this.doubleValue = 0.0; + this.binaryValue = null; + setByteValueIsSet(false); + this.byteValue = 0; + } + + public int getKey() { + return this.key; + } + + public void setKey(int key) { + this.key = key; + setKeyIsSet(true); + } + + public void unsetKey() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_ISSET_ID); + } + + /** Returns true if field key is set (has been assigned a value) and false otherwise */ + public boolean isSetKey() { + return EncodingUtils.testBit(__isset_bitfield, __KEY_ISSET_ID); + } + + public void setKeyIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_ISSET_ID, value); + } + + public String getStringValue() { + return this.stringValue; + } + + public void setStringValue(String stringValue) { + this.stringValue = stringValue; + } + + public void unsetStringValue() { + this.stringValue = null; + } + + /** Returns true if field stringValue is set (has been assigned a value) and false otherwise */ + public boolean isSetStringValue() { + return this.stringValue != null; + } + + public void setStringValueIsSet(boolean value) { + if (!value) { + this.stringValue = null; + } + } + + public boolean isBoolValue() { + return this.boolValue; + } + + public void setBoolValue(boolean boolValue) { + this.boolValue = boolValue; + setBoolValueIsSet(true); + } + + public void unsetBoolValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BOOLVALUE_ISSET_ID); + } + + /** Returns true if field boolValue is set (has been assigned a value) and false otherwise */ + public boolean isSetBoolValue() { + return EncodingUtils.testBit(__isset_bitfield, __BOOLVALUE_ISSET_ID); + } + + public void setBoolValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BOOLVALUE_ISSET_ID, value); + } + + public int getIntValue() { + return this.intValue; + } + + public void setIntValue(int intValue) { + this.intValue = intValue; + setIntValueIsSet(true); + } + + public void unsetIntValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INTVALUE_ISSET_ID); + } + + /** Returns true if field intValue is set (has been assigned a value) and false otherwise */ + public boolean isSetIntValue() { + return EncodingUtils.testBit(__isset_bitfield, __INTVALUE_ISSET_ID); + } + + public void setIntValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INTVALUE_ISSET_ID, value); + } + + public long getLongValue() { + return this.longValue; + } + + public void setLongValue(long longValue) { + this.longValue = longValue; + setLongValueIsSet(true); + } + + public void unsetLongValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LONGVALUE_ISSET_ID); + } + + /** Returns true if field longValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLongValue() { + return EncodingUtils.testBit(__isset_bitfield, __LONGVALUE_ISSET_ID); + } + + public void setLongValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LONGVALUE_ISSET_ID, value); + } + + public short getShortValue() { + return this.shortValue; + } + + public void setShortValue(short shortValue) { + this.shortValue = shortValue; + setShortValueIsSet(true); + } + + public void unsetShortValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHORTVALUE_ISSET_ID); + } + + /** Returns true if field shortValue is set (has been assigned a value) and false otherwise */ + public boolean isSetShortValue() { + return EncodingUtils.testBit(__isset_bitfield, __SHORTVALUE_ISSET_ID); + } + + public void setShortValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHORTVALUE_ISSET_ID, value); + } + + public double getDoubleValue() { + return this.doubleValue; + } + + public void setDoubleValue(double doubleValue) { + this.doubleValue = doubleValue; + setDoubleValueIsSet(true); + } + + public void unsetDoubleValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOUBLEVALUE_ISSET_ID); + } + + /** Returns true if field doubleValue is set (has been assigned a value) and false otherwise */ + public boolean isSetDoubleValue() { + return EncodingUtils.testBit(__isset_bitfield, __DOUBLEVALUE_ISSET_ID); + } + + public void setDoubleValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOUBLEVALUE_ISSET_ID, value); + } + + public byte[] getBinaryValue() { + setBinaryValue(org.apache.thrift.TBaseHelper.rightSize(binaryValue)); + return binaryValue == null ? null : binaryValue.array(); + } + + public ByteBuffer bufferForBinaryValue() { + return binaryValue; + } + + public void setBinaryValue(byte[] binaryValue) { + setBinaryValue(binaryValue == null ? (ByteBuffer)null : ByteBuffer.wrap(binaryValue)); + } + + public void setBinaryValue(ByteBuffer binaryValue) { + this.binaryValue = binaryValue; + } + + public void unsetBinaryValue() { + this.binaryValue = null; + } + + /** Returns true if field binaryValue is set (has been assigned a value) and false otherwise */ + public boolean isSetBinaryValue() { + return this.binaryValue != null; + } + + public void setBinaryValueIsSet(boolean value) { + if (!value) { + this.binaryValue = null; + } + } + + public byte getByteValue() { + return this.byteValue; + } + + public void setByteValue(byte byteValue) { + this.byteValue = byteValue; + setByteValueIsSet(true); + } + + public void unsetByteValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BYTEVALUE_ISSET_ID); + } + + /** Returns true if field byteValue is set (has been assigned a value) and false otherwise */ + public boolean isSetByteValue() { + return EncodingUtils.testBit(__isset_bitfield, __BYTEVALUE_ISSET_ID); + } + + public void setByteValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BYTEVALUE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case KEY: + if (value == null) { + unsetKey(); + } else { + setKey((Integer)value); + } + break; + + case STRING_VALUE: + if (value == null) { + unsetStringValue(); + } else { + setStringValue((String)value); + } + break; + + case BOOL_VALUE: + if (value == null) { + unsetBoolValue(); + } else { + setBoolValue((Boolean)value); + } + break; + + case INT_VALUE: + if (value == null) { + unsetIntValue(); + } else { + setIntValue((Integer)value); + } + break; + + case LONG_VALUE: + if (value == null) { + unsetLongValue(); + } else { + setLongValue((Long)value); + } + break; + + case SHORT_VALUE: + if (value == null) { + unsetShortValue(); + } else { + setShortValue((Short)value); + } + break; + + case DOUBLE_VALUE: + if (value == null) { + unsetDoubleValue(); + } else { + setDoubleValue((Double)value); + } + break; + + case BINARY_VALUE: + if (value == null) { + unsetBinaryValue(); + } else { + setBinaryValue((ByteBuffer)value); + } + break; + + case BYTE_VALUE: + if (value == null) { + unsetByteValue(); + } else { + setByteValue((Byte)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case KEY: + return Integer.valueOf(getKey()); + + case STRING_VALUE: + return getStringValue(); + + case BOOL_VALUE: + return Boolean.valueOf(isBoolValue()); + + case INT_VALUE: + return Integer.valueOf(getIntValue()); + + case LONG_VALUE: + return Long.valueOf(getLongValue()); + + case SHORT_VALUE: + return Short.valueOf(getShortValue()); + + case DOUBLE_VALUE: + return Double.valueOf(getDoubleValue()); + + case BINARY_VALUE: + return getBinaryValue(); + + case BYTE_VALUE: + return Byte.valueOf(getByteValue()); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case KEY: + return isSetKey(); + case STRING_VALUE: + return isSetStringValue(); + case BOOL_VALUE: + return isSetBoolValue(); + case INT_VALUE: + return isSetIntValue(); + case LONG_VALUE: + return isSetLongValue(); + case SHORT_VALUE: + return isSetShortValue(); + case DOUBLE_VALUE: + return isSetDoubleValue(); + case BINARY_VALUE: + return isSetBinaryValue(); + case BYTE_VALUE: + return isSetByteValue(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Annotation) + return this.equals((Annotation)that); + return false; + } + + public boolean equals(Annotation that) { + if (that == null) + return false; + + boolean this_present_key = true; + boolean that_present_key = true; + if (this_present_key || that_present_key) { + if (!(this_present_key && that_present_key)) + return false; + if (this.key != that.key) + return false; + } + + boolean this_present_stringValue = true && this.isSetStringValue(); + boolean that_present_stringValue = true && that.isSetStringValue(); + if (this_present_stringValue || that_present_stringValue) { + if (!(this_present_stringValue && that_present_stringValue)) + return false; + if (!this.stringValue.equals(that.stringValue)) + return false; + } + + boolean this_present_boolValue = true && this.isSetBoolValue(); + boolean that_present_boolValue = true && that.isSetBoolValue(); + if (this_present_boolValue || that_present_boolValue) { + if (!(this_present_boolValue && that_present_boolValue)) + return false; + if (this.boolValue != that.boolValue) + return false; + } + + boolean this_present_intValue = true && this.isSetIntValue(); + boolean that_present_intValue = true && that.isSetIntValue(); + if (this_present_intValue || that_present_intValue) { + if (!(this_present_intValue && that_present_intValue)) + return false; + if (this.intValue != that.intValue) + return false; + } + + boolean this_present_longValue = true && this.isSetLongValue(); + boolean that_present_longValue = true && that.isSetLongValue(); + if (this_present_longValue || that_present_longValue) { + if (!(this_present_longValue && that_present_longValue)) + return false; + if (this.longValue != that.longValue) + return false; + } + + boolean this_present_shortValue = true && this.isSetShortValue(); + boolean that_present_shortValue = true && that.isSetShortValue(); + if (this_present_shortValue || that_present_shortValue) { + if (!(this_present_shortValue && that_present_shortValue)) + return false; + if (this.shortValue != that.shortValue) + return false; + } + + boolean this_present_doubleValue = true && this.isSetDoubleValue(); + boolean that_present_doubleValue = true && that.isSetDoubleValue(); + if (this_present_doubleValue || that_present_doubleValue) { + if (!(this_present_doubleValue && that_present_doubleValue)) + return false; + if (this.doubleValue != that.doubleValue) + return false; + } + + boolean this_present_binaryValue = true && this.isSetBinaryValue(); + boolean that_present_binaryValue = true && that.isSetBinaryValue(); + if (this_present_binaryValue || that_present_binaryValue) { + if (!(this_present_binaryValue && that_present_binaryValue)) + return false; + if (!this.binaryValue.equals(that.binaryValue)) + return false; + } + + boolean this_present_byteValue = true && this.isSetByteValue(); + boolean that_present_byteValue = true && that.isSetByteValue(); + if (this_present_byteValue || that_present_byteValue) { + if (!(this_present_byteValue && that_present_byteValue)) + return false; + if (this.byteValue != that.byteValue) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Annotation other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Annotation typedOther = (Annotation)other; + + lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStringValue()).compareTo(typedOther.isSetStringValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStringValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stringValue, typedOther.stringValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBoolValue()).compareTo(typedOther.isSetBoolValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBoolValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.boolValue, typedOther.boolValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIntValue()).compareTo(typedOther.isSetIntValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIntValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.intValue, typedOther.intValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLongValue()).compareTo(typedOther.isSetLongValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLongValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.longValue, typedOther.longValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetShortValue()).compareTo(typedOther.isSetShortValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShortValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortValue, typedOther.shortValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDoubleValue()).compareTo(typedOther.isSetDoubleValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDoubleValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doubleValue, typedOther.doubleValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBinaryValue()).compareTo(typedOther.isSetBinaryValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBinaryValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryValue, typedOther.binaryValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetByteValue()).compareTo(typedOther.isSetByteValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetByteValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.byteValue, typedOther.byteValue); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Annotation("); + boolean first = true; + + sb.append("key:"); + sb.append(this.key); + first = false; + if (isSetStringValue()) { + if (!first) sb.append(", "); + sb.append("stringValue:"); + if (this.stringValue == null) { + sb.append("null"); + } else { + sb.append(this.stringValue); + } + first = false; + } + if (isSetBoolValue()) { + if (!first) sb.append(", "); + sb.append("boolValue:"); + sb.append(this.boolValue); + first = false; + } + if (isSetIntValue()) { + if (!first) sb.append(", "); + sb.append("intValue:"); + sb.append(this.intValue); + first = false; + } + if (isSetLongValue()) { + if (!first) sb.append(", "); + sb.append("longValue:"); + sb.append(this.longValue); + first = false; + } + if (isSetShortValue()) { + if (!first) sb.append(", "); + sb.append("shortValue:"); + sb.append(this.shortValue); + first = false; + } + if (isSetDoubleValue()) { + if (!first) sb.append(", "); + sb.append("doubleValue:"); + sb.append(this.doubleValue); + first = false; + } + if (isSetBinaryValue()) { + if (!first) sb.append(", "); + sb.append("binaryValue:"); + if (this.binaryValue == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.binaryValue, sb); + } + first = false; + } + if (isSetByteValue()) { + if (!first) sb.append(", "); + sb.append("byteValue:"); + sb.append(this.byteValue); + 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, 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 AnnotationStandardSchemeFactory implements SchemeFactory { + public AnnotationStandardScheme getScheme() { + return new AnnotationStandardScheme(); + } + } + + private static class AnnotationStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Annotation 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: // KEY + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.key = iprot.readI32(); + struct.setKeyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STRING_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stringValue = iprot.readString(); + struct.setStringValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // BOOL_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.boolValue = iprot.readBool(); + struct.setBoolValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // INT_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.intValue = iprot.readI32(); + struct.setIntValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LONG_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.longValue = iprot.readI64(); + struct.setLongValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SHORT_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.shortValue = iprot.readI16(); + struct.setShortValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DOUBLE_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.doubleValue = iprot.readDouble(); + struct.setDoubleValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // BINARY_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.binaryValue = iprot.readBinary(); + struct.setBinaryValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // BYTE_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { + struct.byteValue = iprot.readByte(); + struct.setByteValueIsSet(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, Annotation struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeI32(struct.key); + oprot.writeFieldEnd(); + if (struct.stringValue != null) { + if (struct.isSetStringValue()) { + oprot.writeFieldBegin(STRING_VALUE_FIELD_DESC); + oprot.writeString(struct.stringValue); + oprot.writeFieldEnd(); + } + } + if (struct.isSetBoolValue()) { + oprot.writeFieldBegin(BOOL_VALUE_FIELD_DESC); + oprot.writeBool(struct.boolValue); + oprot.writeFieldEnd(); + } + if (struct.isSetIntValue()) { + oprot.writeFieldBegin(INT_VALUE_FIELD_DESC); + oprot.writeI32(struct.intValue); + oprot.writeFieldEnd(); + } + if (struct.isSetLongValue()) { + oprot.writeFieldBegin(LONG_VALUE_FIELD_DESC); + oprot.writeI64(struct.longValue); + oprot.writeFieldEnd(); + } + if (struct.isSetShortValue()) { + oprot.writeFieldBegin(SHORT_VALUE_FIELD_DESC); + oprot.writeI16(struct.shortValue); + oprot.writeFieldEnd(); + } + if (struct.isSetDoubleValue()) { + oprot.writeFieldBegin(DOUBLE_VALUE_FIELD_DESC); + oprot.writeDouble(struct.doubleValue); + oprot.writeFieldEnd(); + } + if (struct.binaryValue != null) { + if (struct.isSetBinaryValue()) { + oprot.writeFieldBegin(BINARY_VALUE_FIELD_DESC); + oprot.writeBinary(struct.binaryValue); + oprot.writeFieldEnd(); + } + } + if (struct.isSetByteValue()) { + oprot.writeFieldBegin(BYTE_VALUE_FIELD_DESC); + oprot.writeByte(struct.byteValue); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AnnotationTupleSchemeFactory implements SchemeFactory { + public AnnotationTupleScheme getScheme() { + return new AnnotationTupleScheme(); + } + } + + private static class AnnotationTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetKey()) { + optionals.set(0); + } + if (struct.isSetStringValue()) { + optionals.set(1); + } + if (struct.isSetBoolValue()) { + optionals.set(2); + } + if (struct.isSetIntValue()) { + optionals.set(3); + } + if (struct.isSetLongValue()) { + optionals.set(4); + } + if (struct.isSetShortValue()) { + optionals.set(5); + } + if (struct.isSetDoubleValue()) { + optionals.set(6); + } + if (struct.isSetBinaryValue()) { + optionals.set(7); + } + if (struct.isSetByteValue()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetKey()) { + oprot.writeI32(struct.key); + } + if (struct.isSetStringValue()) { + oprot.writeString(struct.stringValue); + } + if (struct.isSetBoolValue()) { + oprot.writeBool(struct.boolValue); + } + if (struct.isSetIntValue()) { + oprot.writeI32(struct.intValue); + } + if (struct.isSetLongValue()) { + oprot.writeI64(struct.longValue); + } + if (struct.isSetShortValue()) { + oprot.writeI16(struct.shortValue); + } + if (struct.isSetDoubleValue()) { + oprot.writeDouble(struct.doubleValue); + } + if (struct.isSetBinaryValue()) { + oprot.writeBinary(struct.binaryValue); + } + if (struct.isSetByteValue()) { + oprot.writeByte(struct.byteValue); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.key = iprot.readI32(); + struct.setKeyIsSet(true); + } + if (incoming.get(1)) { + struct.stringValue = iprot.readString(); + struct.setStringValueIsSet(true); + } + if (incoming.get(2)) { + struct.boolValue = iprot.readBool(); + struct.setBoolValueIsSet(true); + } + if (incoming.get(3)) { + struct.intValue = iprot.readI32(); + struct.setIntValueIsSet(true); + } + if (incoming.get(4)) { + struct.longValue = iprot.readI64(); + struct.setLongValueIsSet(true); + } + if (incoming.get(5)) { + struct.shortValue = iprot.readI16(); + struct.setShortValueIsSet(true); + } + if (incoming.get(6)) { + struct.doubleValue = iprot.readDouble(); + struct.setDoubleValueIsSet(true); + } + if (incoming.get(7)) { + struct.binaryValue = iprot.readBinary(); + struct.setBinaryValueIsSet(true); + } + if (incoming.get(8)) { + struct.byteValue = iprot.readByte(); + struct.setByteValueIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/ApiMetaData.java b/src/main/java/com/profiler/common/dto/thrift/ApiMetaData.java index 2222219c6..04dec249e 100644 --- a/src/main/java/com/profiler/common/dto/thrift/ApiMetaData.java +++ b/src/main/java/com/profiler/common/dto/thrift/ApiMetaData.java @@ -1,857 +1,860 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ApiMetaData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApiMetaData"); - - 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 AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)2); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField API_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("apiId", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField API_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("apiInfo", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField LINE_FIELD_DESC = new org.apache.thrift.protocol.TField("line", org.apache.thrift.protocol.TType.I32, (short)6); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ApiMetaDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ApiMetaDataTupleSchemeFactory()); - } - - private String agentId; // required - private short agentIdentifier; // required - private long startTime; // required - private int apiId; // required - private String apiInfo; // required - private int line; // 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"), - AGENT_IDENTIFIER((short)2, "agentIdentifier"), - START_TIME((short)3, "startTime"), - API_ID((short)4, "apiId"), - API_INFO((short)5, "apiInfo"), - LINE((short)6, "line"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // AGENT_IDENTIFIER - return AGENT_IDENTIFIER; - case 3: // START_TIME - return START_TIME; - case 4: // API_ID - return API_ID; - case 5: // API_INFO - return API_INFO; - case 6: // LINE - return LINE; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __AGENTIDENTIFIER_ISSET_ID = 0; - private static final int __STARTTIME_ISSET_ID = 1; - private static final int __APIID_ISSET_ID = 2; - private static final int __LINE_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - private _Fields optionals[] = {_Fields.LINE}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.API_ID, new org.apache.thrift.meta_data.FieldMetaData("apiId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.API_INFO, new org.apache.thrift.meta_data.FieldMetaData("apiInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LINE, new org.apache.thrift.meta_data.FieldMetaData("line", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApiMetaData.class, metaDataMap); - } - - public ApiMetaData() { - } - - public ApiMetaData( - String agentId, - short agentIdentifier, - long startTime, - int apiId, - String apiInfo) - { - this(); - this.agentId = agentId; - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - this.startTime = startTime; - setStartTimeIsSet(true); - this.apiId = apiId; - setApiIdIsSet(true); - this.apiInfo = apiInfo; - } - - /** - * Performs a deep copy on other. - */ - public ApiMetaData(ApiMetaData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - this.agentIdentifier = other.agentIdentifier; - this.startTime = other.startTime; - this.apiId = other.apiId; - if (other.isSetApiInfo()) { - this.apiInfo = other.apiInfo; - } - this.line = other.line; - } - - public ApiMetaData deepCopy() { - return new ApiMetaData(this); - } - - @Override - public void clear() { - this.agentId = null; - setAgentIdentifierIsSet(false); - this.agentIdentifier = 0; - setStartTimeIsSet(false); - this.startTime = 0; - setApiIdIsSet(false); - this.apiId = 0; - this.apiInfo = null; - setLineIsSet(false); - this.line = 0; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 short getAgentIdentifier() { - return this.agentIdentifier; - } - - public void setAgentIdentifier(short agentIdentifier) { - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - } - - public void unsetAgentIdentifier() { - __isset_bit_vector.clear(__AGENTIDENTIFIER_ISSET_ID); - } - - /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentIdentifier() { - return __isset_bit_vector.get(__AGENTIDENTIFIER_ISSET_ID); - } - - public void setAgentIdentifierIsSet(boolean value) { - __isset_bit_vector.set(__AGENTIDENTIFIER_ISSET_ID, value); - } - - public long getStartTime() { - return this.startTime; - } - - public void setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - } - - public void unsetStartTime() { - __isset_bit_vector.clear(__STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return __isset_bit_vector.get(__STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bit_vector.set(__STARTTIME_ISSET_ID, value); - } - - public int getApiId() { - return this.apiId; - } - - public void setApiId(int apiId) { - this.apiId = apiId; - setApiIdIsSet(true); - } - - public void unsetApiId() { - __isset_bit_vector.clear(__APIID_ISSET_ID); - } - - /** Returns true if field apiId is set (has been assigned a value) and false otherwise */ - public boolean isSetApiId() { - return __isset_bit_vector.get(__APIID_ISSET_ID); - } - - public void setApiIdIsSet(boolean value) { - __isset_bit_vector.set(__APIID_ISSET_ID, value); - } - - public String getApiInfo() { - return this.apiInfo; - } - - public void setApiInfo(String apiInfo) { - this.apiInfo = apiInfo; - } - - public void unsetApiInfo() { - this.apiInfo = null; - } - - /** Returns true if field apiInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetApiInfo() { - return this.apiInfo != null; - } - - public void setApiInfoIsSet(boolean value) { - if (!value) { - this.apiInfo = null; - } - } - - public int getLine() { - return this.line; - } - - public void setLine(int line) { - this.line = line; - setLineIsSet(true); - } - - public void unsetLine() { - __isset_bit_vector.clear(__LINE_ISSET_ID); - } - - /** Returns true if field line is set (has been assigned a value) and false otherwise */ - public boolean isSetLine() { - return __isset_bit_vector.get(__LINE_ISSET_ID); - } - - public void setLineIsSet(boolean value) { - __isset_bit_vector.set(__LINE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case AGENT_IDENTIFIER: - if (value == null) { - unsetAgentIdentifier(); - } else { - setAgentIdentifier((Short)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((Long)value); - } - break; - - case API_ID: - if (value == null) { - unsetApiId(); - } else { - setApiId((Integer)value); - } - break; - - case API_INFO: - if (value == null) { - unsetApiInfo(); - } else { - setApiInfo((String)value); - } - break; - - case LINE: - if (value == null) { - unsetLine(); - } else { - setLine((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case AGENT_IDENTIFIER: - return Short.valueOf(getAgentIdentifier()); - - case START_TIME: - return Long.valueOf(getStartTime()); - - case API_ID: - return Integer.valueOf(getApiId()); - - case API_INFO: - return getApiInfo(); - - case LINE: - return Integer.valueOf(getLine()); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case AGENT_IDENTIFIER: - return isSetAgentIdentifier(); - case START_TIME: - return isSetStartTime(); - case API_ID: - return isSetApiId(); - case API_INFO: - return isSetApiInfo(); - case LINE: - return isSetLine(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ApiMetaData) - return this.equals((ApiMetaData)that); - return false; - } - - public boolean equals(ApiMetaData that) { - if (that == null) - return false; - - 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_agentIdentifier = true; - boolean that_present_agentIdentifier = true; - if (this_present_agentIdentifier || that_present_agentIdentifier) { - if (!(this_present_agentIdentifier && that_present_agentIdentifier)) - return false; - if (this.agentIdentifier != that.agentIdentifier) - return false; - } - - boolean this_present_startTime = true; - boolean that_present_startTime = true; - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_apiId = true; - boolean that_present_apiId = true; - if (this_present_apiId || that_present_apiId) { - if (!(this_present_apiId && that_present_apiId)) - return false; - if (this.apiId != that.apiId) - return false; - } - - boolean this_present_apiInfo = true && this.isSetApiInfo(); - boolean that_present_apiInfo = true && that.isSetApiInfo(); - if (this_present_apiInfo || that_present_apiInfo) { - if (!(this_present_apiInfo && that_present_apiInfo)) - return false; - if (!this.apiInfo.equals(that.apiInfo)) - return false; - } - - boolean this_present_line = true && this.isSetLine(); - boolean that_present_line = true && that.isSetLine(); - if (this_present_line || that_present_line) { - if (!(this_present_line && that_present_line)) - return false; - if (this.line != that.line) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(ApiMetaData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - ApiMetaData typedOther = (ApiMetaData)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentIdentifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApiId()).compareTo(typedOther.isSetApiId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApiId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.apiId, typedOther.apiId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApiInfo()).compareTo(typedOther.isSetApiInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApiInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.apiInfo, typedOther.apiInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLine()).compareTo(typedOther.isSetLine()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLine()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line, typedOther.line); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("ApiMetaData("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("agentIdentifier:"); - sb.append(this.agentIdentifier); - first = false; - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - if (!first) sb.append(", "); - sb.append("apiId:"); - sb.append(this.apiId); - first = false; - if (!first) sb.append(", "); - sb.append("apiInfo:"); - if (this.apiInfo == null) { - sb.append("null"); - } else { - sb.append(this.apiInfo); - } - first = false; - if (isSetLine()) { - if (!first) sb.append(", "); - sb.append("line:"); - sb.append(this.line); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 ApiMetaDataStandardSchemeFactory implements SchemeFactory { - public ApiMetaDataStandardScheme getScheme() { - return new ApiMetaDataStandardScheme(); - } - } - - private static class ApiMetaDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ApiMetaData 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: // AGENT_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // API_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.apiId = iprot.readI32(); - struct.setApiIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // API_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.apiInfo = iprot.readString(); - struct.setApiInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // LINE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.line = iprot.readI32(); - struct.setLineIsSet(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, ApiMetaData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); - oprot.writeI16(struct.agentIdentifier); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(API_ID_FIELD_DESC); - oprot.writeI32(struct.apiId); - oprot.writeFieldEnd(); - if (struct.apiInfo != null) { - oprot.writeFieldBegin(API_INFO_FIELD_DESC); - oprot.writeString(struct.apiInfo); - oprot.writeFieldEnd(); - } - if (struct.isSetLine()) { - oprot.writeFieldBegin(LINE_FIELD_DESC); - oprot.writeI32(struct.line); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ApiMetaDataTupleSchemeFactory implements SchemeFactory { - public ApiMetaDataTupleScheme getScheme() { - return new ApiMetaDataTupleScheme(); - } - } - - private static class ApiMetaDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ApiMetaData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetAgentIdentifier()) { - optionals.set(1); - } - if (struct.isSetStartTime()) { - optionals.set(2); - } - if (struct.isSetApiId()) { - optionals.set(3); - } - if (struct.isSetApiInfo()) { - optionals.set(4); - } - if (struct.isSetLine()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetAgentIdentifier()) { - oprot.writeI16(struct.agentIdentifier); - } - if (struct.isSetStartTime()) { - oprot.writeI64(struct.startTime); - } - if (struct.isSetApiId()) { - oprot.writeI32(struct.apiId); - } - if (struct.isSetApiInfo()) { - oprot.writeString(struct.apiInfo); - } - if (struct.isSetLine()) { - oprot.writeI32(struct.line); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ApiMetaData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(6); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } - if (incoming.get(2)) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } - if (incoming.get(3)) { - struct.apiId = iprot.readI32(); - struct.setApiIdIsSet(true); - } - if (incoming.get(4)) { - struct.apiInfo = iprot.readString(); - struct.setApiInfoIsSet(true); - } - if (incoming.get(5)) { - struct.line = iprot.readI32(); - struct.setLineIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ApiMetaData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApiMetaData"); + + 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 AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)2); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField API_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("apiId", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField API_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("apiInfo", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField LINE_FIELD_DESC = new org.apache.thrift.protocol.TField("line", org.apache.thrift.protocol.TType.I32, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ApiMetaDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ApiMetaDataTupleSchemeFactory()); + } + + private String agentId; // required + private short agentIdentifier; // required + private long startTime; // required + private int apiId; // required + private String apiInfo; // required + private int line; // 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"), + AGENT_IDENTIFIER((short)2, "agentIdentifier"), + START_TIME((short)3, "startTime"), + API_ID((short)4, "apiId"), + API_INFO((short)5, "apiInfo"), + LINE((short)6, "line"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // AGENT_IDENTIFIER + return AGENT_IDENTIFIER; + case 3: // START_TIME + return START_TIME; + case 4: // API_ID + return API_ID; + case 5: // API_INFO + return API_INFO; + case 6: // LINE + return LINE; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __AGENTIDENTIFIER_ISSET_ID = 0; + private static final int __STARTTIME_ISSET_ID = 1; + private static final int __APIID_ISSET_ID = 2; + private static final int __LINE_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.LINE}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.API_ID, new org.apache.thrift.meta_data.FieldMetaData("apiId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.API_INFO, new org.apache.thrift.meta_data.FieldMetaData("apiInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LINE, new org.apache.thrift.meta_data.FieldMetaData("line", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApiMetaData.class, metaDataMap); + } + + public ApiMetaData() { + } + + public ApiMetaData( + String agentId, + short agentIdentifier, + long startTime, + int apiId, + String apiInfo) + { + this(); + this.agentId = agentId; + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + this.startTime = startTime; + setStartTimeIsSet(true); + this.apiId = apiId; + setApiIdIsSet(true); + this.apiInfo = apiInfo; + } + + /** + * Performs a deep copy on other. + */ + public ApiMetaData(ApiMetaData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + this.agentIdentifier = other.agentIdentifier; + this.startTime = other.startTime; + this.apiId = other.apiId; + if (other.isSetApiInfo()) { + this.apiInfo = other.apiInfo; + } + this.line = other.line; + } + + public ApiMetaData deepCopy() { + return new ApiMetaData(this); + } + + @Override + public void clear() { + this.agentId = null; + setAgentIdentifierIsSet(false); + this.agentIdentifier = 0; + setStartTimeIsSet(false); + this.startTime = 0; + setApiIdIsSet(false); + this.apiId = 0; + this.apiInfo = null; + setLineIsSet(false); + this.line = 0; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 short getAgentIdentifier() { + return this.agentIdentifier; + } + + public void setAgentIdentifier(short agentIdentifier) { + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + } + + public void unsetAgentIdentifier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentIdentifier() { + return EncodingUtils.testBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + public void setAgentIdentifierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID, value); + } + + public long getStartTime() { + return this.startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + } + + public void unsetStartTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public int getApiId() { + return this.apiId; + } + + public void setApiId(int apiId) { + this.apiId = apiId; + setApiIdIsSet(true); + } + + public void unsetApiId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __APIID_ISSET_ID); + } + + /** Returns true if field apiId is set (has been assigned a value) and false otherwise */ + public boolean isSetApiId() { + return EncodingUtils.testBit(__isset_bitfield, __APIID_ISSET_ID); + } + + public void setApiIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __APIID_ISSET_ID, value); + } + + public String getApiInfo() { + return this.apiInfo; + } + + public void setApiInfo(String apiInfo) { + this.apiInfo = apiInfo; + } + + public void unsetApiInfo() { + this.apiInfo = null; + } + + /** Returns true if field apiInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetApiInfo() { + return this.apiInfo != null; + } + + public void setApiInfoIsSet(boolean value) { + if (!value) { + this.apiInfo = null; + } + } + + public int getLine() { + return this.line; + } + + public void setLine(int line) { + this.line = line; + setLineIsSet(true); + } + + public void unsetLine() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LINE_ISSET_ID); + } + + /** Returns true if field line is set (has been assigned a value) and false otherwise */ + public boolean isSetLine() { + return EncodingUtils.testBit(__isset_bitfield, __LINE_ISSET_ID); + } + + public void setLineIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LINE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case AGENT_IDENTIFIER: + if (value == null) { + unsetAgentIdentifier(); + } else { + setAgentIdentifier((Short)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((Long)value); + } + break; + + case API_ID: + if (value == null) { + unsetApiId(); + } else { + setApiId((Integer)value); + } + break; + + case API_INFO: + if (value == null) { + unsetApiInfo(); + } else { + setApiInfo((String)value); + } + break; + + case LINE: + if (value == null) { + unsetLine(); + } else { + setLine((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case AGENT_IDENTIFIER: + return Short.valueOf(getAgentIdentifier()); + + case START_TIME: + return Long.valueOf(getStartTime()); + + case API_ID: + return Integer.valueOf(getApiId()); + + case API_INFO: + return getApiInfo(); + + case LINE: + return Integer.valueOf(getLine()); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case AGENT_IDENTIFIER: + return isSetAgentIdentifier(); + case START_TIME: + return isSetStartTime(); + case API_ID: + return isSetApiId(); + case API_INFO: + return isSetApiInfo(); + case LINE: + return isSetLine(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ApiMetaData) + return this.equals((ApiMetaData)that); + return false; + } + + public boolean equals(ApiMetaData that) { + if (that == null) + return false; + + 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_agentIdentifier = true; + boolean that_present_agentIdentifier = true; + if (this_present_agentIdentifier || that_present_agentIdentifier) { + if (!(this_present_agentIdentifier && that_present_agentIdentifier)) + return false; + if (this.agentIdentifier != that.agentIdentifier) + return false; + } + + boolean this_present_startTime = true; + boolean that_present_startTime = true; + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_apiId = true; + boolean that_present_apiId = true; + if (this_present_apiId || that_present_apiId) { + if (!(this_present_apiId && that_present_apiId)) + return false; + if (this.apiId != that.apiId) + return false; + } + + boolean this_present_apiInfo = true && this.isSetApiInfo(); + boolean that_present_apiInfo = true && that.isSetApiInfo(); + if (this_present_apiInfo || that_present_apiInfo) { + if (!(this_present_apiInfo && that_present_apiInfo)) + return false; + if (!this.apiInfo.equals(that.apiInfo)) + return false; + } + + boolean this_present_line = true && this.isSetLine(); + boolean that_present_line = true && that.isSetLine(); + if (this_present_line || that_present_line) { + if (!(this_present_line && that_present_line)) + return false; + if (this.line != that.line) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(ApiMetaData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ApiMetaData typedOther = (ApiMetaData)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentIdentifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetApiId()).compareTo(typedOther.isSetApiId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetApiId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.apiId, typedOther.apiId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetApiInfo()).compareTo(typedOther.isSetApiInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetApiInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.apiInfo, typedOther.apiInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLine()).compareTo(typedOther.isSetLine()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLine()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line, typedOther.line); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ApiMetaData("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("agentIdentifier:"); + sb.append(this.agentIdentifier); + first = false; + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + if (!first) sb.append(", "); + sb.append("apiId:"); + sb.append(this.apiId); + first = false; + if (!first) sb.append(", "); + sb.append("apiInfo:"); + if (this.apiInfo == null) { + sb.append("null"); + } else { + sb.append(this.apiInfo); + } + first = false; + if (isSetLine()) { + if (!first) sb.append(", "); + sb.append("line:"); + sb.append(this.line); + 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, 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 ApiMetaDataStandardSchemeFactory implements SchemeFactory { + public ApiMetaDataStandardScheme getScheme() { + return new ApiMetaDataStandardScheme(); + } + } + + private static class ApiMetaDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ApiMetaData 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: // AGENT_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // API_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.apiId = iprot.readI32(); + struct.setApiIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // API_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.apiInfo = iprot.readString(); + struct.setApiInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // LINE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.line = iprot.readI32(); + struct.setLineIsSet(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, ApiMetaData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); + oprot.writeI16(struct.agentIdentifier); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(API_ID_FIELD_DESC); + oprot.writeI32(struct.apiId); + oprot.writeFieldEnd(); + if (struct.apiInfo != null) { + oprot.writeFieldBegin(API_INFO_FIELD_DESC); + oprot.writeString(struct.apiInfo); + oprot.writeFieldEnd(); + } + if (struct.isSetLine()) { + oprot.writeFieldBegin(LINE_FIELD_DESC); + oprot.writeI32(struct.line); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ApiMetaDataTupleSchemeFactory implements SchemeFactory { + public ApiMetaDataTupleScheme getScheme() { + return new ApiMetaDataTupleScheme(); + } + } + + private static class ApiMetaDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ApiMetaData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetAgentIdentifier()) { + optionals.set(1); + } + if (struct.isSetStartTime()) { + optionals.set(2); + } + if (struct.isSetApiId()) { + optionals.set(3); + } + if (struct.isSetApiInfo()) { + optionals.set(4); + } + if (struct.isSetLine()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetAgentIdentifier()) { + oprot.writeI16(struct.agentIdentifier); + } + if (struct.isSetStartTime()) { + oprot.writeI64(struct.startTime); + } + if (struct.isSetApiId()) { + oprot.writeI32(struct.apiId); + } + if (struct.isSetApiInfo()) { + oprot.writeString(struct.apiInfo); + } + if (struct.isSetLine()) { + oprot.writeI32(struct.line); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ApiMetaData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } + if (incoming.get(2)) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } + if (incoming.get(3)) { + struct.apiId = iprot.readI32(); + struct.setApiIdIsSet(true); + } + if (incoming.get(4)) { + struct.apiInfo = iprot.readString(); + struct.setApiInfoIsSet(true); + } + if (incoming.get(5)) { + struct.line = iprot.readI32(); + struct.setLineIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java b/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java index 00086f954..d84d0fa23 100644 --- a/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java +++ b/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java @@ -1,1413 +1,1416 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class JVMInfoThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JVMInfoThriftDTO"); - - 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 DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField ACTIVE_THREAD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("activeThreadCount", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField GC1_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("gc1Count", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField GC1_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("gc1Time", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField GC2_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("gc2Count", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField GC2_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("gc2Time", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField HEAP_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("heapUsed", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField HEAP_COMMITTED_FIELD_DESC = new org.apache.thrift.protocol.TField("heapCommitted", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField NON_HEAP_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("nonHeapUsed", org.apache.thrift.protocol.TType.I64, (short)10); - private static final org.apache.thrift.protocol.TField NON_HEAP_COMMITTED_FIELD_DESC = new org.apache.thrift.protocol.TField("nonHeapCommitted", org.apache.thrift.protocol.TType.I64, (short)11); - private static final org.apache.thrift.protocol.TField PROCESS_CPUTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("processCPUTime", org.apache.thrift.protocol.TType.DOUBLE, (short)12); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new JVMInfoThriftDTOStandardSchemeFactory()); - schemes.put(TupleScheme.class, new JVMInfoThriftDTOTupleSchemeFactory()); - } - - private String agentId; // required - private long dataTime; // required - private int activeThreadCount; // required - private long gc1Count; // optional - private long gc1Time; // optional - private long gc2Count; // optional - private long gc2Time; // optional - private long heapUsed; // required - private long heapCommitted; // required - private long nonHeapUsed; // required - private long nonHeapCommitted; // required - private double processCPUTime; // 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"), - DATA_TIME((short)2, "dataTime"), - ACTIVE_THREAD_COUNT((short)3, "activeThreadCount"), - GC1_COUNT((short)4, "gc1Count"), - GC1_TIME((short)5, "gc1Time"), - GC2_COUNT((short)6, "gc2Count"), - GC2_TIME((short)7, "gc2Time"), - HEAP_USED((short)8, "heapUsed"), - HEAP_COMMITTED((short)9, "heapCommitted"), - NON_HEAP_USED((short)10, "nonHeapUsed"), - NON_HEAP_COMMITTED((short)11, "nonHeapCommitted"), - PROCESS_CPUTIME((short)12, "processCPUTime"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // DATA_TIME - return DATA_TIME; - case 3: // ACTIVE_THREAD_COUNT - return ACTIVE_THREAD_COUNT; - case 4: // GC1_COUNT - return GC1_COUNT; - case 5: // GC1_TIME - return GC1_TIME; - case 6: // GC2_COUNT - return GC2_COUNT; - case 7: // GC2_TIME - return GC2_TIME; - case 8: // HEAP_USED - return HEAP_USED; - case 9: // HEAP_COMMITTED - return HEAP_COMMITTED; - case 10: // NON_HEAP_USED - return NON_HEAP_USED; - case 11: // NON_HEAP_COMMITTED - return NON_HEAP_COMMITTED; - case 12: // PROCESS_CPUTIME - return PROCESS_CPUTIME; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DATATIME_ISSET_ID = 0; - private static final int __ACTIVETHREADCOUNT_ISSET_ID = 1; - private static final int __GC1COUNT_ISSET_ID = 2; - private static final int __GC1TIME_ISSET_ID = 3; - private static final int __GC2COUNT_ISSET_ID = 4; - private static final int __GC2TIME_ISSET_ID = 5; - private static final int __HEAPUSED_ISSET_ID = 6; - private static final int __HEAPCOMMITTED_ISSET_ID = 7; - private static final int __NONHEAPUSED_ISSET_ID = 8; - private static final int __NONHEAPCOMMITTED_ISSET_ID = 9; - private static final int __PROCESSCPUTIME_ISSET_ID = 10; - private BitSet __isset_bit_vector = new BitSet(11); - private _Fields optionals[] = {_Fields.GC1_COUNT,_Fields.GC1_TIME,_Fields.GC2_COUNT,_Fields.GC2_TIME,_Fields.PROCESS_CPUTIME}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ACTIVE_THREAD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("activeThreadCount", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.GC1_COUNT, new org.apache.thrift.meta_data.FieldMetaData("gc1Count", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.GC1_TIME, new org.apache.thrift.meta_data.FieldMetaData("gc1Time", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.GC2_COUNT, new org.apache.thrift.meta_data.FieldMetaData("gc2Count", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.GC2_TIME, new org.apache.thrift.meta_data.FieldMetaData("gc2Time", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.HEAP_USED, new org.apache.thrift.meta_data.FieldMetaData("heapUsed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.HEAP_COMMITTED, new org.apache.thrift.meta_data.FieldMetaData("heapCommitted", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NON_HEAP_USED, new org.apache.thrift.meta_data.FieldMetaData("nonHeapUsed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NON_HEAP_COMMITTED, new org.apache.thrift.meta_data.FieldMetaData("nonHeapCommitted", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PROCESS_CPUTIME, new org.apache.thrift.meta_data.FieldMetaData("processCPUTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JVMInfoThriftDTO.class, metaDataMap); - } - - public JVMInfoThriftDTO() { - } - - public JVMInfoThriftDTO( - String agentId, - long dataTime, - int activeThreadCount, - long heapUsed, - long heapCommitted, - long nonHeapUsed, - long nonHeapCommitted) - { - this(); - this.agentId = agentId; - this.dataTime = dataTime; - setDataTimeIsSet(true); - this.activeThreadCount = activeThreadCount; - setActiveThreadCountIsSet(true); - this.heapUsed = heapUsed; - setHeapUsedIsSet(true); - this.heapCommitted = heapCommitted; - setHeapCommittedIsSet(true); - this.nonHeapUsed = nonHeapUsed; - setNonHeapUsedIsSet(true); - this.nonHeapCommitted = nonHeapCommitted; - setNonHeapCommittedIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public JVMInfoThriftDTO(JVMInfoThriftDTO other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - this.dataTime = other.dataTime; - this.activeThreadCount = other.activeThreadCount; - this.gc1Count = other.gc1Count; - this.gc1Time = other.gc1Time; - this.gc2Count = other.gc2Count; - this.gc2Time = other.gc2Time; - this.heapUsed = other.heapUsed; - this.heapCommitted = other.heapCommitted; - this.nonHeapUsed = other.nonHeapUsed; - this.nonHeapCommitted = other.nonHeapCommitted; - this.processCPUTime = other.processCPUTime; - } - - public JVMInfoThriftDTO deepCopy() { - return new JVMInfoThriftDTO(this); - } - - @Override - public void clear() { - this.agentId = null; - setDataTimeIsSet(false); - this.dataTime = 0; - setActiveThreadCountIsSet(false); - this.activeThreadCount = 0; - setGc1CountIsSet(false); - this.gc1Count = 0; - setGc1TimeIsSet(false); - this.gc1Time = 0; - setGc2CountIsSet(false); - this.gc2Count = 0; - setGc2TimeIsSet(false); - this.gc2Time = 0; - setHeapUsedIsSet(false); - this.heapUsed = 0; - setHeapCommittedIsSet(false); - this.heapCommitted = 0; - setNonHeapUsedIsSet(false); - this.nonHeapUsed = 0; - setNonHeapCommittedIsSet(false); - this.nonHeapCommitted = 0; - setProcessCPUTimeIsSet(false); - this.processCPUTime = 0.0; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 getDataTime() { - return this.dataTime; - } - - public void setDataTime(long dataTime) { - this.dataTime = dataTime; - setDataTimeIsSet(true); - } - - public void unsetDataTime() { - __isset_bit_vector.clear(__DATATIME_ISSET_ID); - } - - /** Returns true if field dataTime is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTime() { - return __isset_bit_vector.get(__DATATIME_ISSET_ID); - } - - public void setDataTimeIsSet(boolean value) { - __isset_bit_vector.set(__DATATIME_ISSET_ID, value); - } - - public int getActiveThreadCount() { - return this.activeThreadCount; - } - - public void setActiveThreadCount(int activeThreadCount) { - this.activeThreadCount = activeThreadCount; - setActiveThreadCountIsSet(true); - } - - public void unsetActiveThreadCount() { - __isset_bit_vector.clear(__ACTIVETHREADCOUNT_ISSET_ID); - } - - /** Returns true if field activeThreadCount is set (has been assigned a value) and false otherwise */ - public boolean isSetActiveThreadCount() { - return __isset_bit_vector.get(__ACTIVETHREADCOUNT_ISSET_ID); - } - - public void setActiveThreadCountIsSet(boolean value) { - __isset_bit_vector.set(__ACTIVETHREADCOUNT_ISSET_ID, value); - } - - public long getGc1Count() { - return this.gc1Count; - } - - public void setGc1Count(long gc1Count) { - this.gc1Count = gc1Count; - setGc1CountIsSet(true); - } - - public void unsetGc1Count() { - __isset_bit_vector.clear(__GC1COUNT_ISSET_ID); - } - - /** Returns true if field gc1Count is set (has been assigned a value) and false otherwise */ - public boolean isSetGc1Count() { - return __isset_bit_vector.get(__GC1COUNT_ISSET_ID); - } - - public void setGc1CountIsSet(boolean value) { - __isset_bit_vector.set(__GC1COUNT_ISSET_ID, value); - } - - public long getGc1Time() { - return this.gc1Time; - } - - public void setGc1Time(long gc1Time) { - this.gc1Time = gc1Time; - setGc1TimeIsSet(true); - } - - public void unsetGc1Time() { - __isset_bit_vector.clear(__GC1TIME_ISSET_ID); - } - - /** Returns true if field gc1Time is set (has been assigned a value) and false otherwise */ - public boolean isSetGc1Time() { - return __isset_bit_vector.get(__GC1TIME_ISSET_ID); - } - - public void setGc1TimeIsSet(boolean value) { - __isset_bit_vector.set(__GC1TIME_ISSET_ID, value); - } - - public long getGc2Count() { - return this.gc2Count; - } - - public void setGc2Count(long gc2Count) { - this.gc2Count = gc2Count; - setGc2CountIsSet(true); - } - - public void unsetGc2Count() { - __isset_bit_vector.clear(__GC2COUNT_ISSET_ID); - } - - /** Returns true if field gc2Count is set (has been assigned a value) and false otherwise */ - public boolean isSetGc2Count() { - return __isset_bit_vector.get(__GC2COUNT_ISSET_ID); - } - - public void setGc2CountIsSet(boolean value) { - __isset_bit_vector.set(__GC2COUNT_ISSET_ID, value); - } - - public long getGc2Time() { - return this.gc2Time; - } - - public void setGc2Time(long gc2Time) { - this.gc2Time = gc2Time; - setGc2TimeIsSet(true); - } - - public void unsetGc2Time() { - __isset_bit_vector.clear(__GC2TIME_ISSET_ID); - } - - /** Returns true if field gc2Time is set (has been assigned a value) and false otherwise */ - public boolean isSetGc2Time() { - return __isset_bit_vector.get(__GC2TIME_ISSET_ID); - } - - public void setGc2TimeIsSet(boolean value) { - __isset_bit_vector.set(__GC2TIME_ISSET_ID, value); - } - - public long getHeapUsed() { - return this.heapUsed; - } - - public void setHeapUsed(long heapUsed) { - this.heapUsed = heapUsed; - setHeapUsedIsSet(true); - } - - public void unsetHeapUsed() { - __isset_bit_vector.clear(__HEAPUSED_ISSET_ID); - } - - /** Returns true if field heapUsed is set (has been assigned a value) and false otherwise */ - public boolean isSetHeapUsed() { - return __isset_bit_vector.get(__HEAPUSED_ISSET_ID); - } - - public void setHeapUsedIsSet(boolean value) { - __isset_bit_vector.set(__HEAPUSED_ISSET_ID, value); - } - - public long getHeapCommitted() { - return this.heapCommitted; - } - - public void setHeapCommitted(long heapCommitted) { - this.heapCommitted = heapCommitted; - setHeapCommittedIsSet(true); - } - - public void unsetHeapCommitted() { - __isset_bit_vector.clear(__HEAPCOMMITTED_ISSET_ID); - } - - /** Returns true if field heapCommitted is set (has been assigned a value) and false otherwise */ - public boolean isSetHeapCommitted() { - return __isset_bit_vector.get(__HEAPCOMMITTED_ISSET_ID); - } - - public void setHeapCommittedIsSet(boolean value) { - __isset_bit_vector.set(__HEAPCOMMITTED_ISSET_ID, value); - } - - public long getNonHeapUsed() { - return this.nonHeapUsed; - } - - public void setNonHeapUsed(long nonHeapUsed) { - this.nonHeapUsed = nonHeapUsed; - setNonHeapUsedIsSet(true); - } - - public void unsetNonHeapUsed() { - __isset_bit_vector.clear(__NONHEAPUSED_ISSET_ID); - } - - /** Returns true if field nonHeapUsed is set (has been assigned a value) and false otherwise */ - public boolean isSetNonHeapUsed() { - return __isset_bit_vector.get(__NONHEAPUSED_ISSET_ID); - } - - public void setNonHeapUsedIsSet(boolean value) { - __isset_bit_vector.set(__NONHEAPUSED_ISSET_ID, value); - } - - public long getNonHeapCommitted() { - return this.nonHeapCommitted; - } - - public void setNonHeapCommitted(long nonHeapCommitted) { - this.nonHeapCommitted = nonHeapCommitted; - setNonHeapCommittedIsSet(true); - } - - public void unsetNonHeapCommitted() { - __isset_bit_vector.clear(__NONHEAPCOMMITTED_ISSET_ID); - } - - /** Returns true if field nonHeapCommitted is set (has been assigned a value) and false otherwise */ - public boolean isSetNonHeapCommitted() { - return __isset_bit_vector.get(__NONHEAPCOMMITTED_ISSET_ID); - } - - public void setNonHeapCommittedIsSet(boolean value) { - __isset_bit_vector.set(__NONHEAPCOMMITTED_ISSET_ID, value); - } - - public double getProcessCPUTime() { - return this.processCPUTime; - } - - public void setProcessCPUTime(double processCPUTime) { - this.processCPUTime = processCPUTime; - setProcessCPUTimeIsSet(true); - } - - public void unsetProcessCPUTime() { - __isset_bit_vector.clear(__PROCESSCPUTIME_ISSET_ID); - } - - /** Returns true if field processCPUTime is set (has been assigned a value) and false otherwise */ - public boolean isSetProcessCPUTime() { - return __isset_bit_vector.get(__PROCESSCPUTIME_ISSET_ID); - } - - public void setProcessCPUTimeIsSet(boolean value) { - __isset_bit_vector.set(__PROCESSCPUTIME_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case DATA_TIME: - if (value == null) { - unsetDataTime(); - } else { - setDataTime((Long)value); - } - break; - - case ACTIVE_THREAD_COUNT: - if (value == null) { - unsetActiveThreadCount(); - } else { - setActiveThreadCount((Integer)value); - } - break; - - case GC1_COUNT: - if (value == null) { - unsetGc1Count(); - } else { - setGc1Count((Long)value); - } - break; - - case GC1_TIME: - if (value == null) { - unsetGc1Time(); - } else { - setGc1Time((Long)value); - } - break; - - case GC2_COUNT: - if (value == null) { - unsetGc2Count(); - } else { - setGc2Count((Long)value); - } - break; - - case GC2_TIME: - if (value == null) { - unsetGc2Time(); - } else { - setGc2Time((Long)value); - } - break; - - case HEAP_USED: - if (value == null) { - unsetHeapUsed(); - } else { - setHeapUsed((Long)value); - } - break; - - case HEAP_COMMITTED: - if (value == null) { - unsetHeapCommitted(); - } else { - setHeapCommitted((Long)value); - } - break; - - case NON_HEAP_USED: - if (value == null) { - unsetNonHeapUsed(); - } else { - setNonHeapUsed((Long)value); - } - break; - - case NON_HEAP_COMMITTED: - if (value == null) { - unsetNonHeapCommitted(); - } else { - setNonHeapCommitted((Long)value); - } - break; - - case PROCESS_CPUTIME: - if (value == null) { - unsetProcessCPUTime(); - } else { - setProcessCPUTime((Double)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case DATA_TIME: - return Long.valueOf(getDataTime()); - - case ACTIVE_THREAD_COUNT: - return Integer.valueOf(getActiveThreadCount()); - - case GC1_COUNT: - return Long.valueOf(getGc1Count()); - - case GC1_TIME: - return Long.valueOf(getGc1Time()); - - case GC2_COUNT: - return Long.valueOf(getGc2Count()); - - case GC2_TIME: - return Long.valueOf(getGc2Time()); - - case HEAP_USED: - return Long.valueOf(getHeapUsed()); - - case HEAP_COMMITTED: - return Long.valueOf(getHeapCommitted()); - - case NON_HEAP_USED: - return Long.valueOf(getNonHeapUsed()); - - case NON_HEAP_COMMITTED: - return Long.valueOf(getNonHeapCommitted()); - - case PROCESS_CPUTIME: - return Double.valueOf(getProcessCPUTime()); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case DATA_TIME: - return isSetDataTime(); - case ACTIVE_THREAD_COUNT: - return isSetActiveThreadCount(); - case GC1_COUNT: - return isSetGc1Count(); - case GC1_TIME: - return isSetGc1Time(); - case GC2_COUNT: - return isSetGc2Count(); - case GC2_TIME: - return isSetGc2Time(); - case HEAP_USED: - return isSetHeapUsed(); - case HEAP_COMMITTED: - return isSetHeapCommitted(); - case NON_HEAP_USED: - return isSetNonHeapUsed(); - case NON_HEAP_COMMITTED: - return isSetNonHeapCommitted(); - case PROCESS_CPUTIME: - return isSetProcessCPUTime(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof JVMInfoThriftDTO) - return this.equals((JVMInfoThriftDTO)that); - return false; - } - - public boolean equals(JVMInfoThriftDTO that) { - if (that == null) - return false; - - 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_dataTime = true; - boolean that_present_dataTime = true; - if (this_present_dataTime || that_present_dataTime) { - if (!(this_present_dataTime && that_present_dataTime)) - return false; - if (this.dataTime != that.dataTime) - return false; - } - - boolean this_present_activeThreadCount = true; - boolean that_present_activeThreadCount = true; - if (this_present_activeThreadCount || that_present_activeThreadCount) { - if (!(this_present_activeThreadCount && that_present_activeThreadCount)) - return false; - if (this.activeThreadCount != that.activeThreadCount) - return false; - } - - boolean this_present_gc1Count = true && this.isSetGc1Count(); - boolean that_present_gc1Count = true && that.isSetGc1Count(); - if (this_present_gc1Count || that_present_gc1Count) { - if (!(this_present_gc1Count && that_present_gc1Count)) - return false; - if (this.gc1Count != that.gc1Count) - return false; - } - - boolean this_present_gc1Time = true && this.isSetGc1Time(); - boolean that_present_gc1Time = true && that.isSetGc1Time(); - if (this_present_gc1Time || that_present_gc1Time) { - if (!(this_present_gc1Time && that_present_gc1Time)) - return false; - if (this.gc1Time != that.gc1Time) - return false; - } - - boolean this_present_gc2Count = true && this.isSetGc2Count(); - boolean that_present_gc2Count = true && that.isSetGc2Count(); - if (this_present_gc2Count || that_present_gc2Count) { - if (!(this_present_gc2Count && that_present_gc2Count)) - return false; - if (this.gc2Count != that.gc2Count) - return false; - } - - boolean this_present_gc2Time = true && this.isSetGc2Time(); - boolean that_present_gc2Time = true && that.isSetGc2Time(); - if (this_present_gc2Time || that_present_gc2Time) { - if (!(this_present_gc2Time && that_present_gc2Time)) - return false; - if (this.gc2Time != that.gc2Time) - return false; - } - - boolean this_present_heapUsed = true; - boolean that_present_heapUsed = true; - if (this_present_heapUsed || that_present_heapUsed) { - if (!(this_present_heapUsed && that_present_heapUsed)) - return false; - if (this.heapUsed != that.heapUsed) - return false; - } - - boolean this_present_heapCommitted = true; - boolean that_present_heapCommitted = true; - if (this_present_heapCommitted || that_present_heapCommitted) { - if (!(this_present_heapCommitted && that_present_heapCommitted)) - return false; - if (this.heapCommitted != that.heapCommitted) - return false; - } - - boolean this_present_nonHeapUsed = true; - boolean that_present_nonHeapUsed = true; - if (this_present_nonHeapUsed || that_present_nonHeapUsed) { - if (!(this_present_nonHeapUsed && that_present_nonHeapUsed)) - return false; - if (this.nonHeapUsed != that.nonHeapUsed) - return false; - } - - boolean this_present_nonHeapCommitted = true; - boolean that_present_nonHeapCommitted = true; - if (this_present_nonHeapCommitted || that_present_nonHeapCommitted) { - if (!(this_present_nonHeapCommitted && that_present_nonHeapCommitted)) - return false; - if (this.nonHeapCommitted != that.nonHeapCommitted) - return false; - } - - boolean this_present_processCPUTime = true && this.isSetProcessCPUTime(); - boolean that_present_processCPUTime = true && that.isSetProcessCPUTime(); - if (this_present_processCPUTime || that_present_processCPUTime) { - if (!(this_present_processCPUTime && that_present_processCPUTime)) - return false; - if (this.processCPUTime != that.processCPUTime) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(JVMInfoThriftDTO other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - JVMInfoThriftDTO typedOther = (JVMInfoThriftDTO)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataTime()).compareTo(typedOther.isSetDataTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTime, typedOther.dataTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetActiveThreadCount()).compareTo(typedOther.isSetActiveThreadCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetActiveThreadCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeThreadCount, typedOther.activeThreadCount); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGc1Count()).compareTo(typedOther.isSetGc1Count()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGc1Count()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc1Count, typedOther.gc1Count); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGc1Time()).compareTo(typedOther.isSetGc1Time()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGc1Time()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc1Time, typedOther.gc1Time); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGc2Count()).compareTo(typedOther.isSetGc2Count()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGc2Count()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc2Count, typedOther.gc2Count); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGc2Time()).compareTo(typedOther.isSetGc2Time()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGc2Time()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc2Time, typedOther.gc2Time); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHeapUsed()).compareTo(typedOther.isSetHeapUsed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHeapUsed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heapUsed, typedOther.heapUsed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHeapCommitted()).compareTo(typedOther.isSetHeapCommitted()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHeapCommitted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heapCommitted, typedOther.heapCommitted); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNonHeapUsed()).compareTo(typedOther.isSetNonHeapUsed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNonHeapUsed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonHeapUsed, typedOther.nonHeapUsed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNonHeapCommitted()).compareTo(typedOther.isSetNonHeapCommitted()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNonHeapCommitted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonHeapCommitted, typedOther.nonHeapCommitted); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProcessCPUTime()).compareTo(typedOther.isSetProcessCPUTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProcessCPUTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processCPUTime, typedOther.processCPUTime); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("JVMInfoThriftDTO("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataTime:"); - sb.append(this.dataTime); - first = false; - if (!first) sb.append(", "); - sb.append("activeThreadCount:"); - sb.append(this.activeThreadCount); - first = false; - if (isSetGc1Count()) { - if (!first) sb.append(", "); - sb.append("gc1Count:"); - sb.append(this.gc1Count); - first = false; - } - if (isSetGc1Time()) { - if (!first) sb.append(", "); - sb.append("gc1Time:"); - sb.append(this.gc1Time); - first = false; - } - if (isSetGc2Count()) { - if (!first) sb.append(", "); - sb.append("gc2Count:"); - sb.append(this.gc2Count); - first = false; - } - if (isSetGc2Time()) { - if (!first) sb.append(", "); - sb.append("gc2Time:"); - sb.append(this.gc2Time); - first = false; - } - if (!first) sb.append(", "); - sb.append("heapUsed:"); - sb.append(this.heapUsed); - first = false; - if (!first) sb.append(", "); - sb.append("heapCommitted:"); - sb.append(this.heapCommitted); - first = false; - if (!first) sb.append(", "); - sb.append("nonHeapUsed:"); - sb.append(this.nonHeapUsed); - first = false; - if (!first) sb.append(", "); - sb.append("nonHeapCommitted:"); - sb.append(this.nonHeapCommitted); - first = false; - if (isSetProcessCPUTime()) { - if (!first) sb.append(", "); - sb.append("processCPUTime:"); - sb.append(this.processCPUTime); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 JVMInfoThriftDTOStandardSchemeFactory implements SchemeFactory { - public JVMInfoThriftDTOStandardScheme getScheme() { - return new JVMInfoThriftDTOStandardScheme(); - } - } - - private static class JVMInfoThriftDTOStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, JVMInfoThriftDTO 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: // DATA_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.dataTime = iprot.readI64(); - struct.setDataTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ACTIVE_THREAD_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.activeThreadCount = iprot.readI32(); - struct.setActiveThreadCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // GC1_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.gc1Count = iprot.readI64(); - struct.setGc1CountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // GC1_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.gc1Time = iprot.readI64(); - struct.setGc1TimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // GC2_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.gc2Count = iprot.readI64(); - struct.setGc2CountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // GC2_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.gc2Time = iprot.readI64(); - struct.setGc2TimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // HEAP_USED - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.heapUsed = iprot.readI64(); - struct.setHeapUsedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // HEAP_COMMITTED - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.heapCommitted = iprot.readI64(); - struct.setHeapCommittedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // NON_HEAP_USED - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.nonHeapUsed = iprot.readI64(); - struct.setNonHeapUsedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // NON_HEAP_COMMITTED - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.nonHeapCommitted = iprot.readI64(); - struct.setNonHeapCommittedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // PROCESS_CPUTIME - if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { - struct.processCPUTime = iprot.readDouble(); - struct.setProcessCPUTimeIsSet(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, JVMInfoThriftDTO struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DATA_TIME_FIELD_DESC); - oprot.writeI64(struct.dataTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(ACTIVE_THREAD_COUNT_FIELD_DESC); - oprot.writeI32(struct.activeThreadCount); - oprot.writeFieldEnd(); - if (struct.isSetGc1Count()) { - oprot.writeFieldBegin(GC1_COUNT_FIELD_DESC); - oprot.writeI64(struct.gc1Count); - oprot.writeFieldEnd(); - } - if (struct.isSetGc1Time()) { - oprot.writeFieldBegin(GC1_TIME_FIELD_DESC); - oprot.writeI64(struct.gc1Time); - oprot.writeFieldEnd(); - } - if (struct.isSetGc2Count()) { - oprot.writeFieldBegin(GC2_COUNT_FIELD_DESC); - oprot.writeI64(struct.gc2Count); - oprot.writeFieldEnd(); - } - if (struct.isSetGc2Time()) { - oprot.writeFieldBegin(GC2_TIME_FIELD_DESC); - oprot.writeI64(struct.gc2Time); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(HEAP_USED_FIELD_DESC); - oprot.writeI64(struct.heapUsed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(HEAP_COMMITTED_FIELD_DESC); - oprot.writeI64(struct.heapCommitted); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NON_HEAP_USED_FIELD_DESC); - oprot.writeI64(struct.nonHeapUsed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NON_HEAP_COMMITTED_FIELD_DESC); - oprot.writeI64(struct.nonHeapCommitted); - oprot.writeFieldEnd(); - if (struct.isSetProcessCPUTime()) { - oprot.writeFieldBegin(PROCESS_CPUTIME_FIELD_DESC); - oprot.writeDouble(struct.processCPUTime); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class JVMInfoThriftDTOTupleSchemeFactory implements SchemeFactory { - public JVMInfoThriftDTOTupleScheme getScheme() { - return new JVMInfoThriftDTOTupleScheme(); - } - } - - private static class JVMInfoThriftDTOTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, JVMInfoThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetDataTime()) { - optionals.set(1); - } - if (struct.isSetActiveThreadCount()) { - optionals.set(2); - } - if (struct.isSetGc1Count()) { - optionals.set(3); - } - if (struct.isSetGc1Time()) { - optionals.set(4); - } - if (struct.isSetGc2Count()) { - optionals.set(5); - } - if (struct.isSetGc2Time()) { - optionals.set(6); - } - if (struct.isSetHeapUsed()) { - optionals.set(7); - } - if (struct.isSetHeapCommitted()) { - optionals.set(8); - } - if (struct.isSetNonHeapUsed()) { - optionals.set(9); - } - if (struct.isSetNonHeapCommitted()) { - optionals.set(10); - } - if (struct.isSetProcessCPUTime()) { - optionals.set(11); - } - oprot.writeBitSet(optionals, 12); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetDataTime()) { - oprot.writeI64(struct.dataTime); - } - if (struct.isSetActiveThreadCount()) { - oprot.writeI32(struct.activeThreadCount); - } - if (struct.isSetGc1Count()) { - oprot.writeI64(struct.gc1Count); - } - if (struct.isSetGc1Time()) { - oprot.writeI64(struct.gc1Time); - } - if (struct.isSetGc2Count()) { - oprot.writeI64(struct.gc2Count); - } - if (struct.isSetGc2Time()) { - oprot.writeI64(struct.gc2Time); - } - if (struct.isSetHeapUsed()) { - oprot.writeI64(struct.heapUsed); - } - if (struct.isSetHeapCommitted()) { - oprot.writeI64(struct.heapCommitted); - } - if (struct.isSetNonHeapUsed()) { - oprot.writeI64(struct.nonHeapUsed); - } - if (struct.isSetNonHeapCommitted()) { - oprot.writeI64(struct.nonHeapCommitted); - } - if (struct.isSetProcessCPUTime()) { - oprot.writeDouble(struct.processCPUTime); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, JVMInfoThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(12); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.dataTime = iprot.readI64(); - struct.setDataTimeIsSet(true); - } - if (incoming.get(2)) { - struct.activeThreadCount = iprot.readI32(); - struct.setActiveThreadCountIsSet(true); - } - if (incoming.get(3)) { - struct.gc1Count = iprot.readI64(); - struct.setGc1CountIsSet(true); - } - if (incoming.get(4)) { - struct.gc1Time = iprot.readI64(); - struct.setGc1TimeIsSet(true); - } - if (incoming.get(5)) { - struct.gc2Count = iprot.readI64(); - struct.setGc2CountIsSet(true); - } - if (incoming.get(6)) { - struct.gc2Time = iprot.readI64(); - struct.setGc2TimeIsSet(true); - } - if (incoming.get(7)) { - struct.heapUsed = iprot.readI64(); - struct.setHeapUsedIsSet(true); - } - if (incoming.get(8)) { - struct.heapCommitted = iprot.readI64(); - struct.setHeapCommittedIsSet(true); - } - if (incoming.get(9)) { - struct.nonHeapUsed = iprot.readI64(); - struct.setNonHeapUsedIsSet(true); - } - if (incoming.get(10)) { - struct.nonHeapCommitted = iprot.readI64(); - struct.setNonHeapCommittedIsSet(true); - } - if (incoming.get(11)) { - struct.processCPUTime = iprot.readDouble(); - struct.setProcessCPUTimeIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class JVMInfoThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JVMInfoThriftDTO"); + + 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 DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField ACTIVE_THREAD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("activeThreadCount", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField GC1_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("gc1Count", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField GC1_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("gc1Time", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField GC2_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("gc2Count", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField GC2_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("gc2Time", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField HEAP_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("heapUsed", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField HEAP_COMMITTED_FIELD_DESC = new org.apache.thrift.protocol.TField("heapCommitted", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField NON_HEAP_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("nonHeapUsed", org.apache.thrift.protocol.TType.I64, (short)10); + private static final org.apache.thrift.protocol.TField NON_HEAP_COMMITTED_FIELD_DESC = new org.apache.thrift.protocol.TField("nonHeapCommitted", org.apache.thrift.protocol.TType.I64, (short)11); + private static final org.apache.thrift.protocol.TField PROCESS_CPUTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("processCPUTime", org.apache.thrift.protocol.TType.DOUBLE, (short)12); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new JVMInfoThriftDTOStandardSchemeFactory()); + schemes.put(TupleScheme.class, new JVMInfoThriftDTOTupleSchemeFactory()); + } + + private String agentId; // required + private long dataTime; // required + private int activeThreadCount; // required + private long gc1Count; // optional + private long gc1Time; // optional + private long gc2Count; // optional + private long gc2Time; // optional + private long heapUsed; // required + private long heapCommitted; // required + private long nonHeapUsed; // required + private long nonHeapCommitted; // required + private double processCPUTime; // 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"), + DATA_TIME((short)2, "dataTime"), + ACTIVE_THREAD_COUNT((short)3, "activeThreadCount"), + GC1_COUNT((short)4, "gc1Count"), + GC1_TIME((short)5, "gc1Time"), + GC2_COUNT((short)6, "gc2Count"), + GC2_TIME((short)7, "gc2Time"), + HEAP_USED((short)8, "heapUsed"), + HEAP_COMMITTED((short)9, "heapCommitted"), + NON_HEAP_USED((short)10, "nonHeapUsed"), + NON_HEAP_COMMITTED((short)11, "nonHeapCommitted"), + PROCESS_CPUTIME((short)12, "processCPUTime"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // DATA_TIME + return DATA_TIME; + case 3: // ACTIVE_THREAD_COUNT + return ACTIVE_THREAD_COUNT; + case 4: // GC1_COUNT + return GC1_COUNT; + case 5: // GC1_TIME + return GC1_TIME; + case 6: // GC2_COUNT + return GC2_COUNT; + case 7: // GC2_TIME + return GC2_TIME; + case 8: // HEAP_USED + return HEAP_USED; + case 9: // HEAP_COMMITTED + return HEAP_COMMITTED; + case 10: // NON_HEAP_USED + return NON_HEAP_USED; + case 11: // NON_HEAP_COMMITTED + return NON_HEAP_COMMITTED; + case 12: // PROCESS_CPUTIME + return PROCESS_CPUTIME; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DATATIME_ISSET_ID = 0; + private static final int __ACTIVETHREADCOUNT_ISSET_ID = 1; + private static final int __GC1COUNT_ISSET_ID = 2; + private static final int __GC1TIME_ISSET_ID = 3; + private static final int __GC2COUNT_ISSET_ID = 4; + private static final int __GC2TIME_ISSET_ID = 5; + private static final int __HEAPUSED_ISSET_ID = 6; + private static final int __HEAPCOMMITTED_ISSET_ID = 7; + private static final int __NONHEAPUSED_ISSET_ID = 8; + private static final int __NONHEAPCOMMITTED_ISSET_ID = 9; + private static final int __PROCESSCPUTIME_ISSET_ID = 10; + private short __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.GC1_COUNT,_Fields.GC1_TIME,_Fields.GC2_COUNT,_Fields.GC2_TIME,_Fields.PROCESS_CPUTIME}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ACTIVE_THREAD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("activeThreadCount", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GC1_COUNT, new org.apache.thrift.meta_data.FieldMetaData("gc1Count", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.GC1_TIME, new org.apache.thrift.meta_data.FieldMetaData("gc1Time", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.GC2_COUNT, new org.apache.thrift.meta_data.FieldMetaData("gc2Count", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.GC2_TIME, new org.apache.thrift.meta_data.FieldMetaData("gc2Time", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HEAP_USED, new org.apache.thrift.meta_data.FieldMetaData("heapUsed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HEAP_COMMITTED, new org.apache.thrift.meta_data.FieldMetaData("heapCommitted", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NON_HEAP_USED, new org.apache.thrift.meta_data.FieldMetaData("nonHeapUsed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NON_HEAP_COMMITTED, new org.apache.thrift.meta_data.FieldMetaData("nonHeapCommitted", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PROCESS_CPUTIME, new org.apache.thrift.meta_data.FieldMetaData("processCPUTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JVMInfoThriftDTO.class, metaDataMap); + } + + public JVMInfoThriftDTO() { + } + + public JVMInfoThriftDTO( + String agentId, + long dataTime, + int activeThreadCount, + long heapUsed, + long heapCommitted, + long nonHeapUsed, + long nonHeapCommitted) + { + this(); + this.agentId = agentId; + this.dataTime = dataTime; + setDataTimeIsSet(true); + this.activeThreadCount = activeThreadCount; + setActiveThreadCountIsSet(true); + this.heapUsed = heapUsed; + setHeapUsedIsSet(true); + this.heapCommitted = heapCommitted; + setHeapCommittedIsSet(true); + this.nonHeapUsed = nonHeapUsed; + setNonHeapUsedIsSet(true); + this.nonHeapCommitted = nonHeapCommitted; + setNonHeapCommittedIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public JVMInfoThriftDTO(JVMInfoThriftDTO other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + this.dataTime = other.dataTime; + this.activeThreadCount = other.activeThreadCount; + this.gc1Count = other.gc1Count; + this.gc1Time = other.gc1Time; + this.gc2Count = other.gc2Count; + this.gc2Time = other.gc2Time; + this.heapUsed = other.heapUsed; + this.heapCommitted = other.heapCommitted; + this.nonHeapUsed = other.nonHeapUsed; + this.nonHeapCommitted = other.nonHeapCommitted; + this.processCPUTime = other.processCPUTime; + } + + public JVMInfoThriftDTO deepCopy() { + return new JVMInfoThriftDTO(this); + } + + @Override + public void clear() { + this.agentId = null; + setDataTimeIsSet(false); + this.dataTime = 0; + setActiveThreadCountIsSet(false); + this.activeThreadCount = 0; + setGc1CountIsSet(false); + this.gc1Count = 0; + setGc1TimeIsSet(false); + this.gc1Time = 0; + setGc2CountIsSet(false); + this.gc2Count = 0; + setGc2TimeIsSet(false); + this.gc2Time = 0; + setHeapUsedIsSet(false); + this.heapUsed = 0; + setHeapCommittedIsSet(false); + this.heapCommitted = 0; + setNonHeapUsedIsSet(false); + this.nonHeapUsed = 0; + setNonHeapCommittedIsSet(false); + this.nonHeapCommitted = 0; + setProcessCPUTimeIsSet(false); + this.processCPUTime = 0.0; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 getDataTime() { + return this.dataTime; + } + + public void setDataTime(long dataTime) { + this.dataTime = dataTime; + setDataTimeIsSet(true); + } + + public void unsetDataTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATATIME_ISSET_ID); + } + + /** Returns true if field dataTime is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTime() { + return EncodingUtils.testBit(__isset_bitfield, __DATATIME_ISSET_ID); + } + + public void setDataTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATATIME_ISSET_ID, value); + } + + public int getActiveThreadCount() { + return this.activeThreadCount; + } + + public void setActiveThreadCount(int activeThreadCount) { + this.activeThreadCount = activeThreadCount; + setActiveThreadCountIsSet(true); + } + + public void unsetActiveThreadCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACTIVETHREADCOUNT_ISSET_ID); + } + + /** Returns true if field activeThreadCount is set (has been assigned a value) and false otherwise */ + public boolean isSetActiveThreadCount() { + return EncodingUtils.testBit(__isset_bitfield, __ACTIVETHREADCOUNT_ISSET_ID); + } + + public void setActiveThreadCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACTIVETHREADCOUNT_ISSET_ID, value); + } + + public long getGc1Count() { + return this.gc1Count; + } + + public void setGc1Count(long gc1Count) { + this.gc1Count = gc1Count; + setGc1CountIsSet(true); + } + + public void unsetGc1Count() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GC1COUNT_ISSET_ID); + } + + /** Returns true if field gc1Count is set (has been assigned a value) and false otherwise */ + public boolean isSetGc1Count() { + return EncodingUtils.testBit(__isset_bitfield, __GC1COUNT_ISSET_ID); + } + + public void setGc1CountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GC1COUNT_ISSET_ID, value); + } + + public long getGc1Time() { + return this.gc1Time; + } + + public void setGc1Time(long gc1Time) { + this.gc1Time = gc1Time; + setGc1TimeIsSet(true); + } + + public void unsetGc1Time() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GC1TIME_ISSET_ID); + } + + /** Returns true if field gc1Time is set (has been assigned a value) and false otherwise */ + public boolean isSetGc1Time() { + return EncodingUtils.testBit(__isset_bitfield, __GC1TIME_ISSET_ID); + } + + public void setGc1TimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GC1TIME_ISSET_ID, value); + } + + public long getGc2Count() { + return this.gc2Count; + } + + public void setGc2Count(long gc2Count) { + this.gc2Count = gc2Count; + setGc2CountIsSet(true); + } + + public void unsetGc2Count() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GC2COUNT_ISSET_ID); + } + + /** Returns true if field gc2Count is set (has been assigned a value) and false otherwise */ + public boolean isSetGc2Count() { + return EncodingUtils.testBit(__isset_bitfield, __GC2COUNT_ISSET_ID); + } + + public void setGc2CountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GC2COUNT_ISSET_ID, value); + } + + public long getGc2Time() { + return this.gc2Time; + } + + public void setGc2Time(long gc2Time) { + this.gc2Time = gc2Time; + setGc2TimeIsSet(true); + } + + public void unsetGc2Time() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GC2TIME_ISSET_ID); + } + + /** Returns true if field gc2Time is set (has been assigned a value) and false otherwise */ + public boolean isSetGc2Time() { + return EncodingUtils.testBit(__isset_bitfield, __GC2TIME_ISSET_ID); + } + + public void setGc2TimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GC2TIME_ISSET_ID, value); + } + + public long getHeapUsed() { + return this.heapUsed; + } + + public void setHeapUsed(long heapUsed) { + this.heapUsed = heapUsed; + setHeapUsedIsSet(true); + } + + public void unsetHeapUsed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEAPUSED_ISSET_ID); + } + + /** Returns true if field heapUsed is set (has been assigned a value) and false otherwise */ + public boolean isSetHeapUsed() { + return EncodingUtils.testBit(__isset_bitfield, __HEAPUSED_ISSET_ID); + } + + public void setHeapUsedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEAPUSED_ISSET_ID, value); + } + + public long getHeapCommitted() { + return this.heapCommitted; + } + + public void setHeapCommitted(long heapCommitted) { + this.heapCommitted = heapCommitted; + setHeapCommittedIsSet(true); + } + + public void unsetHeapCommitted() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEAPCOMMITTED_ISSET_ID); + } + + /** Returns true if field heapCommitted is set (has been assigned a value) and false otherwise */ + public boolean isSetHeapCommitted() { + return EncodingUtils.testBit(__isset_bitfield, __HEAPCOMMITTED_ISSET_ID); + } + + public void setHeapCommittedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEAPCOMMITTED_ISSET_ID, value); + } + + public long getNonHeapUsed() { + return this.nonHeapUsed; + } + + public void setNonHeapUsed(long nonHeapUsed) { + this.nonHeapUsed = nonHeapUsed; + setNonHeapUsedIsSet(true); + } + + public void unsetNonHeapUsed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NONHEAPUSED_ISSET_ID); + } + + /** Returns true if field nonHeapUsed is set (has been assigned a value) and false otherwise */ + public boolean isSetNonHeapUsed() { + return EncodingUtils.testBit(__isset_bitfield, __NONHEAPUSED_ISSET_ID); + } + + public void setNonHeapUsedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NONHEAPUSED_ISSET_ID, value); + } + + public long getNonHeapCommitted() { + return this.nonHeapCommitted; + } + + public void setNonHeapCommitted(long nonHeapCommitted) { + this.nonHeapCommitted = nonHeapCommitted; + setNonHeapCommittedIsSet(true); + } + + public void unsetNonHeapCommitted() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NONHEAPCOMMITTED_ISSET_ID); + } + + /** Returns true if field nonHeapCommitted is set (has been assigned a value) and false otherwise */ + public boolean isSetNonHeapCommitted() { + return EncodingUtils.testBit(__isset_bitfield, __NONHEAPCOMMITTED_ISSET_ID); + } + + public void setNonHeapCommittedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NONHEAPCOMMITTED_ISSET_ID, value); + } + + public double getProcessCPUTime() { + return this.processCPUTime; + } + + public void setProcessCPUTime(double processCPUTime) { + this.processCPUTime = processCPUTime; + setProcessCPUTimeIsSet(true); + } + + public void unsetProcessCPUTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROCESSCPUTIME_ISSET_ID); + } + + /** Returns true if field processCPUTime is set (has been assigned a value) and false otherwise */ + public boolean isSetProcessCPUTime() { + return EncodingUtils.testBit(__isset_bitfield, __PROCESSCPUTIME_ISSET_ID); + } + + public void setProcessCPUTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROCESSCPUTIME_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case DATA_TIME: + if (value == null) { + unsetDataTime(); + } else { + setDataTime((Long)value); + } + break; + + case ACTIVE_THREAD_COUNT: + if (value == null) { + unsetActiveThreadCount(); + } else { + setActiveThreadCount((Integer)value); + } + break; + + case GC1_COUNT: + if (value == null) { + unsetGc1Count(); + } else { + setGc1Count((Long)value); + } + break; + + case GC1_TIME: + if (value == null) { + unsetGc1Time(); + } else { + setGc1Time((Long)value); + } + break; + + case GC2_COUNT: + if (value == null) { + unsetGc2Count(); + } else { + setGc2Count((Long)value); + } + break; + + case GC2_TIME: + if (value == null) { + unsetGc2Time(); + } else { + setGc2Time((Long)value); + } + break; + + case HEAP_USED: + if (value == null) { + unsetHeapUsed(); + } else { + setHeapUsed((Long)value); + } + break; + + case HEAP_COMMITTED: + if (value == null) { + unsetHeapCommitted(); + } else { + setHeapCommitted((Long)value); + } + break; + + case NON_HEAP_USED: + if (value == null) { + unsetNonHeapUsed(); + } else { + setNonHeapUsed((Long)value); + } + break; + + case NON_HEAP_COMMITTED: + if (value == null) { + unsetNonHeapCommitted(); + } else { + setNonHeapCommitted((Long)value); + } + break; + + case PROCESS_CPUTIME: + if (value == null) { + unsetProcessCPUTime(); + } else { + setProcessCPUTime((Double)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case DATA_TIME: + return Long.valueOf(getDataTime()); + + case ACTIVE_THREAD_COUNT: + return Integer.valueOf(getActiveThreadCount()); + + case GC1_COUNT: + return Long.valueOf(getGc1Count()); + + case GC1_TIME: + return Long.valueOf(getGc1Time()); + + case GC2_COUNT: + return Long.valueOf(getGc2Count()); + + case GC2_TIME: + return Long.valueOf(getGc2Time()); + + case HEAP_USED: + return Long.valueOf(getHeapUsed()); + + case HEAP_COMMITTED: + return Long.valueOf(getHeapCommitted()); + + case NON_HEAP_USED: + return Long.valueOf(getNonHeapUsed()); + + case NON_HEAP_COMMITTED: + return Long.valueOf(getNonHeapCommitted()); + + case PROCESS_CPUTIME: + return Double.valueOf(getProcessCPUTime()); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case DATA_TIME: + return isSetDataTime(); + case ACTIVE_THREAD_COUNT: + return isSetActiveThreadCount(); + case GC1_COUNT: + return isSetGc1Count(); + case GC1_TIME: + return isSetGc1Time(); + case GC2_COUNT: + return isSetGc2Count(); + case GC2_TIME: + return isSetGc2Time(); + case HEAP_USED: + return isSetHeapUsed(); + case HEAP_COMMITTED: + return isSetHeapCommitted(); + case NON_HEAP_USED: + return isSetNonHeapUsed(); + case NON_HEAP_COMMITTED: + return isSetNonHeapCommitted(); + case PROCESS_CPUTIME: + return isSetProcessCPUTime(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof JVMInfoThriftDTO) + return this.equals((JVMInfoThriftDTO)that); + return false; + } + + public boolean equals(JVMInfoThriftDTO that) { + if (that == null) + return false; + + 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_dataTime = true; + boolean that_present_dataTime = true; + if (this_present_dataTime || that_present_dataTime) { + if (!(this_present_dataTime && that_present_dataTime)) + return false; + if (this.dataTime != that.dataTime) + return false; + } + + boolean this_present_activeThreadCount = true; + boolean that_present_activeThreadCount = true; + if (this_present_activeThreadCount || that_present_activeThreadCount) { + if (!(this_present_activeThreadCount && that_present_activeThreadCount)) + return false; + if (this.activeThreadCount != that.activeThreadCount) + return false; + } + + boolean this_present_gc1Count = true && this.isSetGc1Count(); + boolean that_present_gc1Count = true && that.isSetGc1Count(); + if (this_present_gc1Count || that_present_gc1Count) { + if (!(this_present_gc1Count && that_present_gc1Count)) + return false; + if (this.gc1Count != that.gc1Count) + return false; + } + + boolean this_present_gc1Time = true && this.isSetGc1Time(); + boolean that_present_gc1Time = true && that.isSetGc1Time(); + if (this_present_gc1Time || that_present_gc1Time) { + if (!(this_present_gc1Time && that_present_gc1Time)) + return false; + if (this.gc1Time != that.gc1Time) + return false; + } + + boolean this_present_gc2Count = true && this.isSetGc2Count(); + boolean that_present_gc2Count = true && that.isSetGc2Count(); + if (this_present_gc2Count || that_present_gc2Count) { + if (!(this_present_gc2Count && that_present_gc2Count)) + return false; + if (this.gc2Count != that.gc2Count) + return false; + } + + boolean this_present_gc2Time = true && this.isSetGc2Time(); + boolean that_present_gc2Time = true && that.isSetGc2Time(); + if (this_present_gc2Time || that_present_gc2Time) { + if (!(this_present_gc2Time && that_present_gc2Time)) + return false; + if (this.gc2Time != that.gc2Time) + return false; + } + + boolean this_present_heapUsed = true; + boolean that_present_heapUsed = true; + if (this_present_heapUsed || that_present_heapUsed) { + if (!(this_present_heapUsed && that_present_heapUsed)) + return false; + if (this.heapUsed != that.heapUsed) + return false; + } + + boolean this_present_heapCommitted = true; + boolean that_present_heapCommitted = true; + if (this_present_heapCommitted || that_present_heapCommitted) { + if (!(this_present_heapCommitted && that_present_heapCommitted)) + return false; + if (this.heapCommitted != that.heapCommitted) + return false; + } + + boolean this_present_nonHeapUsed = true; + boolean that_present_nonHeapUsed = true; + if (this_present_nonHeapUsed || that_present_nonHeapUsed) { + if (!(this_present_nonHeapUsed && that_present_nonHeapUsed)) + return false; + if (this.nonHeapUsed != that.nonHeapUsed) + return false; + } + + boolean this_present_nonHeapCommitted = true; + boolean that_present_nonHeapCommitted = true; + if (this_present_nonHeapCommitted || that_present_nonHeapCommitted) { + if (!(this_present_nonHeapCommitted && that_present_nonHeapCommitted)) + return false; + if (this.nonHeapCommitted != that.nonHeapCommitted) + return false; + } + + boolean this_present_processCPUTime = true && this.isSetProcessCPUTime(); + boolean that_present_processCPUTime = true && that.isSetProcessCPUTime(); + if (this_present_processCPUTime || that_present_processCPUTime) { + if (!(this_present_processCPUTime && that_present_processCPUTime)) + return false; + if (this.processCPUTime != that.processCPUTime) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(JVMInfoThriftDTO other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + JVMInfoThriftDTO typedOther = (JVMInfoThriftDTO)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataTime()).compareTo(typedOther.isSetDataTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTime, typedOther.dataTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetActiveThreadCount()).compareTo(typedOther.isSetActiveThreadCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetActiveThreadCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeThreadCount, typedOther.activeThreadCount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGc1Count()).compareTo(typedOther.isSetGc1Count()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGc1Count()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc1Count, typedOther.gc1Count); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGc1Time()).compareTo(typedOther.isSetGc1Time()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGc1Time()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc1Time, typedOther.gc1Time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGc2Count()).compareTo(typedOther.isSetGc2Count()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGc2Count()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc2Count, typedOther.gc2Count); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGc2Time()).compareTo(typedOther.isSetGc2Time()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGc2Time()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc2Time, typedOther.gc2Time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHeapUsed()).compareTo(typedOther.isSetHeapUsed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHeapUsed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heapUsed, typedOther.heapUsed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHeapCommitted()).compareTo(typedOther.isSetHeapCommitted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHeapCommitted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heapCommitted, typedOther.heapCommitted); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNonHeapUsed()).compareTo(typedOther.isSetNonHeapUsed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNonHeapUsed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonHeapUsed, typedOther.nonHeapUsed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNonHeapCommitted()).compareTo(typedOther.isSetNonHeapCommitted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNonHeapCommitted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonHeapCommitted, typedOther.nonHeapCommitted); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProcessCPUTime()).compareTo(typedOther.isSetProcessCPUTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProcessCPUTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processCPUTime, typedOther.processCPUTime); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("JVMInfoThriftDTO("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("dataTime:"); + sb.append(this.dataTime); + first = false; + if (!first) sb.append(", "); + sb.append("activeThreadCount:"); + sb.append(this.activeThreadCount); + first = false; + if (isSetGc1Count()) { + if (!first) sb.append(", "); + sb.append("gc1Count:"); + sb.append(this.gc1Count); + first = false; + } + if (isSetGc1Time()) { + if (!first) sb.append(", "); + sb.append("gc1Time:"); + sb.append(this.gc1Time); + first = false; + } + if (isSetGc2Count()) { + if (!first) sb.append(", "); + sb.append("gc2Count:"); + sb.append(this.gc2Count); + first = false; + } + if (isSetGc2Time()) { + if (!first) sb.append(", "); + sb.append("gc2Time:"); + sb.append(this.gc2Time); + first = false; + } + if (!first) sb.append(", "); + sb.append("heapUsed:"); + sb.append(this.heapUsed); + first = false; + if (!first) sb.append(", "); + sb.append("heapCommitted:"); + sb.append(this.heapCommitted); + first = false; + if (!first) sb.append(", "); + sb.append("nonHeapUsed:"); + sb.append(this.nonHeapUsed); + first = false; + if (!first) sb.append(", "); + sb.append("nonHeapCommitted:"); + sb.append(this.nonHeapCommitted); + first = false; + if (isSetProcessCPUTime()) { + if (!first) sb.append(", "); + sb.append("processCPUTime:"); + sb.append(this.processCPUTime); + 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, 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 JVMInfoThriftDTOStandardSchemeFactory implements SchemeFactory { + public JVMInfoThriftDTOStandardScheme getScheme() { + return new JVMInfoThriftDTOStandardScheme(); + } + } + + private static class JVMInfoThriftDTOStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, JVMInfoThriftDTO 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: // DATA_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.dataTime = iprot.readI64(); + struct.setDataTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ACTIVE_THREAD_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.activeThreadCount = iprot.readI32(); + struct.setActiveThreadCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GC1_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.gc1Count = iprot.readI64(); + struct.setGc1CountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GC1_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.gc1Time = iprot.readI64(); + struct.setGc1TimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // GC2_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.gc2Count = iprot.readI64(); + struct.setGc2CountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // GC2_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.gc2Time = iprot.readI64(); + struct.setGc2TimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // HEAP_USED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.heapUsed = iprot.readI64(); + struct.setHeapUsedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // HEAP_COMMITTED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.heapCommitted = iprot.readI64(); + struct.setHeapCommittedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // NON_HEAP_USED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.nonHeapUsed = iprot.readI64(); + struct.setNonHeapUsedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // NON_HEAP_COMMITTED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.nonHeapCommitted = iprot.readI64(); + struct.setNonHeapCommittedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // PROCESS_CPUTIME + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.processCPUTime = iprot.readDouble(); + struct.setProcessCPUTimeIsSet(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, JVMInfoThriftDTO struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DATA_TIME_FIELD_DESC); + oprot.writeI64(struct.dataTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(ACTIVE_THREAD_COUNT_FIELD_DESC); + oprot.writeI32(struct.activeThreadCount); + oprot.writeFieldEnd(); + if (struct.isSetGc1Count()) { + oprot.writeFieldBegin(GC1_COUNT_FIELD_DESC); + oprot.writeI64(struct.gc1Count); + oprot.writeFieldEnd(); + } + if (struct.isSetGc1Time()) { + oprot.writeFieldBegin(GC1_TIME_FIELD_DESC); + oprot.writeI64(struct.gc1Time); + oprot.writeFieldEnd(); + } + if (struct.isSetGc2Count()) { + oprot.writeFieldBegin(GC2_COUNT_FIELD_DESC); + oprot.writeI64(struct.gc2Count); + oprot.writeFieldEnd(); + } + if (struct.isSetGc2Time()) { + oprot.writeFieldBegin(GC2_TIME_FIELD_DESC); + oprot.writeI64(struct.gc2Time); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(HEAP_USED_FIELD_DESC); + oprot.writeI64(struct.heapUsed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HEAP_COMMITTED_FIELD_DESC); + oprot.writeI64(struct.heapCommitted); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NON_HEAP_USED_FIELD_DESC); + oprot.writeI64(struct.nonHeapUsed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NON_HEAP_COMMITTED_FIELD_DESC); + oprot.writeI64(struct.nonHeapCommitted); + oprot.writeFieldEnd(); + if (struct.isSetProcessCPUTime()) { + oprot.writeFieldBegin(PROCESS_CPUTIME_FIELD_DESC); + oprot.writeDouble(struct.processCPUTime); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class JVMInfoThriftDTOTupleSchemeFactory implements SchemeFactory { + public JVMInfoThriftDTOTupleScheme getScheme() { + return new JVMInfoThriftDTOTupleScheme(); + } + } + + private static class JVMInfoThriftDTOTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, JVMInfoThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetDataTime()) { + optionals.set(1); + } + if (struct.isSetActiveThreadCount()) { + optionals.set(2); + } + if (struct.isSetGc1Count()) { + optionals.set(3); + } + if (struct.isSetGc1Time()) { + optionals.set(4); + } + if (struct.isSetGc2Count()) { + optionals.set(5); + } + if (struct.isSetGc2Time()) { + optionals.set(6); + } + if (struct.isSetHeapUsed()) { + optionals.set(7); + } + if (struct.isSetHeapCommitted()) { + optionals.set(8); + } + if (struct.isSetNonHeapUsed()) { + optionals.set(9); + } + if (struct.isSetNonHeapCommitted()) { + optionals.set(10); + } + if (struct.isSetProcessCPUTime()) { + optionals.set(11); + } + oprot.writeBitSet(optionals, 12); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetDataTime()) { + oprot.writeI64(struct.dataTime); + } + if (struct.isSetActiveThreadCount()) { + oprot.writeI32(struct.activeThreadCount); + } + if (struct.isSetGc1Count()) { + oprot.writeI64(struct.gc1Count); + } + if (struct.isSetGc1Time()) { + oprot.writeI64(struct.gc1Time); + } + if (struct.isSetGc2Count()) { + oprot.writeI64(struct.gc2Count); + } + if (struct.isSetGc2Time()) { + oprot.writeI64(struct.gc2Time); + } + if (struct.isSetHeapUsed()) { + oprot.writeI64(struct.heapUsed); + } + if (struct.isSetHeapCommitted()) { + oprot.writeI64(struct.heapCommitted); + } + if (struct.isSetNonHeapUsed()) { + oprot.writeI64(struct.nonHeapUsed); + } + if (struct.isSetNonHeapCommitted()) { + oprot.writeI64(struct.nonHeapCommitted); + } + if (struct.isSetProcessCPUTime()) { + oprot.writeDouble(struct.processCPUTime); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, JVMInfoThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(12); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.dataTime = iprot.readI64(); + struct.setDataTimeIsSet(true); + } + if (incoming.get(2)) { + struct.activeThreadCount = iprot.readI32(); + struct.setActiveThreadCountIsSet(true); + } + if (incoming.get(3)) { + struct.gc1Count = iprot.readI64(); + struct.setGc1CountIsSet(true); + } + if (incoming.get(4)) { + struct.gc1Time = iprot.readI64(); + struct.setGc1TimeIsSet(true); + } + if (incoming.get(5)) { + struct.gc2Count = iprot.readI64(); + struct.setGc2CountIsSet(true); + } + if (incoming.get(6)) { + struct.gc2Time = iprot.readI64(); + struct.setGc2TimeIsSet(true); + } + if (incoming.get(7)) { + struct.heapUsed = iprot.readI64(); + struct.setHeapUsedIsSet(true); + } + if (incoming.get(8)) { + struct.heapCommitted = iprot.readI64(); + struct.setHeapCommittedIsSet(true); + } + if (incoming.get(9)) { + struct.nonHeapUsed = iprot.readI64(); + struct.setNonHeapUsedIsSet(true); + } + if (incoming.get(10)) { + struct.nonHeapCommitted = iprot.readI64(); + struct.setNonHeapCommittedIsSet(true); + } + if (incoming.get(11)) { + struct.processCPUTime = iprot.readDouble(); + struct.setProcessCPUTimeIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/RequestDataListThriftDTO.java b/src/main/java/com/profiler/common/dto/thrift/RequestDataListThriftDTO.java index a72f76a05..23756a53b 100644 --- a/src/main/java/com/profiler/common/dto/thrift/RequestDataListThriftDTO.java +++ b/src/main/java/com/profiler/common/dto/thrift/RequestDataListThriftDTO.java @@ -1,630 +1,633 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class RequestDataListThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestDataListThriftDTO"); - - 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 REQUEST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHashCode", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField REQUEST_DATA_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("requestDataList", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new RequestDataListThriftDTOStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RequestDataListThriftDTOTupleSchemeFactory()); - } - - private String agentId; // required - private int requestHashCode; // required - private List requestDataList; // 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 { - AGENT_ID((short)1, "agentId"), - REQUEST_HASH_CODE((short)2, "requestHashCode"), - REQUEST_DATA_LIST((short)3, "requestDataList"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // REQUEST_HASH_CODE - return REQUEST_HASH_CODE; - case 3: // REQUEST_DATA_LIST - return REQUEST_DATA_LIST; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __REQUESTHASHCODE_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.REQUEST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("requestHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.REQUEST_DATA_LIST, new org.apache.thrift.meta_data.FieldMetaData("requestDataList", 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, RequestDataThriftDTO.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestDataListThriftDTO.class, metaDataMap); - } - - public RequestDataListThriftDTO() { - } - - public RequestDataListThriftDTO( - String agentId, - int requestHashCode, - List requestDataList) - { - this(); - this.agentId = agentId; - this.requestHashCode = requestHashCode; - setRequestHashCodeIsSet(true); - this.requestDataList = requestDataList; - } - - /** - * Performs a deep copy on other. - */ - public RequestDataListThriftDTO(RequestDataListThriftDTO other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - this.requestHashCode = other.requestHashCode; - if (other.isSetRequestDataList()) { - List __this__requestDataList = new ArrayList(); - for (RequestDataThriftDTO other_element : other.requestDataList) { - __this__requestDataList.add(new RequestDataThriftDTO(other_element)); - } - this.requestDataList = __this__requestDataList; - } - } - - public RequestDataListThriftDTO deepCopy() { - return new RequestDataListThriftDTO(this); - } - - @Override - public void clear() { - this.agentId = null; - setRequestHashCodeIsSet(false); - this.requestHashCode = 0; - this.requestDataList = null; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 int getRequestHashCode() { - return this.requestHashCode; - } - - public void setRequestHashCode(int requestHashCode) { - this.requestHashCode = requestHashCode; - setRequestHashCodeIsSet(true); - } - - public void unsetRequestHashCode() { - __isset_bit_vector.clear(__REQUESTHASHCODE_ISSET_ID); - } - - /** Returns true if field requestHashCode is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestHashCode() { - return __isset_bit_vector.get(__REQUESTHASHCODE_ISSET_ID); - } - - public void setRequestHashCodeIsSet(boolean value) { - __isset_bit_vector.set(__REQUESTHASHCODE_ISSET_ID, value); - } - - public int getRequestDataListSize() { - return (this.requestDataList == null) ? 0 : this.requestDataList.size(); - } - - public java.util.Iterator getRequestDataListIterator() { - return (this.requestDataList == null) ? null : this.requestDataList.iterator(); - } - - public void addToRequestDataList(RequestDataThriftDTO elem) { - if (this.requestDataList == null) { - this.requestDataList = new ArrayList(); - } - this.requestDataList.add(elem); - } - - public List getRequestDataList() { - return this.requestDataList; - } - - public void setRequestDataList(List requestDataList) { - this.requestDataList = requestDataList; - } - - public void unsetRequestDataList() { - this.requestDataList = null; - } - - /** Returns true if field requestDataList is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestDataList() { - return this.requestDataList != null; - } - - public void setRequestDataListIsSet(boolean value) { - if (!value) { - this.requestDataList = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case REQUEST_HASH_CODE: - if (value == null) { - unsetRequestHashCode(); - } else { - setRequestHashCode((Integer)value); - } - break; - - case REQUEST_DATA_LIST: - if (value == null) { - unsetRequestDataList(); - } else { - setRequestDataList((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case REQUEST_HASH_CODE: - return Integer.valueOf(getRequestHashCode()); - - case REQUEST_DATA_LIST: - return getRequestDataList(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case REQUEST_HASH_CODE: - return isSetRequestHashCode(); - case REQUEST_DATA_LIST: - return isSetRequestDataList(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof RequestDataListThriftDTO) - return this.equals((RequestDataListThriftDTO)that); - return false; - } - - public boolean equals(RequestDataListThriftDTO that) { - if (that == null) - return false; - - 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_requestHashCode = true; - boolean that_present_requestHashCode = true; - if (this_present_requestHashCode || that_present_requestHashCode) { - if (!(this_present_requestHashCode && that_present_requestHashCode)) - return false; - if (this.requestHashCode != that.requestHashCode) - return false; - } - - boolean this_present_requestDataList = true && this.isSetRequestDataList(); - boolean that_present_requestDataList = true && that.isSetRequestDataList(); - if (this_present_requestDataList || that_present_requestDataList) { - if (!(this_present_requestDataList && that_present_requestDataList)) - return false; - if (!this.requestDataList.equals(that.requestDataList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(RequestDataListThriftDTO other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - RequestDataListThriftDTO typedOther = (RequestDataListThriftDTO)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRequestHashCode()).compareTo(typedOther.isSetRequestHashCode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestHashCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestHashCode, typedOther.requestHashCode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRequestDataList()).compareTo(typedOther.isSetRequestDataList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestDataList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestDataList, typedOther.requestDataList); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("RequestDataListThriftDTO("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("requestHashCode:"); - sb.append(this.requestHashCode); - first = false; - if (!first) sb.append(", "); - sb.append("requestDataList:"); - if (this.requestDataList == null) { - sb.append("null"); - } else { - sb.append(this.requestDataList); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 RequestDataListThriftDTOStandardSchemeFactory implements SchemeFactory { - public RequestDataListThriftDTOStandardScheme getScheme() { - return new RequestDataListThriftDTOStandardScheme(); - } - } - - private static class RequestDataListThriftDTOStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, RequestDataListThriftDTO 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: // REQUEST_HASH_CODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.requestHashCode = iprot.readI32(); - struct.setRequestHashCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // REQUEST_DATA_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.requestDataList = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - RequestDataThriftDTO _elem2; // required - _elem2 = new RequestDataThriftDTO(); - _elem2.read(iprot); - struct.requestDataList.add(_elem2); - } - iprot.readListEnd(); - } - struct.setRequestDataListIsSet(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, RequestDataListThriftDTO struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(REQUEST_HASH_CODE_FIELD_DESC); - oprot.writeI32(struct.requestHashCode); - oprot.writeFieldEnd(); - if (struct.requestDataList != null) { - oprot.writeFieldBegin(REQUEST_DATA_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.requestDataList.size())); - for (RequestDataThriftDTO _iter3 : struct.requestDataList) - { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class RequestDataListThriftDTOTupleSchemeFactory implements SchemeFactory { - public RequestDataListThriftDTOTupleScheme getScheme() { - return new RequestDataListThriftDTOTupleScheme(); - } - } - - private static class RequestDataListThriftDTOTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RequestDataListThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetRequestHashCode()) { - optionals.set(1); - } - if (struct.isSetRequestDataList()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetRequestHashCode()) { - oprot.writeI32(struct.requestHashCode); - } - if (struct.isSetRequestDataList()) { - { - oprot.writeI32(struct.requestDataList.size()); - for (RequestDataThriftDTO _iter4 : struct.requestDataList) - { - _iter4.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, RequestDataListThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.requestHashCode = iprot.readI32(); - struct.setRequestHashCodeIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.requestDataList = new ArrayList(_list5.size); - for (int _i6 = 0; _i6 < _list5.size; ++_i6) - { - RequestDataThriftDTO _elem7; // required - _elem7 = new RequestDataThriftDTO(); - _elem7.read(iprot); - struct.requestDataList.add(_elem7); - } - } - struct.setRequestDataListIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RequestDataListThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestDataListThriftDTO"); + + 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 REQUEST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHashCode", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField REQUEST_DATA_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("requestDataList", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RequestDataListThriftDTOStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RequestDataListThriftDTOTupleSchemeFactory()); + } + + private String agentId; // required + private int requestHashCode; // required + private List requestDataList; // 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 { + AGENT_ID((short)1, "agentId"), + REQUEST_HASH_CODE((short)2, "requestHashCode"), + REQUEST_DATA_LIST((short)3, "requestDataList"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // REQUEST_HASH_CODE + return REQUEST_HASH_CODE; + case 3: // REQUEST_DATA_LIST + return REQUEST_DATA_LIST; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __REQUESTHASHCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REQUEST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("requestHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.REQUEST_DATA_LIST, new org.apache.thrift.meta_data.FieldMetaData("requestDataList", 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, RequestDataThriftDTO.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestDataListThriftDTO.class, metaDataMap); + } + + public RequestDataListThriftDTO() { + } + + public RequestDataListThriftDTO( + String agentId, + int requestHashCode, + List requestDataList) + { + this(); + this.agentId = agentId; + this.requestHashCode = requestHashCode; + setRequestHashCodeIsSet(true); + this.requestDataList = requestDataList; + } + + /** + * Performs a deep copy on other. + */ + public RequestDataListThriftDTO(RequestDataListThriftDTO other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + this.requestHashCode = other.requestHashCode; + if (other.isSetRequestDataList()) { + List __this__requestDataList = new ArrayList(); + for (RequestDataThriftDTO other_element : other.requestDataList) { + __this__requestDataList.add(new RequestDataThriftDTO(other_element)); + } + this.requestDataList = __this__requestDataList; + } + } + + public RequestDataListThriftDTO deepCopy() { + return new RequestDataListThriftDTO(this); + } + + @Override + public void clear() { + this.agentId = null; + setRequestHashCodeIsSet(false); + this.requestHashCode = 0; + this.requestDataList = null; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 int getRequestHashCode() { + return this.requestHashCode; + } + + public void setRequestHashCode(int requestHashCode) { + this.requestHashCode = requestHashCode; + setRequestHashCodeIsSet(true); + } + + public void unsetRequestHashCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTHASHCODE_ISSET_ID); + } + + /** Returns true if field requestHashCode is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestHashCode() { + return EncodingUtils.testBit(__isset_bitfield, __REQUESTHASHCODE_ISSET_ID); + } + + public void setRequestHashCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTHASHCODE_ISSET_ID, value); + } + + public int getRequestDataListSize() { + return (this.requestDataList == null) ? 0 : this.requestDataList.size(); + } + + public java.util.Iterator getRequestDataListIterator() { + return (this.requestDataList == null) ? null : this.requestDataList.iterator(); + } + + public void addToRequestDataList(RequestDataThriftDTO elem) { + if (this.requestDataList == null) { + this.requestDataList = new ArrayList(); + } + this.requestDataList.add(elem); + } + + public List getRequestDataList() { + return this.requestDataList; + } + + public void setRequestDataList(List requestDataList) { + this.requestDataList = requestDataList; + } + + public void unsetRequestDataList() { + this.requestDataList = null; + } + + /** Returns true if field requestDataList is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestDataList() { + return this.requestDataList != null; + } + + public void setRequestDataListIsSet(boolean value) { + if (!value) { + this.requestDataList = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case REQUEST_HASH_CODE: + if (value == null) { + unsetRequestHashCode(); + } else { + setRequestHashCode((Integer)value); + } + break; + + case REQUEST_DATA_LIST: + if (value == null) { + unsetRequestDataList(); + } else { + setRequestDataList((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case REQUEST_HASH_CODE: + return Integer.valueOf(getRequestHashCode()); + + case REQUEST_DATA_LIST: + return getRequestDataList(); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case REQUEST_HASH_CODE: + return isSetRequestHashCode(); + case REQUEST_DATA_LIST: + return isSetRequestDataList(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof RequestDataListThriftDTO) + return this.equals((RequestDataListThriftDTO)that); + return false; + } + + public boolean equals(RequestDataListThriftDTO that) { + if (that == null) + return false; + + 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_requestHashCode = true; + boolean that_present_requestHashCode = true; + if (this_present_requestHashCode || that_present_requestHashCode) { + if (!(this_present_requestHashCode && that_present_requestHashCode)) + return false; + if (this.requestHashCode != that.requestHashCode) + return false; + } + + boolean this_present_requestDataList = true && this.isSetRequestDataList(); + boolean that_present_requestDataList = true && that.isSetRequestDataList(); + if (this_present_requestDataList || that_present_requestDataList) { + if (!(this_present_requestDataList && that_present_requestDataList)) + return false; + if (!this.requestDataList.equals(that.requestDataList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(RequestDataListThriftDTO other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + RequestDataListThriftDTO typedOther = (RequestDataListThriftDTO)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRequestHashCode()).compareTo(typedOther.isSetRequestHashCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestHashCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestHashCode, typedOther.requestHashCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRequestDataList()).compareTo(typedOther.isSetRequestDataList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestDataList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestDataList, typedOther.requestDataList); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("RequestDataListThriftDTO("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("requestHashCode:"); + sb.append(this.requestHashCode); + first = false; + if (!first) sb.append(", "); + sb.append("requestDataList:"); + if (this.requestDataList == null) { + sb.append("null"); + } else { + sb.append(this.requestDataList); + } + 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, 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 RequestDataListThriftDTOStandardSchemeFactory implements SchemeFactory { + public RequestDataListThriftDTOStandardScheme getScheme() { + return new RequestDataListThriftDTOStandardScheme(); + } + } + + private static class RequestDataListThriftDTOStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, RequestDataListThriftDTO 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: // REQUEST_HASH_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.requestHashCode = iprot.readI32(); + struct.setRequestHashCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // REQUEST_DATA_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.requestDataList = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + RequestDataThriftDTO _elem2; // required + _elem2 = new RequestDataThriftDTO(); + _elem2.read(iprot); + struct.requestDataList.add(_elem2); + } + iprot.readListEnd(); + } + struct.setRequestDataListIsSet(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, RequestDataListThriftDTO struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(REQUEST_HASH_CODE_FIELD_DESC); + oprot.writeI32(struct.requestHashCode); + oprot.writeFieldEnd(); + if (struct.requestDataList != null) { + oprot.writeFieldBegin(REQUEST_DATA_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.requestDataList.size())); + for (RequestDataThriftDTO _iter3 : struct.requestDataList) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RequestDataListThriftDTOTupleSchemeFactory implements SchemeFactory { + public RequestDataListThriftDTOTupleScheme getScheme() { + return new RequestDataListThriftDTOTupleScheme(); + } + } + + private static class RequestDataListThriftDTOTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, RequestDataListThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetRequestHashCode()) { + optionals.set(1); + } + if (struct.isSetRequestDataList()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetRequestHashCode()) { + oprot.writeI32(struct.requestHashCode); + } + if (struct.isSetRequestDataList()) { + { + oprot.writeI32(struct.requestDataList.size()); + for (RequestDataThriftDTO _iter4 : struct.requestDataList) + { + _iter4.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, RequestDataListThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.requestHashCode = iprot.readI32(); + struct.setRequestHashCodeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.requestDataList = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + RequestDataThriftDTO _elem7; // required + _elem7 = new RequestDataThriftDTO(); + _elem7.read(iprot); + struct.requestDataList.add(_elem7); + } + } + struct.setRequestDataListIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/RequestDataThriftDTO.java b/src/main/java/com/profiler/common/dto/thrift/RequestDataThriftDTO.java index e5d8344da..9122dfe9b 100644 --- a/src/main/java/com/profiler/common/dto/thrift/RequestDataThriftDTO.java +++ b/src/main/java/com/profiler/common/dto/thrift/RequestDataThriftDTO.java @@ -1,1534 +1,1537 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class RequestDataThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestDataThriftDTO"); - - private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField DATA_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataHashCode", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField DATA_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("dataString", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField EXTRA_DATA1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData1", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField EXTRA_DATA2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData2", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField EXTRA_DATA3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData3", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField EXTRA_INT1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt1", org.apache.thrift.protocol.TType.I32, (short)8); - private static final org.apache.thrift.protocol.TField EXTRA_INT2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt2", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField EXTRA_INT3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt3", org.apache.thrift.protocol.TType.I32, (short)10); - private static final org.apache.thrift.protocol.TField EXTRA_LONG1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong1", org.apache.thrift.protocol.TType.I64, (short)11); - private static final org.apache.thrift.protocol.TField EXTRA_LONG2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong2", org.apache.thrift.protocol.TType.I64, (short)12); - private static final org.apache.thrift.protocol.TField EXTRA_LONG3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong3", org.apache.thrift.protocol.TType.I64, (short)13); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new RequestDataThriftDTOStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RequestDataThriftDTOTupleSchemeFactory()); - } - - private int dataType; // required - private long dataTime; // required - private int dataHashCode; // optional - private String dataString; // optional - private String extraData1; // optional - private String extraData2; // optional - private String extraData3; // optional - private int extraInt1; // optional - private int extraInt2; // optional - private int extraInt3; // optional - private long extraLong1; // optional - private long extraLong2; // optional - private long extraLong3; // 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 { - DATA_TYPE((short)1, "dataType"), - DATA_TIME((short)2, "dataTime"), - DATA_HASH_CODE((short)3, "dataHashCode"), - DATA_STRING((short)4, "dataString"), - EXTRA_DATA1((short)5, "extraData1"), - EXTRA_DATA2((short)6, "extraData2"), - EXTRA_DATA3((short)7, "extraData3"), - EXTRA_INT1((short)8, "extraInt1"), - EXTRA_INT2((short)9, "extraInt2"), - EXTRA_INT3((short)10, "extraInt3"), - EXTRA_LONG1((short)11, "extraLong1"), - EXTRA_LONG2((short)12, "extraLong2"), - EXTRA_LONG3((short)13, "extraLong3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // DATA_TYPE - return DATA_TYPE; - case 2: // DATA_TIME - return DATA_TIME; - case 3: // DATA_HASH_CODE - return DATA_HASH_CODE; - case 4: // DATA_STRING - return DATA_STRING; - case 5: // EXTRA_DATA1 - return EXTRA_DATA1; - case 6: // EXTRA_DATA2 - return EXTRA_DATA2; - case 7: // EXTRA_DATA3 - return EXTRA_DATA3; - case 8: // EXTRA_INT1 - return EXTRA_INT1; - case 9: // EXTRA_INT2 - return EXTRA_INT2; - case 10: // EXTRA_INT3 - return EXTRA_INT3; - case 11: // EXTRA_LONG1 - return EXTRA_LONG1; - case 12: // EXTRA_LONG2 - return EXTRA_LONG2; - case 13: // EXTRA_LONG3 - return EXTRA_LONG3; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DATATYPE_ISSET_ID = 0; - private static final int __DATATIME_ISSET_ID = 1; - private static final int __DATAHASHCODE_ISSET_ID = 2; - private static final int __EXTRAINT1_ISSET_ID = 3; - private static final int __EXTRAINT2_ISSET_ID = 4; - private static final int __EXTRAINT3_ISSET_ID = 5; - private static final int __EXTRALONG1_ISSET_ID = 6; - private static final int __EXTRALONG2_ISSET_ID = 7; - private static final int __EXTRALONG3_ISSET_ID = 8; - private BitSet __isset_bit_vector = new BitSet(9); - private _Fields optionals[] = {_Fields.DATA_HASH_CODE,_Fields.DATA_STRING,_Fields.EXTRA_DATA1,_Fields.EXTRA_DATA2,_Fields.EXTRA_DATA3,_Fields.EXTRA_INT1,_Fields.EXTRA_INT2,_Fields.EXTRA_INT3,_Fields.EXTRA_LONG1,_Fields.EXTRA_LONG2,_Fields.EXTRA_LONG3}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DATA_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("dataHashCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DATA_STRING, new org.apache.thrift.meta_data.FieldMetaData("dataString", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_DATA1, new org.apache.thrift.meta_data.FieldMetaData("extraData1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_DATA2, new org.apache.thrift.meta_data.FieldMetaData("extraData2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_DATA3, new org.apache.thrift.meta_data.FieldMetaData("extraData3", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_INT1, new org.apache.thrift.meta_data.FieldMetaData("extraInt1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EXTRA_INT2, new org.apache.thrift.meta_data.FieldMetaData("extraInt2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EXTRA_INT3, new org.apache.thrift.meta_data.FieldMetaData("extraInt3", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EXTRA_LONG1, new org.apache.thrift.meta_data.FieldMetaData("extraLong1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.EXTRA_LONG2, new org.apache.thrift.meta_data.FieldMetaData("extraLong2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.EXTRA_LONG3, new org.apache.thrift.meta_data.FieldMetaData("extraLong3", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestDataThriftDTO.class, metaDataMap); - } - - public RequestDataThriftDTO() { - } - - public RequestDataThriftDTO( - int dataType, - long dataTime) - { - this(); - this.dataType = dataType; - setDataTypeIsSet(true); - this.dataTime = dataTime; - setDataTimeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public RequestDataThriftDTO(RequestDataThriftDTO other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.dataType = other.dataType; - this.dataTime = other.dataTime; - this.dataHashCode = other.dataHashCode; - if (other.isSetDataString()) { - this.dataString = other.dataString; - } - if (other.isSetExtraData1()) { - this.extraData1 = other.extraData1; - } - if (other.isSetExtraData2()) { - this.extraData2 = other.extraData2; - } - if (other.isSetExtraData3()) { - this.extraData3 = other.extraData3; - } - this.extraInt1 = other.extraInt1; - this.extraInt2 = other.extraInt2; - this.extraInt3 = other.extraInt3; - this.extraLong1 = other.extraLong1; - this.extraLong2 = other.extraLong2; - this.extraLong3 = other.extraLong3; - } - - public RequestDataThriftDTO deepCopy() { - return new RequestDataThriftDTO(this); - } - - @Override - public void clear() { - setDataTypeIsSet(false); - this.dataType = 0; - setDataTimeIsSet(false); - this.dataTime = 0; - setDataHashCodeIsSet(false); - this.dataHashCode = 0; - this.dataString = null; - this.extraData1 = null; - this.extraData2 = null; - this.extraData3 = null; - setExtraInt1IsSet(false); - this.extraInt1 = 0; - setExtraInt2IsSet(false); - this.extraInt2 = 0; - setExtraInt3IsSet(false); - this.extraInt3 = 0; - setExtraLong1IsSet(false); - this.extraLong1 = 0; - setExtraLong2IsSet(false); - this.extraLong2 = 0; - setExtraLong3IsSet(false); - this.extraLong3 = 0; - } - - public int getDataType() { - return this.dataType; - } - - public void setDataType(int dataType) { - this.dataType = dataType; - setDataTypeIsSet(true); - } - - public void unsetDataType() { - __isset_bit_vector.clear(__DATATYPE_ISSET_ID); - } - - /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataType() { - return __isset_bit_vector.get(__DATATYPE_ISSET_ID); - } - - public void setDataTypeIsSet(boolean value) { - __isset_bit_vector.set(__DATATYPE_ISSET_ID, value); - } - - public long getDataTime() { - return this.dataTime; - } - - public void setDataTime(long dataTime) { - this.dataTime = dataTime; - setDataTimeIsSet(true); - } - - public void unsetDataTime() { - __isset_bit_vector.clear(__DATATIME_ISSET_ID); - } - - /** Returns true if field dataTime is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTime() { - return __isset_bit_vector.get(__DATATIME_ISSET_ID); - } - - public void setDataTimeIsSet(boolean value) { - __isset_bit_vector.set(__DATATIME_ISSET_ID, value); - } - - public int getDataHashCode() { - return this.dataHashCode; - } - - public void setDataHashCode(int dataHashCode) { - this.dataHashCode = dataHashCode; - setDataHashCodeIsSet(true); - } - - public void unsetDataHashCode() { - __isset_bit_vector.clear(__DATAHASHCODE_ISSET_ID); - } - - /** Returns true if field dataHashCode is set (has been assigned a value) and false otherwise */ - public boolean isSetDataHashCode() { - return __isset_bit_vector.get(__DATAHASHCODE_ISSET_ID); - } - - public void setDataHashCodeIsSet(boolean value) { - __isset_bit_vector.set(__DATAHASHCODE_ISSET_ID, value); - } - - public String getDataString() { - return this.dataString; - } - - public void setDataString(String dataString) { - this.dataString = dataString; - } - - public void unsetDataString() { - this.dataString = null; - } - - /** Returns true if field dataString is set (has been assigned a value) and false otherwise */ - public boolean isSetDataString() { - return this.dataString != null; - } - - public void setDataStringIsSet(boolean value) { - if (!value) { - this.dataString = null; - } - } - - public String getExtraData1() { - return this.extraData1; - } - - public void setExtraData1(String extraData1) { - this.extraData1 = extraData1; - } - - public void unsetExtraData1() { - this.extraData1 = null; - } - - /** Returns true if field extraData1 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraData1() { - return this.extraData1 != null; - } - - public void setExtraData1IsSet(boolean value) { - if (!value) { - this.extraData1 = null; - } - } - - public String getExtraData2() { - return this.extraData2; - } - - public void setExtraData2(String extraData2) { - this.extraData2 = extraData2; - } - - public void unsetExtraData2() { - this.extraData2 = null; - } - - /** Returns true if field extraData2 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraData2() { - return this.extraData2 != null; - } - - public void setExtraData2IsSet(boolean value) { - if (!value) { - this.extraData2 = null; - } - } - - public String getExtraData3() { - return this.extraData3; - } - - public void setExtraData3(String extraData3) { - this.extraData3 = extraData3; - } - - public void unsetExtraData3() { - this.extraData3 = null; - } - - /** Returns true if field extraData3 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraData3() { - return this.extraData3 != null; - } - - public void setExtraData3IsSet(boolean value) { - if (!value) { - this.extraData3 = null; - } - } - - public int getExtraInt1() { - return this.extraInt1; - } - - public void setExtraInt1(int extraInt1) { - this.extraInt1 = extraInt1; - setExtraInt1IsSet(true); - } - - public void unsetExtraInt1() { - __isset_bit_vector.clear(__EXTRAINT1_ISSET_ID); - } - - /** Returns true if field extraInt1 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraInt1() { - return __isset_bit_vector.get(__EXTRAINT1_ISSET_ID); - } - - public void setExtraInt1IsSet(boolean value) { - __isset_bit_vector.set(__EXTRAINT1_ISSET_ID, value); - } - - public int getExtraInt2() { - return this.extraInt2; - } - - public void setExtraInt2(int extraInt2) { - this.extraInt2 = extraInt2; - setExtraInt2IsSet(true); - } - - public void unsetExtraInt2() { - __isset_bit_vector.clear(__EXTRAINT2_ISSET_ID); - } - - /** Returns true if field extraInt2 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraInt2() { - return __isset_bit_vector.get(__EXTRAINT2_ISSET_ID); - } - - public void setExtraInt2IsSet(boolean value) { - __isset_bit_vector.set(__EXTRAINT2_ISSET_ID, value); - } - - public int getExtraInt3() { - return this.extraInt3; - } - - public void setExtraInt3(int extraInt3) { - this.extraInt3 = extraInt3; - setExtraInt3IsSet(true); - } - - public void unsetExtraInt3() { - __isset_bit_vector.clear(__EXTRAINT3_ISSET_ID); - } - - /** Returns true if field extraInt3 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraInt3() { - return __isset_bit_vector.get(__EXTRAINT3_ISSET_ID); - } - - public void setExtraInt3IsSet(boolean value) { - __isset_bit_vector.set(__EXTRAINT3_ISSET_ID, value); - } - - public long getExtraLong1() { - return this.extraLong1; - } - - public void setExtraLong1(long extraLong1) { - this.extraLong1 = extraLong1; - setExtraLong1IsSet(true); - } - - public void unsetExtraLong1() { - __isset_bit_vector.clear(__EXTRALONG1_ISSET_ID); - } - - /** Returns true if field extraLong1 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraLong1() { - return __isset_bit_vector.get(__EXTRALONG1_ISSET_ID); - } - - public void setExtraLong1IsSet(boolean value) { - __isset_bit_vector.set(__EXTRALONG1_ISSET_ID, value); - } - - public long getExtraLong2() { - return this.extraLong2; - } - - public void setExtraLong2(long extraLong2) { - this.extraLong2 = extraLong2; - setExtraLong2IsSet(true); - } - - public void unsetExtraLong2() { - __isset_bit_vector.clear(__EXTRALONG2_ISSET_ID); - } - - /** Returns true if field extraLong2 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraLong2() { - return __isset_bit_vector.get(__EXTRALONG2_ISSET_ID); - } - - public void setExtraLong2IsSet(boolean value) { - __isset_bit_vector.set(__EXTRALONG2_ISSET_ID, value); - } - - public long getExtraLong3() { - return this.extraLong3; - } - - public void setExtraLong3(long extraLong3) { - this.extraLong3 = extraLong3; - setExtraLong3IsSet(true); - } - - public void unsetExtraLong3() { - __isset_bit_vector.clear(__EXTRALONG3_ISSET_ID); - } - - /** Returns true if field extraLong3 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraLong3() { - return __isset_bit_vector.get(__EXTRALONG3_ISSET_ID); - } - - public void setExtraLong3IsSet(boolean value) { - __isset_bit_vector.set(__EXTRALONG3_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DATA_TYPE: - if (value == null) { - unsetDataType(); - } else { - setDataType((Integer)value); - } - break; - - case DATA_TIME: - if (value == null) { - unsetDataTime(); - } else { - setDataTime((Long)value); - } - break; - - case DATA_HASH_CODE: - if (value == null) { - unsetDataHashCode(); - } else { - setDataHashCode((Integer)value); - } - break; - - case DATA_STRING: - if (value == null) { - unsetDataString(); - } else { - setDataString((String)value); - } - break; - - case EXTRA_DATA1: - if (value == null) { - unsetExtraData1(); - } else { - setExtraData1((String)value); - } - break; - - case EXTRA_DATA2: - if (value == null) { - unsetExtraData2(); - } else { - setExtraData2((String)value); - } - break; - - case EXTRA_DATA3: - if (value == null) { - unsetExtraData3(); - } else { - setExtraData3((String)value); - } - break; - - case EXTRA_INT1: - if (value == null) { - unsetExtraInt1(); - } else { - setExtraInt1((Integer)value); - } - break; - - case EXTRA_INT2: - if (value == null) { - unsetExtraInt2(); - } else { - setExtraInt2((Integer)value); - } - break; - - case EXTRA_INT3: - if (value == null) { - unsetExtraInt3(); - } else { - setExtraInt3((Integer)value); - } - break; - - case EXTRA_LONG1: - if (value == null) { - unsetExtraLong1(); - } else { - setExtraLong1((Long)value); - } - break; - - case EXTRA_LONG2: - if (value == null) { - unsetExtraLong2(); - } else { - setExtraLong2((Long)value); - } - break; - - case EXTRA_LONG3: - if (value == null) { - unsetExtraLong3(); - } else { - setExtraLong3((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DATA_TYPE: - return Integer.valueOf(getDataType()); - - case DATA_TIME: - return Long.valueOf(getDataTime()); - - case DATA_HASH_CODE: - return Integer.valueOf(getDataHashCode()); - - case DATA_STRING: - return getDataString(); - - case EXTRA_DATA1: - return getExtraData1(); - - case EXTRA_DATA2: - return getExtraData2(); - - case EXTRA_DATA3: - return getExtraData3(); - - case EXTRA_INT1: - return Integer.valueOf(getExtraInt1()); - - case EXTRA_INT2: - return Integer.valueOf(getExtraInt2()); - - case EXTRA_INT3: - return Integer.valueOf(getExtraInt3()); - - case EXTRA_LONG1: - return Long.valueOf(getExtraLong1()); - - case EXTRA_LONG2: - return Long.valueOf(getExtraLong2()); - - case EXTRA_LONG3: - return Long.valueOf(getExtraLong3()); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case DATA_TYPE: - return isSetDataType(); - case DATA_TIME: - return isSetDataTime(); - case DATA_HASH_CODE: - return isSetDataHashCode(); - case DATA_STRING: - return isSetDataString(); - case EXTRA_DATA1: - return isSetExtraData1(); - case EXTRA_DATA2: - return isSetExtraData2(); - case EXTRA_DATA3: - return isSetExtraData3(); - case EXTRA_INT1: - return isSetExtraInt1(); - case EXTRA_INT2: - return isSetExtraInt2(); - case EXTRA_INT3: - return isSetExtraInt3(); - case EXTRA_LONG1: - return isSetExtraLong1(); - case EXTRA_LONG2: - return isSetExtraLong2(); - case EXTRA_LONG3: - return isSetExtraLong3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof RequestDataThriftDTO) - return this.equals((RequestDataThriftDTO)that); - return false; - } - - public boolean equals(RequestDataThriftDTO that) { - if (that == null) - return false; - - boolean this_present_dataType = true; - boolean that_present_dataType = true; - if (this_present_dataType || that_present_dataType) { - if (!(this_present_dataType && that_present_dataType)) - return false; - if (this.dataType != that.dataType) - return false; - } - - boolean this_present_dataTime = true; - boolean that_present_dataTime = true; - if (this_present_dataTime || that_present_dataTime) { - if (!(this_present_dataTime && that_present_dataTime)) - return false; - if (this.dataTime != that.dataTime) - return false; - } - - boolean this_present_dataHashCode = true && this.isSetDataHashCode(); - boolean that_present_dataHashCode = true && that.isSetDataHashCode(); - if (this_present_dataHashCode || that_present_dataHashCode) { - if (!(this_present_dataHashCode && that_present_dataHashCode)) - return false; - if (this.dataHashCode != that.dataHashCode) - return false; - } - - boolean this_present_dataString = true && this.isSetDataString(); - boolean that_present_dataString = true && that.isSetDataString(); - if (this_present_dataString || that_present_dataString) { - if (!(this_present_dataString && that_present_dataString)) - return false; - if (!this.dataString.equals(that.dataString)) - return false; - } - - boolean this_present_extraData1 = true && this.isSetExtraData1(); - boolean that_present_extraData1 = true && that.isSetExtraData1(); - if (this_present_extraData1 || that_present_extraData1) { - if (!(this_present_extraData1 && that_present_extraData1)) - return false; - if (!this.extraData1.equals(that.extraData1)) - return false; - } - - boolean this_present_extraData2 = true && this.isSetExtraData2(); - boolean that_present_extraData2 = true && that.isSetExtraData2(); - if (this_present_extraData2 || that_present_extraData2) { - if (!(this_present_extraData2 && that_present_extraData2)) - return false; - if (!this.extraData2.equals(that.extraData2)) - return false; - } - - boolean this_present_extraData3 = true && this.isSetExtraData3(); - boolean that_present_extraData3 = true && that.isSetExtraData3(); - if (this_present_extraData3 || that_present_extraData3) { - if (!(this_present_extraData3 && that_present_extraData3)) - return false; - if (!this.extraData3.equals(that.extraData3)) - return false; - } - - boolean this_present_extraInt1 = true && this.isSetExtraInt1(); - boolean that_present_extraInt1 = true && that.isSetExtraInt1(); - if (this_present_extraInt1 || that_present_extraInt1) { - if (!(this_present_extraInt1 && that_present_extraInt1)) - return false; - if (this.extraInt1 != that.extraInt1) - return false; - } - - boolean this_present_extraInt2 = true && this.isSetExtraInt2(); - boolean that_present_extraInt2 = true && that.isSetExtraInt2(); - if (this_present_extraInt2 || that_present_extraInt2) { - if (!(this_present_extraInt2 && that_present_extraInt2)) - return false; - if (this.extraInt2 != that.extraInt2) - return false; - } - - boolean this_present_extraInt3 = true && this.isSetExtraInt3(); - boolean that_present_extraInt3 = true && that.isSetExtraInt3(); - if (this_present_extraInt3 || that_present_extraInt3) { - if (!(this_present_extraInt3 && that_present_extraInt3)) - return false; - if (this.extraInt3 != that.extraInt3) - return false; - } - - boolean this_present_extraLong1 = true && this.isSetExtraLong1(); - boolean that_present_extraLong1 = true && that.isSetExtraLong1(); - if (this_present_extraLong1 || that_present_extraLong1) { - if (!(this_present_extraLong1 && that_present_extraLong1)) - return false; - if (this.extraLong1 != that.extraLong1) - return false; - } - - boolean this_present_extraLong2 = true && this.isSetExtraLong2(); - boolean that_present_extraLong2 = true && that.isSetExtraLong2(); - if (this_present_extraLong2 || that_present_extraLong2) { - if (!(this_present_extraLong2 && that_present_extraLong2)) - return false; - if (this.extraLong2 != that.extraLong2) - return false; - } - - boolean this_present_extraLong3 = true && this.isSetExtraLong3(); - boolean that_present_extraLong3 = true && that.isSetExtraLong3(); - if (this_present_extraLong3 || that_present_extraLong3) { - if (!(this_present_extraLong3 && that_present_extraLong3)) - return false; - if (this.extraLong3 != that.extraLong3) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(RequestDataThriftDTO other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - RequestDataThriftDTO typedOther = (RequestDataThriftDTO)other; - - lastComparison = Boolean.valueOf(isSetDataType()).compareTo(typedOther.isSetDataType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, typedOther.dataType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataTime()).compareTo(typedOther.isSetDataTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTime, typedOther.dataTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataHashCode()).compareTo(typedOther.isSetDataHashCode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataHashCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataHashCode, typedOther.dataHashCode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataString()).compareTo(typedOther.isSetDataString()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataString()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataString, typedOther.dataString); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraData1()).compareTo(typedOther.isSetExtraData1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraData1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData1, typedOther.extraData1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraData2()).compareTo(typedOther.isSetExtraData2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraData2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData2, typedOther.extraData2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraData3()).compareTo(typedOther.isSetExtraData3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraData3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData3, typedOther.extraData3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraInt1()).compareTo(typedOther.isSetExtraInt1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraInt1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt1, typedOther.extraInt1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraInt2()).compareTo(typedOther.isSetExtraInt2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraInt2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt2, typedOther.extraInt2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraInt3()).compareTo(typedOther.isSetExtraInt3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraInt3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt3, typedOther.extraInt3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraLong1()).compareTo(typedOther.isSetExtraLong1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraLong1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong1, typedOther.extraLong1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraLong2()).compareTo(typedOther.isSetExtraLong2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraLong2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong2, typedOther.extraLong2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraLong3()).compareTo(typedOther.isSetExtraLong3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraLong3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong3, typedOther.extraLong3); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("RequestDataThriftDTO("); - boolean first = true; - - sb.append("dataType:"); - sb.append(this.dataType); - first = false; - if (!first) sb.append(", "); - sb.append("dataTime:"); - sb.append(this.dataTime); - first = false; - if (isSetDataHashCode()) { - if (!first) sb.append(", "); - sb.append("dataHashCode:"); - sb.append(this.dataHashCode); - first = false; - } - if (isSetDataString()) { - if (!first) sb.append(", "); - sb.append("dataString:"); - if (this.dataString == null) { - sb.append("null"); - } else { - sb.append(this.dataString); - } - first = false; - } - if (isSetExtraData1()) { - if (!first) sb.append(", "); - sb.append("extraData1:"); - if (this.extraData1 == null) { - sb.append("null"); - } else { - sb.append(this.extraData1); - } - first = false; - } - if (isSetExtraData2()) { - if (!first) sb.append(", "); - sb.append("extraData2:"); - if (this.extraData2 == null) { - sb.append("null"); - } else { - sb.append(this.extraData2); - } - first = false; - } - if (isSetExtraData3()) { - if (!first) sb.append(", "); - sb.append("extraData3:"); - if (this.extraData3 == null) { - sb.append("null"); - } else { - sb.append(this.extraData3); - } - first = false; - } - if (isSetExtraInt1()) { - if (!first) sb.append(", "); - sb.append("extraInt1:"); - sb.append(this.extraInt1); - first = false; - } - if (isSetExtraInt2()) { - if (!first) sb.append(", "); - sb.append("extraInt2:"); - sb.append(this.extraInt2); - first = false; - } - if (isSetExtraInt3()) { - if (!first) sb.append(", "); - sb.append("extraInt3:"); - sb.append(this.extraInt3); - first = false; - } - if (isSetExtraLong1()) { - if (!first) sb.append(", "); - sb.append("extraLong1:"); - sb.append(this.extraLong1); - first = false; - } - if (isSetExtraLong2()) { - if (!first) sb.append(", "); - sb.append("extraLong2:"); - sb.append(this.extraLong2); - first = false; - } - if (isSetExtraLong3()) { - if (!first) sb.append(", "); - sb.append("extraLong3:"); - sb.append(this.extraLong3); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 RequestDataThriftDTOStandardSchemeFactory implements SchemeFactory { - public RequestDataThriftDTOStandardScheme getScheme() { - return new RequestDataThriftDTOStandardScheme(); - } - } - - private static class RequestDataThriftDTOStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, RequestDataThriftDTO 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: // DATA_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DATA_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.dataTime = iprot.readI64(); - struct.setDataTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA_HASH_CODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataHashCode = iprot.readI32(); - struct.setDataHashCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATA_STRING - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dataString = iprot.readString(); - struct.setDataStringIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // EXTRA_DATA1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.extraData1 = iprot.readString(); - struct.setExtraData1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // EXTRA_DATA2 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.extraData2 = iprot.readString(); - struct.setExtraData2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // EXTRA_DATA3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.extraData3 = iprot.readString(); - struct.setExtraData3IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // EXTRA_INT1 - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.extraInt1 = iprot.readI32(); - struct.setExtraInt1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // EXTRA_INT2 - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.extraInt2 = iprot.readI32(); - struct.setExtraInt2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // EXTRA_INT3 - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.extraInt3 = iprot.readI32(); - struct.setExtraInt3IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // EXTRA_LONG1 - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.extraLong1 = iprot.readI64(); - struct.setExtraLong1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // EXTRA_LONG2 - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.extraLong2 = iprot.readI64(); - struct.setExtraLong2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // EXTRA_LONG3 - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.extraLong3 = iprot.readI64(); - struct.setExtraLong3IsSet(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, RequestDataThriftDTO struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); - oprot.writeI32(struct.dataType); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DATA_TIME_FIELD_DESC); - oprot.writeI64(struct.dataTime); - oprot.writeFieldEnd(); - if (struct.isSetDataHashCode()) { - oprot.writeFieldBegin(DATA_HASH_CODE_FIELD_DESC); - oprot.writeI32(struct.dataHashCode); - oprot.writeFieldEnd(); - } - if (struct.dataString != null) { - if (struct.isSetDataString()) { - oprot.writeFieldBegin(DATA_STRING_FIELD_DESC); - oprot.writeString(struct.dataString); - oprot.writeFieldEnd(); - } - } - if (struct.extraData1 != null) { - if (struct.isSetExtraData1()) { - oprot.writeFieldBegin(EXTRA_DATA1_FIELD_DESC); - oprot.writeString(struct.extraData1); - oprot.writeFieldEnd(); - } - } - if (struct.extraData2 != null) { - if (struct.isSetExtraData2()) { - oprot.writeFieldBegin(EXTRA_DATA2_FIELD_DESC); - oprot.writeString(struct.extraData2); - oprot.writeFieldEnd(); - } - } - if (struct.extraData3 != null) { - if (struct.isSetExtraData3()) { - oprot.writeFieldBegin(EXTRA_DATA3_FIELD_DESC); - oprot.writeString(struct.extraData3); - oprot.writeFieldEnd(); - } - } - if (struct.isSetExtraInt1()) { - oprot.writeFieldBegin(EXTRA_INT1_FIELD_DESC); - oprot.writeI32(struct.extraInt1); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraInt2()) { - oprot.writeFieldBegin(EXTRA_INT2_FIELD_DESC); - oprot.writeI32(struct.extraInt2); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraInt3()) { - oprot.writeFieldBegin(EXTRA_INT3_FIELD_DESC); - oprot.writeI32(struct.extraInt3); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraLong1()) { - oprot.writeFieldBegin(EXTRA_LONG1_FIELD_DESC); - oprot.writeI64(struct.extraLong1); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraLong2()) { - oprot.writeFieldBegin(EXTRA_LONG2_FIELD_DESC); - oprot.writeI64(struct.extraLong2); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraLong3()) { - oprot.writeFieldBegin(EXTRA_LONG3_FIELD_DESC); - oprot.writeI64(struct.extraLong3); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class RequestDataThriftDTOTupleSchemeFactory implements SchemeFactory { - public RequestDataThriftDTOTupleScheme getScheme() { - return new RequestDataThriftDTOTupleScheme(); - } - } - - private static class RequestDataThriftDTOTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RequestDataThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDataType()) { - optionals.set(0); - } - if (struct.isSetDataTime()) { - optionals.set(1); - } - if (struct.isSetDataHashCode()) { - optionals.set(2); - } - if (struct.isSetDataString()) { - optionals.set(3); - } - if (struct.isSetExtraData1()) { - optionals.set(4); - } - if (struct.isSetExtraData2()) { - optionals.set(5); - } - if (struct.isSetExtraData3()) { - optionals.set(6); - } - if (struct.isSetExtraInt1()) { - optionals.set(7); - } - if (struct.isSetExtraInt2()) { - optionals.set(8); - } - if (struct.isSetExtraInt3()) { - optionals.set(9); - } - if (struct.isSetExtraLong1()) { - optionals.set(10); - } - if (struct.isSetExtraLong2()) { - optionals.set(11); - } - if (struct.isSetExtraLong3()) { - optionals.set(12); - } - oprot.writeBitSet(optionals, 13); - if (struct.isSetDataType()) { - oprot.writeI32(struct.dataType); - } - if (struct.isSetDataTime()) { - oprot.writeI64(struct.dataTime); - } - if (struct.isSetDataHashCode()) { - oprot.writeI32(struct.dataHashCode); - } - if (struct.isSetDataString()) { - oprot.writeString(struct.dataString); - } - if (struct.isSetExtraData1()) { - oprot.writeString(struct.extraData1); - } - if (struct.isSetExtraData2()) { - oprot.writeString(struct.extraData2); - } - if (struct.isSetExtraData3()) { - oprot.writeString(struct.extraData3); - } - if (struct.isSetExtraInt1()) { - oprot.writeI32(struct.extraInt1); - } - if (struct.isSetExtraInt2()) { - oprot.writeI32(struct.extraInt2); - } - if (struct.isSetExtraInt3()) { - oprot.writeI32(struct.extraInt3); - } - if (struct.isSetExtraLong1()) { - oprot.writeI64(struct.extraLong1); - } - if (struct.isSetExtraLong2()) { - oprot.writeI64(struct.extraLong2); - } - if (struct.isSetExtraLong3()) { - oprot.writeI64(struct.extraLong3); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, RequestDataThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(13); - if (incoming.get(0)) { - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - } - if (incoming.get(1)) { - struct.dataTime = iprot.readI64(); - struct.setDataTimeIsSet(true); - } - if (incoming.get(2)) { - struct.dataHashCode = iprot.readI32(); - struct.setDataHashCodeIsSet(true); - } - if (incoming.get(3)) { - struct.dataString = iprot.readString(); - struct.setDataStringIsSet(true); - } - if (incoming.get(4)) { - struct.extraData1 = iprot.readString(); - struct.setExtraData1IsSet(true); - } - if (incoming.get(5)) { - struct.extraData2 = iprot.readString(); - struct.setExtraData2IsSet(true); - } - if (incoming.get(6)) { - struct.extraData3 = iprot.readString(); - struct.setExtraData3IsSet(true); - } - if (incoming.get(7)) { - struct.extraInt1 = iprot.readI32(); - struct.setExtraInt1IsSet(true); - } - if (incoming.get(8)) { - struct.extraInt2 = iprot.readI32(); - struct.setExtraInt2IsSet(true); - } - if (incoming.get(9)) { - struct.extraInt3 = iprot.readI32(); - struct.setExtraInt3IsSet(true); - } - if (incoming.get(10)) { - struct.extraLong1 = iprot.readI64(); - struct.setExtraLong1IsSet(true); - } - if (incoming.get(11)) { - struct.extraLong2 = iprot.readI64(); - struct.setExtraLong2IsSet(true); - } - if (incoming.get(12)) { - struct.extraLong3 = iprot.readI64(); - struct.setExtraLong3IsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RequestDataThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestDataThriftDTO"); + + private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField DATA_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataHashCode", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField DATA_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("dataString", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField EXTRA_DATA1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData1", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField EXTRA_DATA2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData2", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField EXTRA_DATA3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData3", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField EXTRA_INT1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt1", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField EXTRA_INT2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt2", org.apache.thrift.protocol.TType.I32, (short)9); + private static final org.apache.thrift.protocol.TField EXTRA_INT3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt3", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField EXTRA_LONG1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong1", org.apache.thrift.protocol.TType.I64, (short)11); + private static final org.apache.thrift.protocol.TField EXTRA_LONG2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong2", org.apache.thrift.protocol.TType.I64, (short)12); + private static final org.apache.thrift.protocol.TField EXTRA_LONG3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong3", org.apache.thrift.protocol.TType.I64, (short)13); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RequestDataThriftDTOStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RequestDataThriftDTOTupleSchemeFactory()); + } + + private int dataType; // required + private long dataTime; // required + private int dataHashCode; // optional + private String dataString; // optional + private String extraData1; // optional + private String extraData2; // optional + private String extraData3; // optional + private int extraInt1; // optional + private int extraInt2; // optional + private int extraInt3; // optional + private long extraLong1; // optional + private long extraLong2; // optional + private long extraLong3; // 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 { + DATA_TYPE((short)1, "dataType"), + DATA_TIME((short)2, "dataTime"), + DATA_HASH_CODE((short)3, "dataHashCode"), + DATA_STRING((short)4, "dataString"), + EXTRA_DATA1((short)5, "extraData1"), + EXTRA_DATA2((short)6, "extraData2"), + EXTRA_DATA3((short)7, "extraData3"), + EXTRA_INT1((short)8, "extraInt1"), + EXTRA_INT2((short)9, "extraInt2"), + EXTRA_INT3((short)10, "extraInt3"), + EXTRA_LONG1((short)11, "extraLong1"), + EXTRA_LONG2((short)12, "extraLong2"), + EXTRA_LONG3((short)13, "extraLong3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // DATA_TYPE + return DATA_TYPE; + case 2: // DATA_TIME + return DATA_TIME; + case 3: // DATA_HASH_CODE + return DATA_HASH_CODE; + case 4: // DATA_STRING + return DATA_STRING; + case 5: // EXTRA_DATA1 + return EXTRA_DATA1; + case 6: // EXTRA_DATA2 + return EXTRA_DATA2; + case 7: // EXTRA_DATA3 + return EXTRA_DATA3; + case 8: // EXTRA_INT1 + return EXTRA_INT1; + case 9: // EXTRA_INT2 + return EXTRA_INT2; + case 10: // EXTRA_INT3 + return EXTRA_INT3; + case 11: // EXTRA_LONG1 + return EXTRA_LONG1; + case 12: // EXTRA_LONG2 + return EXTRA_LONG2; + case 13: // EXTRA_LONG3 + return EXTRA_LONG3; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DATATYPE_ISSET_ID = 0; + private static final int __DATATIME_ISSET_ID = 1; + private static final int __DATAHASHCODE_ISSET_ID = 2; + private static final int __EXTRAINT1_ISSET_ID = 3; + private static final int __EXTRAINT2_ISSET_ID = 4; + private static final int __EXTRAINT3_ISSET_ID = 5; + private static final int __EXTRALONG1_ISSET_ID = 6; + private static final int __EXTRALONG2_ISSET_ID = 7; + private static final int __EXTRALONG3_ISSET_ID = 8; + private short __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.DATA_HASH_CODE,_Fields.DATA_STRING,_Fields.EXTRA_DATA1,_Fields.EXTRA_DATA2,_Fields.EXTRA_DATA3,_Fields.EXTRA_INT1,_Fields.EXTRA_INT2,_Fields.EXTRA_INT3,_Fields.EXTRA_LONG1,_Fields.EXTRA_LONG2,_Fields.EXTRA_LONG3}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DATA_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("dataHashCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DATA_STRING, new org.apache.thrift.meta_data.FieldMetaData("dataString", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_DATA1, new org.apache.thrift.meta_data.FieldMetaData("extraData1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_DATA2, new org.apache.thrift.meta_data.FieldMetaData("extraData2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_DATA3, new org.apache.thrift.meta_data.FieldMetaData("extraData3", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_INT1, new org.apache.thrift.meta_data.FieldMetaData("extraInt1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXTRA_INT2, new org.apache.thrift.meta_data.FieldMetaData("extraInt2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXTRA_INT3, new org.apache.thrift.meta_data.FieldMetaData("extraInt3", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXTRA_LONG1, new org.apache.thrift.meta_data.FieldMetaData("extraLong1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.EXTRA_LONG2, new org.apache.thrift.meta_data.FieldMetaData("extraLong2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.EXTRA_LONG3, new org.apache.thrift.meta_data.FieldMetaData("extraLong3", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestDataThriftDTO.class, metaDataMap); + } + + public RequestDataThriftDTO() { + } + + public RequestDataThriftDTO( + int dataType, + long dataTime) + { + this(); + this.dataType = dataType; + setDataTypeIsSet(true); + this.dataTime = dataTime; + setDataTimeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public RequestDataThriftDTO(RequestDataThriftDTO other) { + __isset_bitfield = other.__isset_bitfield; + this.dataType = other.dataType; + this.dataTime = other.dataTime; + this.dataHashCode = other.dataHashCode; + if (other.isSetDataString()) { + this.dataString = other.dataString; + } + if (other.isSetExtraData1()) { + this.extraData1 = other.extraData1; + } + if (other.isSetExtraData2()) { + this.extraData2 = other.extraData2; + } + if (other.isSetExtraData3()) { + this.extraData3 = other.extraData3; + } + this.extraInt1 = other.extraInt1; + this.extraInt2 = other.extraInt2; + this.extraInt3 = other.extraInt3; + this.extraLong1 = other.extraLong1; + this.extraLong2 = other.extraLong2; + this.extraLong3 = other.extraLong3; + } + + public RequestDataThriftDTO deepCopy() { + return new RequestDataThriftDTO(this); + } + + @Override + public void clear() { + setDataTypeIsSet(false); + this.dataType = 0; + setDataTimeIsSet(false); + this.dataTime = 0; + setDataHashCodeIsSet(false); + this.dataHashCode = 0; + this.dataString = null; + this.extraData1 = null; + this.extraData2 = null; + this.extraData3 = null; + setExtraInt1IsSet(false); + this.extraInt1 = 0; + setExtraInt2IsSet(false); + this.extraInt2 = 0; + setExtraInt3IsSet(false); + this.extraInt3 = 0; + setExtraLong1IsSet(false); + this.extraLong1 = 0; + setExtraLong2IsSet(false); + this.extraLong2 = 0; + setExtraLong3IsSet(false); + this.extraLong3 = 0; + } + + public int getDataType() { + return this.dataType; + } + + public void setDataType(int dataType) { + this.dataType = dataType; + setDataTypeIsSet(true); + } + + public void unsetDataType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ + public boolean isSetDataType() { + return EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + public void setDataTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value); + } + + public long getDataTime() { + return this.dataTime; + } + + public void setDataTime(long dataTime) { + this.dataTime = dataTime; + setDataTimeIsSet(true); + } + + public void unsetDataTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATATIME_ISSET_ID); + } + + /** Returns true if field dataTime is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTime() { + return EncodingUtils.testBit(__isset_bitfield, __DATATIME_ISSET_ID); + } + + public void setDataTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATATIME_ISSET_ID, value); + } + + public int getDataHashCode() { + return this.dataHashCode; + } + + public void setDataHashCode(int dataHashCode) { + this.dataHashCode = dataHashCode; + setDataHashCodeIsSet(true); + } + + public void unsetDataHashCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATAHASHCODE_ISSET_ID); + } + + /** Returns true if field dataHashCode is set (has been assigned a value) and false otherwise */ + public boolean isSetDataHashCode() { + return EncodingUtils.testBit(__isset_bitfield, __DATAHASHCODE_ISSET_ID); + } + + public void setDataHashCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATAHASHCODE_ISSET_ID, value); + } + + public String getDataString() { + return this.dataString; + } + + public void setDataString(String dataString) { + this.dataString = dataString; + } + + public void unsetDataString() { + this.dataString = null; + } + + /** Returns true if field dataString is set (has been assigned a value) and false otherwise */ + public boolean isSetDataString() { + return this.dataString != null; + } + + public void setDataStringIsSet(boolean value) { + if (!value) { + this.dataString = null; + } + } + + public String getExtraData1() { + return this.extraData1; + } + + public void setExtraData1(String extraData1) { + this.extraData1 = extraData1; + } + + public void unsetExtraData1() { + this.extraData1 = null; + } + + /** Returns true if field extraData1 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraData1() { + return this.extraData1 != null; + } + + public void setExtraData1IsSet(boolean value) { + if (!value) { + this.extraData1 = null; + } + } + + public String getExtraData2() { + return this.extraData2; + } + + public void setExtraData2(String extraData2) { + this.extraData2 = extraData2; + } + + public void unsetExtraData2() { + this.extraData2 = null; + } + + /** Returns true if field extraData2 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraData2() { + return this.extraData2 != null; + } + + public void setExtraData2IsSet(boolean value) { + if (!value) { + this.extraData2 = null; + } + } + + public String getExtraData3() { + return this.extraData3; + } + + public void setExtraData3(String extraData3) { + this.extraData3 = extraData3; + } + + public void unsetExtraData3() { + this.extraData3 = null; + } + + /** Returns true if field extraData3 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraData3() { + return this.extraData3 != null; + } + + public void setExtraData3IsSet(boolean value) { + if (!value) { + this.extraData3 = null; + } + } + + public int getExtraInt1() { + return this.extraInt1; + } + + public void setExtraInt1(int extraInt1) { + this.extraInt1 = extraInt1; + setExtraInt1IsSet(true); + } + + public void unsetExtraInt1() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRAINT1_ISSET_ID); + } + + /** Returns true if field extraInt1 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraInt1() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRAINT1_ISSET_ID); + } + + public void setExtraInt1IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRAINT1_ISSET_ID, value); + } + + public int getExtraInt2() { + return this.extraInt2; + } + + public void setExtraInt2(int extraInt2) { + this.extraInt2 = extraInt2; + setExtraInt2IsSet(true); + } + + public void unsetExtraInt2() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRAINT2_ISSET_ID); + } + + /** Returns true if field extraInt2 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraInt2() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRAINT2_ISSET_ID); + } + + public void setExtraInt2IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRAINT2_ISSET_ID, value); + } + + public int getExtraInt3() { + return this.extraInt3; + } + + public void setExtraInt3(int extraInt3) { + this.extraInt3 = extraInt3; + setExtraInt3IsSet(true); + } + + public void unsetExtraInt3() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRAINT3_ISSET_ID); + } + + /** Returns true if field extraInt3 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraInt3() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRAINT3_ISSET_ID); + } + + public void setExtraInt3IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRAINT3_ISSET_ID, value); + } + + public long getExtraLong1() { + return this.extraLong1; + } + + public void setExtraLong1(long extraLong1) { + this.extraLong1 = extraLong1; + setExtraLong1IsSet(true); + } + + public void unsetExtraLong1() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRALONG1_ISSET_ID); + } + + /** Returns true if field extraLong1 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraLong1() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRALONG1_ISSET_ID); + } + + public void setExtraLong1IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRALONG1_ISSET_ID, value); + } + + public long getExtraLong2() { + return this.extraLong2; + } + + public void setExtraLong2(long extraLong2) { + this.extraLong2 = extraLong2; + setExtraLong2IsSet(true); + } + + public void unsetExtraLong2() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRALONG2_ISSET_ID); + } + + /** Returns true if field extraLong2 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraLong2() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRALONG2_ISSET_ID); + } + + public void setExtraLong2IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRALONG2_ISSET_ID, value); + } + + public long getExtraLong3() { + return this.extraLong3; + } + + public void setExtraLong3(long extraLong3) { + this.extraLong3 = extraLong3; + setExtraLong3IsSet(true); + } + + public void unsetExtraLong3() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRALONG3_ISSET_ID); + } + + /** Returns true if field extraLong3 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraLong3() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRALONG3_ISSET_ID); + } + + public void setExtraLong3IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRALONG3_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DATA_TYPE: + if (value == null) { + unsetDataType(); + } else { + setDataType((Integer)value); + } + break; + + case DATA_TIME: + if (value == null) { + unsetDataTime(); + } else { + setDataTime((Long)value); + } + break; + + case DATA_HASH_CODE: + if (value == null) { + unsetDataHashCode(); + } else { + setDataHashCode((Integer)value); + } + break; + + case DATA_STRING: + if (value == null) { + unsetDataString(); + } else { + setDataString((String)value); + } + break; + + case EXTRA_DATA1: + if (value == null) { + unsetExtraData1(); + } else { + setExtraData1((String)value); + } + break; + + case EXTRA_DATA2: + if (value == null) { + unsetExtraData2(); + } else { + setExtraData2((String)value); + } + break; + + case EXTRA_DATA3: + if (value == null) { + unsetExtraData3(); + } else { + setExtraData3((String)value); + } + break; + + case EXTRA_INT1: + if (value == null) { + unsetExtraInt1(); + } else { + setExtraInt1((Integer)value); + } + break; + + case EXTRA_INT2: + if (value == null) { + unsetExtraInt2(); + } else { + setExtraInt2((Integer)value); + } + break; + + case EXTRA_INT3: + if (value == null) { + unsetExtraInt3(); + } else { + setExtraInt3((Integer)value); + } + break; + + case EXTRA_LONG1: + if (value == null) { + unsetExtraLong1(); + } else { + setExtraLong1((Long)value); + } + break; + + case EXTRA_LONG2: + if (value == null) { + unsetExtraLong2(); + } else { + setExtraLong2((Long)value); + } + break; + + case EXTRA_LONG3: + if (value == null) { + unsetExtraLong3(); + } else { + setExtraLong3((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DATA_TYPE: + return Integer.valueOf(getDataType()); + + case DATA_TIME: + return Long.valueOf(getDataTime()); + + case DATA_HASH_CODE: + return Integer.valueOf(getDataHashCode()); + + case DATA_STRING: + return getDataString(); + + case EXTRA_DATA1: + return getExtraData1(); + + case EXTRA_DATA2: + return getExtraData2(); + + case EXTRA_DATA3: + return getExtraData3(); + + case EXTRA_INT1: + return Integer.valueOf(getExtraInt1()); + + case EXTRA_INT2: + return Integer.valueOf(getExtraInt2()); + + case EXTRA_INT3: + return Integer.valueOf(getExtraInt3()); + + case EXTRA_LONG1: + return Long.valueOf(getExtraLong1()); + + case EXTRA_LONG2: + return Long.valueOf(getExtraLong2()); + + case EXTRA_LONG3: + return Long.valueOf(getExtraLong3()); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case DATA_TYPE: + return isSetDataType(); + case DATA_TIME: + return isSetDataTime(); + case DATA_HASH_CODE: + return isSetDataHashCode(); + case DATA_STRING: + return isSetDataString(); + case EXTRA_DATA1: + return isSetExtraData1(); + case EXTRA_DATA2: + return isSetExtraData2(); + case EXTRA_DATA3: + return isSetExtraData3(); + case EXTRA_INT1: + return isSetExtraInt1(); + case EXTRA_INT2: + return isSetExtraInt2(); + case EXTRA_INT3: + return isSetExtraInt3(); + case EXTRA_LONG1: + return isSetExtraLong1(); + case EXTRA_LONG2: + return isSetExtraLong2(); + case EXTRA_LONG3: + return isSetExtraLong3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof RequestDataThriftDTO) + return this.equals((RequestDataThriftDTO)that); + return false; + } + + public boolean equals(RequestDataThriftDTO that) { + if (that == null) + return false; + + boolean this_present_dataType = true; + boolean that_present_dataType = true; + if (this_present_dataType || that_present_dataType) { + if (!(this_present_dataType && that_present_dataType)) + return false; + if (this.dataType != that.dataType) + return false; + } + + boolean this_present_dataTime = true; + boolean that_present_dataTime = true; + if (this_present_dataTime || that_present_dataTime) { + if (!(this_present_dataTime && that_present_dataTime)) + return false; + if (this.dataTime != that.dataTime) + return false; + } + + boolean this_present_dataHashCode = true && this.isSetDataHashCode(); + boolean that_present_dataHashCode = true && that.isSetDataHashCode(); + if (this_present_dataHashCode || that_present_dataHashCode) { + if (!(this_present_dataHashCode && that_present_dataHashCode)) + return false; + if (this.dataHashCode != that.dataHashCode) + return false; + } + + boolean this_present_dataString = true && this.isSetDataString(); + boolean that_present_dataString = true && that.isSetDataString(); + if (this_present_dataString || that_present_dataString) { + if (!(this_present_dataString && that_present_dataString)) + return false; + if (!this.dataString.equals(that.dataString)) + return false; + } + + boolean this_present_extraData1 = true && this.isSetExtraData1(); + boolean that_present_extraData1 = true && that.isSetExtraData1(); + if (this_present_extraData1 || that_present_extraData1) { + if (!(this_present_extraData1 && that_present_extraData1)) + return false; + if (!this.extraData1.equals(that.extraData1)) + return false; + } + + boolean this_present_extraData2 = true && this.isSetExtraData2(); + boolean that_present_extraData2 = true && that.isSetExtraData2(); + if (this_present_extraData2 || that_present_extraData2) { + if (!(this_present_extraData2 && that_present_extraData2)) + return false; + if (!this.extraData2.equals(that.extraData2)) + return false; + } + + boolean this_present_extraData3 = true && this.isSetExtraData3(); + boolean that_present_extraData3 = true && that.isSetExtraData3(); + if (this_present_extraData3 || that_present_extraData3) { + if (!(this_present_extraData3 && that_present_extraData3)) + return false; + if (!this.extraData3.equals(that.extraData3)) + return false; + } + + boolean this_present_extraInt1 = true && this.isSetExtraInt1(); + boolean that_present_extraInt1 = true && that.isSetExtraInt1(); + if (this_present_extraInt1 || that_present_extraInt1) { + if (!(this_present_extraInt1 && that_present_extraInt1)) + return false; + if (this.extraInt1 != that.extraInt1) + return false; + } + + boolean this_present_extraInt2 = true && this.isSetExtraInt2(); + boolean that_present_extraInt2 = true && that.isSetExtraInt2(); + if (this_present_extraInt2 || that_present_extraInt2) { + if (!(this_present_extraInt2 && that_present_extraInt2)) + return false; + if (this.extraInt2 != that.extraInt2) + return false; + } + + boolean this_present_extraInt3 = true && this.isSetExtraInt3(); + boolean that_present_extraInt3 = true && that.isSetExtraInt3(); + if (this_present_extraInt3 || that_present_extraInt3) { + if (!(this_present_extraInt3 && that_present_extraInt3)) + return false; + if (this.extraInt3 != that.extraInt3) + return false; + } + + boolean this_present_extraLong1 = true && this.isSetExtraLong1(); + boolean that_present_extraLong1 = true && that.isSetExtraLong1(); + if (this_present_extraLong1 || that_present_extraLong1) { + if (!(this_present_extraLong1 && that_present_extraLong1)) + return false; + if (this.extraLong1 != that.extraLong1) + return false; + } + + boolean this_present_extraLong2 = true && this.isSetExtraLong2(); + boolean that_present_extraLong2 = true && that.isSetExtraLong2(); + if (this_present_extraLong2 || that_present_extraLong2) { + if (!(this_present_extraLong2 && that_present_extraLong2)) + return false; + if (this.extraLong2 != that.extraLong2) + return false; + } + + boolean this_present_extraLong3 = true && this.isSetExtraLong3(); + boolean that_present_extraLong3 = true && that.isSetExtraLong3(); + if (this_present_extraLong3 || that_present_extraLong3) { + if (!(this_present_extraLong3 && that_present_extraLong3)) + return false; + if (this.extraLong3 != that.extraLong3) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(RequestDataThriftDTO other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + RequestDataThriftDTO typedOther = (RequestDataThriftDTO)other; + + lastComparison = Boolean.valueOf(isSetDataType()).compareTo(typedOther.isSetDataType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, typedOther.dataType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataTime()).compareTo(typedOther.isSetDataTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTime, typedOther.dataTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataHashCode()).compareTo(typedOther.isSetDataHashCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataHashCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataHashCode, typedOther.dataHashCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataString()).compareTo(typedOther.isSetDataString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataString()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataString, typedOther.dataString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraData1()).compareTo(typedOther.isSetExtraData1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraData1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData1, typedOther.extraData1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraData2()).compareTo(typedOther.isSetExtraData2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraData2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData2, typedOther.extraData2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraData3()).compareTo(typedOther.isSetExtraData3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraData3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData3, typedOther.extraData3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraInt1()).compareTo(typedOther.isSetExtraInt1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraInt1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt1, typedOther.extraInt1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraInt2()).compareTo(typedOther.isSetExtraInt2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraInt2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt2, typedOther.extraInt2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraInt3()).compareTo(typedOther.isSetExtraInt3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraInt3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt3, typedOther.extraInt3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraLong1()).compareTo(typedOther.isSetExtraLong1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraLong1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong1, typedOther.extraLong1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraLong2()).compareTo(typedOther.isSetExtraLong2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraLong2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong2, typedOther.extraLong2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraLong3()).compareTo(typedOther.isSetExtraLong3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraLong3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong3, typedOther.extraLong3); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("RequestDataThriftDTO("); + boolean first = true; + + sb.append("dataType:"); + sb.append(this.dataType); + first = false; + if (!first) sb.append(", "); + sb.append("dataTime:"); + sb.append(this.dataTime); + first = false; + if (isSetDataHashCode()) { + if (!first) sb.append(", "); + sb.append("dataHashCode:"); + sb.append(this.dataHashCode); + first = false; + } + if (isSetDataString()) { + if (!first) sb.append(", "); + sb.append("dataString:"); + if (this.dataString == null) { + sb.append("null"); + } else { + sb.append(this.dataString); + } + first = false; + } + if (isSetExtraData1()) { + if (!first) sb.append(", "); + sb.append("extraData1:"); + if (this.extraData1 == null) { + sb.append("null"); + } else { + sb.append(this.extraData1); + } + first = false; + } + if (isSetExtraData2()) { + if (!first) sb.append(", "); + sb.append("extraData2:"); + if (this.extraData2 == null) { + sb.append("null"); + } else { + sb.append(this.extraData2); + } + first = false; + } + if (isSetExtraData3()) { + if (!first) sb.append(", "); + sb.append("extraData3:"); + if (this.extraData3 == null) { + sb.append("null"); + } else { + sb.append(this.extraData3); + } + first = false; + } + if (isSetExtraInt1()) { + if (!first) sb.append(", "); + sb.append("extraInt1:"); + sb.append(this.extraInt1); + first = false; + } + if (isSetExtraInt2()) { + if (!first) sb.append(", "); + sb.append("extraInt2:"); + sb.append(this.extraInt2); + first = false; + } + if (isSetExtraInt3()) { + if (!first) sb.append(", "); + sb.append("extraInt3:"); + sb.append(this.extraInt3); + first = false; + } + if (isSetExtraLong1()) { + if (!first) sb.append(", "); + sb.append("extraLong1:"); + sb.append(this.extraLong1); + first = false; + } + if (isSetExtraLong2()) { + if (!first) sb.append(", "); + sb.append("extraLong2:"); + sb.append(this.extraLong2); + first = false; + } + if (isSetExtraLong3()) { + if (!first) sb.append(", "); + sb.append("extraLong3:"); + sb.append(this.extraLong3); + 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, 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 RequestDataThriftDTOStandardSchemeFactory implements SchemeFactory { + public RequestDataThriftDTOStandardScheme getScheme() { + return new RequestDataThriftDTOStandardScheme(); + } + } + + private static class RequestDataThriftDTOStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, RequestDataThriftDTO 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: // DATA_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DATA_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.dataTime = iprot.readI64(); + struct.setDataTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DATA_HASH_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dataHashCode = iprot.readI32(); + struct.setDataHashCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DATA_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dataString = iprot.readString(); + struct.setDataStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // EXTRA_DATA1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.extraData1 = iprot.readString(); + struct.setExtraData1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // EXTRA_DATA2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.extraData2 = iprot.readString(); + struct.setExtraData2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // EXTRA_DATA3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.extraData3 = iprot.readString(); + struct.setExtraData3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // EXTRA_INT1 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.extraInt1 = iprot.readI32(); + struct.setExtraInt1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // EXTRA_INT2 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.extraInt2 = iprot.readI32(); + struct.setExtraInt2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // EXTRA_INT3 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.extraInt3 = iprot.readI32(); + struct.setExtraInt3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // EXTRA_LONG1 + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.extraLong1 = iprot.readI64(); + struct.setExtraLong1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // EXTRA_LONG2 + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.extraLong2 = iprot.readI64(); + struct.setExtraLong2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // EXTRA_LONG3 + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.extraLong3 = iprot.readI64(); + struct.setExtraLong3IsSet(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, RequestDataThriftDTO struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); + oprot.writeI32(struct.dataType); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(DATA_TIME_FIELD_DESC); + oprot.writeI64(struct.dataTime); + oprot.writeFieldEnd(); + if (struct.isSetDataHashCode()) { + oprot.writeFieldBegin(DATA_HASH_CODE_FIELD_DESC); + oprot.writeI32(struct.dataHashCode); + oprot.writeFieldEnd(); + } + if (struct.dataString != null) { + if (struct.isSetDataString()) { + oprot.writeFieldBegin(DATA_STRING_FIELD_DESC); + oprot.writeString(struct.dataString); + oprot.writeFieldEnd(); + } + } + if (struct.extraData1 != null) { + if (struct.isSetExtraData1()) { + oprot.writeFieldBegin(EXTRA_DATA1_FIELD_DESC); + oprot.writeString(struct.extraData1); + oprot.writeFieldEnd(); + } + } + if (struct.extraData2 != null) { + if (struct.isSetExtraData2()) { + oprot.writeFieldBegin(EXTRA_DATA2_FIELD_DESC); + oprot.writeString(struct.extraData2); + oprot.writeFieldEnd(); + } + } + if (struct.extraData3 != null) { + if (struct.isSetExtraData3()) { + oprot.writeFieldBegin(EXTRA_DATA3_FIELD_DESC); + oprot.writeString(struct.extraData3); + oprot.writeFieldEnd(); + } + } + if (struct.isSetExtraInt1()) { + oprot.writeFieldBegin(EXTRA_INT1_FIELD_DESC); + oprot.writeI32(struct.extraInt1); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraInt2()) { + oprot.writeFieldBegin(EXTRA_INT2_FIELD_DESC); + oprot.writeI32(struct.extraInt2); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraInt3()) { + oprot.writeFieldBegin(EXTRA_INT3_FIELD_DESC); + oprot.writeI32(struct.extraInt3); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraLong1()) { + oprot.writeFieldBegin(EXTRA_LONG1_FIELD_DESC); + oprot.writeI64(struct.extraLong1); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraLong2()) { + oprot.writeFieldBegin(EXTRA_LONG2_FIELD_DESC); + oprot.writeI64(struct.extraLong2); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraLong3()) { + oprot.writeFieldBegin(EXTRA_LONG3_FIELD_DESC); + oprot.writeI64(struct.extraLong3); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RequestDataThriftDTOTupleSchemeFactory implements SchemeFactory { + public RequestDataThriftDTOTupleScheme getScheme() { + return new RequestDataThriftDTOTupleScheme(); + } + } + + private static class RequestDataThriftDTOTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, RequestDataThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDataType()) { + optionals.set(0); + } + if (struct.isSetDataTime()) { + optionals.set(1); + } + if (struct.isSetDataHashCode()) { + optionals.set(2); + } + if (struct.isSetDataString()) { + optionals.set(3); + } + if (struct.isSetExtraData1()) { + optionals.set(4); + } + if (struct.isSetExtraData2()) { + optionals.set(5); + } + if (struct.isSetExtraData3()) { + optionals.set(6); + } + if (struct.isSetExtraInt1()) { + optionals.set(7); + } + if (struct.isSetExtraInt2()) { + optionals.set(8); + } + if (struct.isSetExtraInt3()) { + optionals.set(9); + } + if (struct.isSetExtraLong1()) { + optionals.set(10); + } + if (struct.isSetExtraLong2()) { + optionals.set(11); + } + if (struct.isSetExtraLong3()) { + optionals.set(12); + } + oprot.writeBitSet(optionals, 13); + if (struct.isSetDataType()) { + oprot.writeI32(struct.dataType); + } + if (struct.isSetDataTime()) { + oprot.writeI64(struct.dataTime); + } + if (struct.isSetDataHashCode()) { + oprot.writeI32(struct.dataHashCode); + } + if (struct.isSetDataString()) { + oprot.writeString(struct.dataString); + } + if (struct.isSetExtraData1()) { + oprot.writeString(struct.extraData1); + } + if (struct.isSetExtraData2()) { + oprot.writeString(struct.extraData2); + } + if (struct.isSetExtraData3()) { + oprot.writeString(struct.extraData3); + } + if (struct.isSetExtraInt1()) { + oprot.writeI32(struct.extraInt1); + } + if (struct.isSetExtraInt2()) { + oprot.writeI32(struct.extraInt2); + } + if (struct.isSetExtraInt3()) { + oprot.writeI32(struct.extraInt3); + } + if (struct.isSetExtraLong1()) { + oprot.writeI64(struct.extraLong1); + } + if (struct.isSetExtraLong2()) { + oprot.writeI64(struct.extraLong2); + } + if (struct.isSetExtraLong3()) { + oprot.writeI64(struct.extraLong3); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, RequestDataThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(13); + if (incoming.get(0)) { + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + } + if (incoming.get(1)) { + struct.dataTime = iprot.readI64(); + struct.setDataTimeIsSet(true); + } + if (incoming.get(2)) { + struct.dataHashCode = iprot.readI32(); + struct.setDataHashCodeIsSet(true); + } + if (incoming.get(3)) { + struct.dataString = iprot.readString(); + struct.setDataStringIsSet(true); + } + if (incoming.get(4)) { + struct.extraData1 = iprot.readString(); + struct.setExtraData1IsSet(true); + } + if (incoming.get(5)) { + struct.extraData2 = iprot.readString(); + struct.setExtraData2IsSet(true); + } + if (incoming.get(6)) { + struct.extraData3 = iprot.readString(); + struct.setExtraData3IsSet(true); + } + if (incoming.get(7)) { + struct.extraInt1 = iprot.readI32(); + struct.setExtraInt1IsSet(true); + } + if (incoming.get(8)) { + struct.extraInt2 = iprot.readI32(); + struct.setExtraInt2IsSet(true); + } + if (incoming.get(9)) { + struct.extraInt3 = iprot.readI32(); + struct.setExtraInt3IsSet(true); + } + if (incoming.get(10)) { + struct.extraLong1 = iprot.readI64(); + struct.setExtraLong1IsSet(true); + } + if (incoming.get(11)) { + struct.extraLong2 = iprot.readI64(); + struct.setExtraLong2IsSet(true); + } + if (incoming.get(12)) { + struct.extraLong3 = iprot.readI64(); + struct.setExtraLong3IsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/RequestThriftDTO.java b/src/main/java/com/profiler/common/dto/thrift/RequestThriftDTO.java index 4aefdcc8e..0f8de9c29 100644 --- a/src/main/java/com/profiler/common/dto/thrift/RequestThriftDTO.java +++ b/src/main/java/com/profiler/common/dto/thrift/RequestThriftDTO.java @@ -1,2020 +1,2023 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class RequestThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestThriftDTO"); - - 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 REQUEST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHashCode", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField THREAD_CPUTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("threadCPUTime", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField THREAD_USER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("threadUserTime", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("requestID", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField REQUEST_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("requestURL", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField CLIENT_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("clientIP", org.apache.thrift.protocol.TType.STRING, (short)9); - private static final org.apache.thrift.protocol.TField EXTRA_DATA1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData1", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField EXTRA_DATA2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData2", org.apache.thrift.protocol.TType.STRING, (short)11); - private static final org.apache.thrift.protocol.TField EXTRA_DATA3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData3", org.apache.thrift.protocol.TType.STRING, (short)12); - private static final org.apache.thrift.protocol.TField EXTRA_INT1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt1", org.apache.thrift.protocol.TType.I32, (short)13); - private static final org.apache.thrift.protocol.TField EXTRA_INT2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt2", org.apache.thrift.protocol.TType.I32, (short)14); - private static final org.apache.thrift.protocol.TField EXTRA_INT3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt3", org.apache.thrift.protocol.TType.I32, (short)15); - private static final org.apache.thrift.protocol.TField EXTRA_LONG1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong1", org.apache.thrift.protocol.TType.I64, (short)16); - private static final org.apache.thrift.protocol.TField EXTRA_LONG2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong2", org.apache.thrift.protocol.TType.I64, (short)17); - private static final org.apache.thrift.protocol.TField EXTRA_LONG3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong3", org.apache.thrift.protocol.TType.I64, (short)18); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new RequestThriftDTOStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RequestThriftDTOTupleSchemeFactory()); - } - - private String agentId; // required - private int requestHashCode; // required - private int dataType; // required - private long dataTime; // required - private long threadCPUTime; // required - private long threadUserTime; // required - private String requestID; // optional - private String requestURL; // optional - private String clientIP; // optional - private String extraData1; // optional - private String extraData2; // optional - private String extraData3; // optional - private int extraInt1; // optional - private int extraInt2; // optional - private int extraInt3; // optional - private long extraLong1; // optional - private long extraLong2; // optional - private long extraLong3; // 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"), - REQUEST_HASH_CODE((short)2, "requestHashCode"), - DATA_TYPE((short)3, "dataType"), - DATA_TIME((short)4, "dataTime"), - THREAD_CPUTIME((short)5, "threadCPUTime"), - THREAD_USER_TIME((short)6, "threadUserTime"), - REQUEST_ID((short)7, "requestID"), - REQUEST_URL((short)8, "requestURL"), - CLIENT_IP((short)9, "clientIP"), - EXTRA_DATA1((short)10, "extraData1"), - EXTRA_DATA2((short)11, "extraData2"), - EXTRA_DATA3((short)12, "extraData3"), - EXTRA_INT1((short)13, "extraInt1"), - EXTRA_INT2((short)14, "extraInt2"), - EXTRA_INT3((short)15, "extraInt3"), - EXTRA_LONG1((short)16, "extraLong1"), - EXTRA_LONG2((short)17, "extraLong2"), - EXTRA_LONG3((short)18, "extraLong3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // REQUEST_HASH_CODE - return REQUEST_HASH_CODE; - case 3: // DATA_TYPE - return DATA_TYPE; - case 4: // DATA_TIME - return DATA_TIME; - case 5: // THREAD_CPUTIME - return THREAD_CPUTIME; - case 6: // THREAD_USER_TIME - return THREAD_USER_TIME; - case 7: // REQUEST_ID - return REQUEST_ID; - case 8: // REQUEST_URL - return REQUEST_URL; - case 9: // CLIENT_IP - return CLIENT_IP; - case 10: // EXTRA_DATA1 - return EXTRA_DATA1; - case 11: // EXTRA_DATA2 - return EXTRA_DATA2; - case 12: // EXTRA_DATA3 - return EXTRA_DATA3; - case 13: // EXTRA_INT1 - return EXTRA_INT1; - case 14: // EXTRA_INT2 - return EXTRA_INT2; - case 15: // EXTRA_INT3 - return EXTRA_INT3; - case 16: // EXTRA_LONG1 - return EXTRA_LONG1; - case 17: // EXTRA_LONG2 - return EXTRA_LONG2; - case 18: // EXTRA_LONG3 - return EXTRA_LONG3; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __REQUESTHASHCODE_ISSET_ID = 0; - private static final int __DATATYPE_ISSET_ID = 1; - private static final int __DATATIME_ISSET_ID = 2; - private static final int __THREADCPUTIME_ISSET_ID = 3; - private static final int __THREADUSERTIME_ISSET_ID = 4; - private static final int __EXTRAINT1_ISSET_ID = 5; - private static final int __EXTRAINT2_ISSET_ID = 6; - private static final int __EXTRAINT3_ISSET_ID = 7; - private static final int __EXTRALONG1_ISSET_ID = 8; - private static final int __EXTRALONG2_ISSET_ID = 9; - private static final int __EXTRALONG3_ISSET_ID = 10; - private BitSet __isset_bit_vector = new BitSet(11); - private _Fields optionals[] = {_Fields.REQUEST_ID,_Fields.REQUEST_URL,_Fields.CLIENT_IP,_Fields.EXTRA_DATA1,_Fields.EXTRA_DATA2,_Fields.EXTRA_DATA3,_Fields.EXTRA_INT1,_Fields.EXTRA_INT2,_Fields.EXTRA_INT3,_Fields.EXTRA_LONG1,_Fields.EXTRA_LONG2,_Fields.EXTRA_LONG3}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.REQUEST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("requestHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.THREAD_CPUTIME, new org.apache.thrift.meta_data.FieldMetaData("threadCPUTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.THREAD_USER_TIME, new org.apache.thrift.meta_data.FieldMetaData("threadUserTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestID", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.REQUEST_URL, new org.apache.thrift.meta_data.FieldMetaData("requestURL", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CLIENT_IP, new org.apache.thrift.meta_data.FieldMetaData("clientIP", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_DATA1, new org.apache.thrift.meta_data.FieldMetaData("extraData1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_DATA2, new org.apache.thrift.meta_data.FieldMetaData("extraData2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_DATA3, new org.apache.thrift.meta_data.FieldMetaData("extraData3", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXTRA_INT1, new org.apache.thrift.meta_data.FieldMetaData("extraInt1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EXTRA_INT2, new org.apache.thrift.meta_data.FieldMetaData("extraInt2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EXTRA_INT3, new org.apache.thrift.meta_data.FieldMetaData("extraInt3", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EXTRA_LONG1, new org.apache.thrift.meta_data.FieldMetaData("extraLong1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.EXTRA_LONG2, new org.apache.thrift.meta_data.FieldMetaData("extraLong2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.EXTRA_LONG3, new org.apache.thrift.meta_data.FieldMetaData("extraLong3", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestThriftDTO.class, metaDataMap); - } - - public RequestThriftDTO() { - } - - public RequestThriftDTO( - String agentId, - int requestHashCode, - int dataType, - long dataTime, - long threadCPUTime, - long threadUserTime) - { - this(); - this.agentId = agentId; - this.requestHashCode = requestHashCode; - setRequestHashCodeIsSet(true); - this.dataType = dataType; - setDataTypeIsSet(true); - this.dataTime = dataTime; - setDataTimeIsSet(true); - this.threadCPUTime = threadCPUTime; - setThreadCPUTimeIsSet(true); - this.threadUserTime = threadUserTime; - setThreadUserTimeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public RequestThriftDTO(RequestThriftDTO other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - this.requestHashCode = other.requestHashCode; - this.dataType = other.dataType; - this.dataTime = other.dataTime; - this.threadCPUTime = other.threadCPUTime; - this.threadUserTime = other.threadUserTime; - if (other.isSetRequestID()) { - this.requestID = other.requestID; - } - if (other.isSetRequestURL()) { - this.requestURL = other.requestURL; - } - if (other.isSetClientIP()) { - this.clientIP = other.clientIP; - } - if (other.isSetExtraData1()) { - this.extraData1 = other.extraData1; - } - if (other.isSetExtraData2()) { - this.extraData2 = other.extraData2; - } - if (other.isSetExtraData3()) { - this.extraData3 = other.extraData3; - } - this.extraInt1 = other.extraInt1; - this.extraInt2 = other.extraInt2; - this.extraInt3 = other.extraInt3; - this.extraLong1 = other.extraLong1; - this.extraLong2 = other.extraLong2; - this.extraLong3 = other.extraLong3; - } - - public RequestThriftDTO deepCopy() { - return new RequestThriftDTO(this); - } - - @Override - public void clear() { - this.agentId = null; - setRequestHashCodeIsSet(false); - this.requestHashCode = 0; - setDataTypeIsSet(false); - this.dataType = 0; - setDataTimeIsSet(false); - this.dataTime = 0; - setThreadCPUTimeIsSet(false); - this.threadCPUTime = 0; - setThreadUserTimeIsSet(false); - this.threadUserTime = 0; - this.requestID = null; - this.requestURL = null; - this.clientIP = null; - this.extraData1 = null; - this.extraData2 = null; - this.extraData3 = null; - setExtraInt1IsSet(false); - this.extraInt1 = 0; - setExtraInt2IsSet(false); - this.extraInt2 = 0; - setExtraInt3IsSet(false); - this.extraInt3 = 0; - setExtraLong1IsSet(false); - this.extraLong1 = 0; - setExtraLong2IsSet(false); - this.extraLong2 = 0; - setExtraLong3IsSet(false); - this.extraLong3 = 0; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 int getRequestHashCode() { - return this.requestHashCode; - } - - public void setRequestHashCode(int requestHashCode) { - this.requestHashCode = requestHashCode; - setRequestHashCodeIsSet(true); - } - - public void unsetRequestHashCode() { - __isset_bit_vector.clear(__REQUESTHASHCODE_ISSET_ID); - } - - /** Returns true if field requestHashCode is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestHashCode() { - return __isset_bit_vector.get(__REQUESTHASHCODE_ISSET_ID); - } - - public void setRequestHashCodeIsSet(boolean value) { - __isset_bit_vector.set(__REQUESTHASHCODE_ISSET_ID, value); - } - - public int getDataType() { - return this.dataType; - } - - public void setDataType(int dataType) { - this.dataType = dataType; - setDataTypeIsSet(true); - } - - public void unsetDataType() { - __isset_bit_vector.clear(__DATATYPE_ISSET_ID); - } - - /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataType() { - return __isset_bit_vector.get(__DATATYPE_ISSET_ID); - } - - public void setDataTypeIsSet(boolean value) { - __isset_bit_vector.set(__DATATYPE_ISSET_ID, value); - } - - public long getDataTime() { - return this.dataTime; - } - - public void setDataTime(long dataTime) { - this.dataTime = dataTime; - setDataTimeIsSet(true); - } - - public void unsetDataTime() { - __isset_bit_vector.clear(__DATATIME_ISSET_ID); - } - - /** Returns true if field dataTime is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTime() { - return __isset_bit_vector.get(__DATATIME_ISSET_ID); - } - - public void setDataTimeIsSet(boolean value) { - __isset_bit_vector.set(__DATATIME_ISSET_ID, value); - } - - public long getThreadCPUTime() { - return this.threadCPUTime; - } - - public void setThreadCPUTime(long threadCPUTime) { - this.threadCPUTime = threadCPUTime; - setThreadCPUTimeIsSet(true); - } - - public void unsetThreadCPUTime() { - __isset_bit_vector.clear(__THREADCPUTIME_ISSET_ID); - } - - /** Returns true if field threadCPUTime is set (has been assigned a value) and false otherwise */ - public boolean isSetThreadCPUTime() { - return __isset_bit_vector.get(__THREADCPUTIME_ISSET_ID); - } - - public void setThreadCPUTimeIsSet(boolean value) { - __isset_bit_vector.set(__THREADCPUTIME_ISSET_ID, value); - } - - public long getThreadUserTime() { - return this.threadUserTime; - } - - public void setThreadUserTime(long threadUserTime) { - this.threadUserTime = threadUserTime; - setThreadUserTimeIsSet(true); - } - - public void unsetThreadUserTime() { - __isset_bit_vector.clear(__THREADUSERTIME_ISSET_ID); - } - - /** Returns true if field threadUserTime is set (has been assigned a value) and false otherwise */ - public boolean isSetThreadUserTime() { - return __isset_bit_vector.get(__THREADUSERTIME_ISSET_ID); - } - - public void setThreadUserTimeIsSet(boolean value) { - __isset_bit_vector.set(__THREADUSERTIME_ISSET_ID, value); - } - - public String getRequestID() { - return this.requestID; - } - - public void setRequestID(String requestID) { - this.requestID = requestID; - } - - public void unsetRequestID() { - this.requestID = null; - } - - /** Returns true if field requestID is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestID() { - return this.requestID != null; - } - - public void setRequestIDIsSet(boolean value) { - if (!value) { - this.requestID = null; - } - } - - public String getRequestURL() { - return this.requestURL; - } - - public void setRequestURL(String requestURL) { - this.requestURL = requestURL; - } - - public void unsetRequestURL() { - this.requestURL = null; - } - - /** Returns true if field requestURL is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestURL() { - return this.requestURL != null; - } - - public void setRequestURLIsSet(boolean value) { - if (!value) { - this.requestURL = null; - } - } - - public String getClientIP() { - return this.clientIP; - } - - public void setClientIP(String clientIP) { - this.clientIP = clientIP; - } - - public void unsetClientIP() { - this.clientIP = null; - } - - /** Returns true if field clientIP is set (has been assigned a value) and false otherwise */ - public boolean isSetClientIP() { - return this.clientIP != null; - } - - public void setClientIPIsSet(boolean value) { - if (!value) { - this.clientIP = null; - } - } - - public String getExtraData1() { - return this.extraData1; - } - - public void setExtraData1(String extraData1) { - this.extraData1 = extraData1; - } - - public void unsetExtraData1() { - this.extraData1 = null; - } - - /** Returns true if field extraData1 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraData1() { - return this.extraData1 != null; - } - - public void setExtraData1IsSet(boolean value) { - if (!value) { - this.extraData1 = null; - } - } - - public String getExtraData2() { - return this.extraData2; - } - - public void setExtraData2(String extraData2) { - this.extraData2 = extraData2; - } - - public void unsetExtraData2() { - this.extraData2 = null; - } - - /** Returns true if field extraData2 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraData2() { - return this.extraData2 != null; - } - - public void setExtraData2IsSet(boolean value) { - if (!value) { - this.extraData2 = null; - } - } - - public String getExtraData3() { - return this.extraData3; - } - - public void setExtraData3(String extraData3) { - this.extraData3 = extraData3; - } - - public void unsetExtraData3() { - this.extraData3 = null; - } - - /** Returns true if field extraData3 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraData3() { - return this.extraData3 != null; - } - - public void setExtraData3IsSet(boolean value) { - if (!value) { - this.extraData3 = null; - } - } - - public int getExtraInt1() { - return this.extraInt1; - } - - public void setExtraInt1(int extraInt1) { - this.extraInt1 = extraInt1; - setExtraInt1IsSet(true); - } - - public void unsetExtraInt1() { - __isset_bit_vector.clear(__EXTRAINT1_ISSET_ID); - } - - /** Returns true if field extraInt1 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraInt1() { - return __isset_bit_vector.get(__EXTRAINT1_ISSET_ID); - } - - public void setExtraInt1IsSet(boolean value) { - __isset_bit_vector.set(__EXTRAINT1_ISSET_ID, value); - } - - public int getExtraInt2() { - return this.extraInt2; - } - - public void setExtraInt2(int extraInt2) { - this.extraInt2 = extraInt2; - setExtraInt2IsSet(true); - } - - public void unsetExtraInt2() { - __isset_bit_vector.clear(__EXTRAINT2_ISSET_ID); - } - - /** Returns true if field extraInt2 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraInt2() { - return __isset_bit_vector.get(__EXTRAINT2_ISSET_ID); - } - - public void setExtraInt2IsSet(boolean value) { - __isset_bit_vector.set(__EXTRAINT2_ISSET_ID, value); - } - - public int getExtraInt3() { - return this.extraInt3; - } - - public void setExtraInt3(int extraInt3) { - this.extraInt3 = extraInt3; - setExtraInt3IsSet(true); - } - - public void unsetExtraInt3() { - __isset_bit_vector.clear(__EXTRAINT3_ISSET_ID); - } - - /** Returns true if field extraInt3 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraInt3() { - return __isset_bit_vector.get(__EXTRAINT3_ISSET_ID); - } - - public void setExtraInt3IsSet(boolean value) { - __isset_bit_vector.set(__EXTRAINT3_ISSET_ID, value); - } - - public long getExtraLong1() { - return this.extraLong1; - } - - public void setExtraLong1(long extraLong1) { - this.extraLong1 = extraLong1; - setExtraLong1IsSet(true); - } - - public void unsetExtraLong1() { - __isset_bit_vector.clear(__EXTRALONG1_ISSET_ID); - } - - /** Returns true if field extraLong1 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraLong1() { - return __isset_bit_vector.get(__EXTRALONG1_ISSET_ID); - } - - public void setExtraLong1IsSet(boolean value) { - __isset_bit_vector.set(__EXTRALONG1_ISSET_ID, value); - } - - public long getExtraLong2() { - return this.extraLong2; - } - - public void setExtraLong2(long extraLong2) { - this.extraLong2 = extraLong2; - setExtraLong2IsSet(true); - } - - public void unsetExtraLong2() { - __isset_bit_vector.clear(__EXTRALONG2_ISSET_ID); - } - - /** Returns true if field extraLong2 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraLong2() { - return __isset_bit_vector.get(__EXTRALONG2_ISSET_ID); - } - - public void setExtraLong2IsSet(boolean value) { - __isset_bit_vector.set(__EXTRALONG2_ISSET_ID, value); - } - - public long getExtraLong3() { - return this.extraLong3; - } - - public void setExtraLong3(long extraLong3) { - this.extraLong3 = extraLong3; - setExtraLong3IsSet(true); - } - - public void unsetExtraLong3() { - __isset_bit_vector.clear(__EXTRALONG3_ISSET_ID); - } - - /** Returns true if field extraLong3 is set (has been assigned a value) and false otherwise */ - public boolean isSetExtraLong3() { - return __isset_bit_vector.get(__EXTRALONG3_ISSET_ID); - } - - public void setExtraLong3IsSet(boolean value) { - __isset_bit_vector.set(__EXTRALONG3_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case REQUEST_HASH_CODE: - if (value == null) { - unsetRequestHashCode(); - } else { - setRequestHashCode((Integer)value); - } - break; - - case DATA_TYPE: - if (value == null) { - unsetDataType(); - } else { - setDataType((Integer)value); - } - break; - - case DATA_TIME: - if (value == null) { - unsetDataTime(); - } else { - setDataTime((Long)value); - } - break; - - case THREAD_CPUTIME: - if (value == null) { - unsetThreadCPUTime(); - } else { - setThreadCPUTime((Long)value); - } - break; - - case THREAD_USER_TIME: - if (value == null) { - unsetThreadUserTime(); - } else { - setThreadUserTime((Long)value); - } - break; - - case REQUEST_ID: - if (value == null) { - unsetRequestID(); - } else { - setRequestID((String)value); - } - break; - - case REQUEST_URL: - if (value == null) { - unsetRequestURL(); - } else { - setRequestURL((String)value); - } - break; - - case CLIENT_IP: - if (value == null) { - unsetClientIP(); - } else { - setClientIP((String)value); - } - break; - - case EXTRA_DATA1: - if (value == null) { - unsetExtraData1(); - } else { - setExtraData1((String)value); - } - break; - - case EXTRA_DATA2: - if (value == null) { - unsetExtraData2(); - } else { - setExtraData2((String)value); - } - break; - - case EXTRA_DATA3: - if (value == null) { - unsetExtraData3(); - } else { - setExtraData3((String)value); - } - break; - - case EXTRA_INT1: - if (value == null) { - unsetExtraInt1(); - } else { - setExtraInt1((Integer)value); - } - break; - - case EXTRA_INT2: - if (value == null) { - unsetExtraInt2(); - } else { - setExtraInt2((Integer)value); - } - break; - - case EXTRA_INT3: - if (value == null) { - unsetExtraInt3(); - } else { - setExtraInt3((Integer)value); - } - break; - - case EXTRA_LONG1: - if (value == null) { - unsetExtraLong1(); - } else { - setExtraLong1((Long)value); - } - break; - - case EXTRA_LONG2: - if (value == null) { - unsetExtraLong2(); - } else { - setExtraLong2((Long)value); - } - break; - - case EXTRA_LONG3: - if (value == null) { - unsetExtraLong3(); - } else { - setExtraLong3((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case REQUEST_HASH_CODE: - return Integer.valueOf(getRequestHashCode()); - - case DATA_TYPE: - return Integer.valueOf(getDataType()); - - case DATA_TIME: - return Long.valueOf(getDataTime()); - - case THREAD_CPUTIME: - return Long.valueOf(getThreadCPUTime()); - - case THREAD_USER_TIME: - return Long.valueOf(getThreadUserTime()); - - case REQUEST_ID: - return getRequestID(); - - case REQUEST_URL: - return getRequestURL(); - - case CLIENT_IP: - return getClientIP(); - - case EXTRA_DATA1: - return getExtraData1(); - - case EXTRA_DATA2: - return getExtraData2(); - - case EXTRA_DATA3: - return getExtraData3(); - - case EXTRA_INT1: - return Integer.valueOf(getExtraInt1()); - - case EXTRA_INT2: - return Integer.valueOf(getExtraInt2()); - - case EXTRA_INT3: - return Integer.valueOf(getExtraInt3()); - - case EXTRA_LONG1: - return Long.valueOf(getExtraLong1()); - - case EXTRA_LONG2: - return Long.valueOf(getExtraLong2()); - - case EXTRA_LONG3: - return Long.valueOf(getExtraLong3()); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case REQUEST_HASH_CODE: - return isSetRequestHashCode(); - case DATA_TYPE: - return isSetDataType(); - case DATA_TIME: - return isSetDataTime(); - case THREAD_CPUTIME: - return isSetThreadCPUTime(); - case THREAD_USER_TIME: - return isSetThreadUserTime(); - case REQUEST_ID: - return isSetRequestID(); - case REQUEST_URL: - return isSetRequestURL(); - case CLIENT_IP: - return isSetClientIP(); - case EXTRA_DATA1: - return isSetExtraData1(); - case EXTRA_DATA2: - return isSetExtraData2(); - case EXTRA_DATA3: - return isSetExtraData3(); - case EXTRA_INT1: - return isSetExtraInt1(); - case EXTRA_INT2: - return isSetExtraInt2(); - case EXTRA_INT3: - return isSetExtraInt3(); - case EXTRA_LONG1: - return isSetExtraLong1(); - case EXTRA_LONG2: - return isSetExtraLong2(); - case EXTRA_LONG3: - return isSetExtraLong3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof RequestThriftDTO) - return this.equals((RequestThriftDTO)that); - return false; - } - - public boolean equals(RequestThriftDTO that) { - if (that == null) - return false; - - 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_requestHashCode = true; - boolean that_present_requestHashCode = true; - if (this_present_requestHashCode || that_present_requestHashCode) { - if (!(this_present_requestHashCode && that_present_requestHashCode)) - return false; - if (this.requestHashCode != that.requestHashCode) - return false; - } - - boolean this_present_dataType = true; - boolean that_present_dataType = true; - if (this_present_dataType || that_present_dataType) { - if (!(this_present_dataType && that_present_dataType)) - return false; - if (this.dataType != that.dataType) - return false; - } - - boolean this_present_dataTime = true; - boolean that_present_dataTime = true; - if (this_present_dataTime || that_present_dataTime) { - if (!(this_present_dataTime && that_present_dataTime)) - return false; - if (this.dataTime != that.dataTime) - return false; - } - - boolean this_present_threadCPUTime = true; - boolean that_present_threadCPUTime = true; - if (this_present_threadCPUTime || that_present_threadCPUTime) { - if (!(this_present_threadCPUTime && that_present_threadCPUTime)) - return false; - if (this.threadCPUTime != that.threadCPUTime) - return false; - } - - boolean this_present_threadUserTime = true; - boolean that_present_threadUserTime = true; - if (this_present_threadUserTime || that_present_threadUserTime) { - if (!(this_present_threadUserTime && that_present_threadUserTime)) - return false; - if (this.threadUserTime != that.threadUserTime) - return false; - } - - boolean this_present_requestID = true && this.isSetRequestID(); - boolean that_present_requestID = true && that.isSetRequestID(); - if (this_present_requestID || that_present_requestID) { - if (!(this_present_requestID && that_present_requestID)) - return false; - if (!this.requestID.equals(that.requestID)) - return false; - } - - boolean this_present_requestURL = true && this.isSetRequestURL(); - boolean that_present_requestURL = true && that.isSetRequestURL(); - if (this_present_requestURL || that_present_requestURL) { - if (!(this_present_requestURL && that_present_requestURL)) - return false; - if (!this.requestURL.equals(that.requestURL)) - return false; - } - - boolean this_present_clientIP = true && this.isSetClientIP(); - boolean that_present_clientIP = true && that.isSetClientIP(); - if (this_present_clientIP || that_present_clientIP) { - if (!(this_present_clientIP && that_present_clientIP)) - return false; - if (!this.clientIP.equals(that.clientIP)) - return false; - } - - boolean this_present_extraData1 = true && this.isSetExtraData1(); - boolean that_present_extraData1 = true && that.isSetExtraData1(); - if (this_present_extraData1 || that_present_extraData1) { - if (!(this_present_extraData1 && that_present_extraData1)) - return false; - if (!this.extraData1.equals(that.extraData1)) - return false; - } - - boolean this_present_extraData2 = true && this.isSetExtraData2(); - boolean that_present_extraData2 = true && that.isSetExtraData2(); - if (this_present_extraData2 || that_present_extraData2) { - if (!(this_present_extraData2 && that_present_extraData2)) - return false; - if (!this.extraData2.equals(that.extraData2)) - return false; - } - - boolean this_present_extraData3 = true && this.isSetExtraData3(); - boolean that_present_extraData3 = true && that.isSetExtraData3(); - if (this_present_extraData3 || that_present_extraData3) { - if (!(this_present_extraData3 && that_present_extraData3)) - return false; - if (!this.extraData3.equals(that.extraData3)) - return false; - } - - boolean this_present_extraInt1 = true && this.isSetExtraInt1(); - boolean that_present_extraInt1 = true && that.isSetExtraInt1(); - if (this_present_extraInt1 || that_present_extraInt1) { - if (!(this_present_extraInt1 && that_present_extraInt1)) - return false; - if (this.extraInt1 != that.extraInt1) - return false; - } - - boolean this_present_extraInt2 = true && this.isSetExtraInt2(); - boolean that_present_extraInt2 = true && that.isSetExtraInt2(); - if (this_present_extraInt2 || that_present_extraInt2) { - if (!(this_present_extraInt2 && that_present_extraInt2)) - return false; - if (this.extraInt2 != that.extraInt2) - return false; - } - - boolean this_present_extraInt3 = true && this.isSetExtraInt3(); - boolean that_present_extraInt3 = true && that.isSetExtraInt3(); - if (this_present_extraInt3 || that_present_extraInt3) { - if (!(this_present_extraInt3 && that_present_extraInt3)) - return false; - if (this.extraInt3 != that.extraInt3) - return false; - } - - boolean this_present_extraLong1 = true && this.isSetExtraLong1(); - boolean that_present_extraLong1 = true && that.isSetExtraLong1(); - if (this_present_extraLong1 || that_present_extraLong1) { - if (!(this_present_extraLong1 && that_present_extraLong1)) - return false; - if (this.extraLong1 != that.extraLong1) - return false; - } - - boolean this_present_extraLong2 = true && this.isSetExtraLong2(); - boolean that_present_extraLong2 = true && that.isSetExtraLong2(); - if (this_present_extraLong2 || that_present_extraLong2) { - if (!(this_present_extraLong2 && that_present_extraLong2)) - return false; - if (this.extraLong2 != that.extraLong2) - return false; - } - - boolean this_present_extraLong3 = true && this.isSetExtraLong3(); - boolean that_present_extraLong3 = true && that.isSetExtraLong3(); - if (this_present_extraLong3 || that_present_extraLong3) { - if (!(this_present_extraLong3 && that_present_extraLong3)) - return false; - if (this.extraLong3 != that.extraLong3) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(RequestThriftDTO other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - RequestThriftDTO typedOther = (RequestThriftDTO)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRequestHashCode()).compareTo(typedOther.isSetRequestHashCode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestHashCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestHashCode, typedOther.requestHashCode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataType()).compareTo(typedOther.isSetDataType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, typedOther.dataType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataTime()).compareTo(typedOther.isSetDataTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTime, typedOther.dataTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetThreadCPUTime()).compareTo(typedOther.isSetThreadCPUTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetThreadCPUTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadCPUTime, typedOther.threadCPUTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetThreadUserTime()).compareTo(typedOther.isSetThreadUserTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetThreadUserTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadUserTime, typedOther.threadUserTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRequestID()).compareTo(typedOther.isSetRequestID()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestID()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestID, typedOther.requestID); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRequestURL()).compareTo(typedOther.isSetRequestURL()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestURL()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestURL, typedOther.requestURL); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetClientIP()).compareTo(typedOther.isSetClientIP()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetClientIP()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientIP, typedOther.clientIP); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraData1()).compareTo(typedOther.isSetExtraData1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraData1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData1, typedOther.extraData1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraData2()).compareTo(typedOther.isSetExtraData2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraData2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData2, typedOther.extraData2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraData3()).compareTo(typedOther.isSetExtraData3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraData3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData3, typedOther.extraData3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraInt1()).compareTo(typedOther.isSetExtraInt1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraInt1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt1, typedOther.extraInt1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraInt2()).compareTo(typedOther.isSetExtraInt2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraInt2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt2, typedOther.extraInt2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraInt3()).compareTo(typedOther.isSetExtraInt3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraInt3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt3, typedOther.extraInt3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraLong1()).compareTo(typedOther.isSetExtraLong1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraLong1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong1, typedOther.extraLong1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraLong2()).compareTo(typedOther.isSetExtraLong2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraLong2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong2, typedOther.extraLong2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExtraLong3()).compareTo(typedOther.isSetExtraLong3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtraLong3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong3, typedOther.extraLong3); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("RequestThriftDTO("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("requestHashCode:"); - sb.append(this.requestHashCode); - first = false; - if (!first) sb.append(", "); - sb.append("dataType:"); - sb.append(this.dataType); - first = false; - if (!first) sb.append(", "); - sb.append("dataTime:"); - sb.append(this.dataTime); - first = false; - if (!first) sb.append(", "); - sb.append("threadCPUTime:"); - sb.append(this.threadCPUTime); - first = false; - if (!first) sb.append(", "); - sb.append("threadUserTime:"); - sb.append(this.threadUserTime); - first = false; - if (isSetRequestID()) { - if (!first) sb.append(", "); - sb.append("requestID:"); - if (this.requestID == null) { - sb.append("null"); - } else { - sb.append(this.requestID); - } - first = false; - } - if (isSetRequestURL()) { - if (!first) sb.append(", "); - sb.append("requestURL:"); - if (this.requestURL == null) { - sb.append("null"); - } else { - sb.append(this.requestURL); - } - first = false; - } - if (isSetClientIP()) { - if (!first) sb.append(", "); - sb.append("clientIP:"); - if (this.clientIP == null) { - sb.append("null"); - } else { - sb.append(this.clientIP); - } - first = false; - } - if (isSetExtraData1()) { - if (!first) sb.append(", "); - sb.append("extraData1:"); - if (this.extraData1 == null) { - sb.append("null"); - } else { - sb.append(this.extraData1); - } - first = false; - } - if (isSetExtraData2()) { - if (!first) sb.append(", "); - sb.append("extraData2:"); - if (this.extraData2 == null) { - sb.append("null"); - } else { - sb.append(this.extraData2); - } - first = false; - } - if (isSetExtraData3()) { - if (!first) sb.append(", "); - sb.append("extraData3:"); - if (this.extraData3 == null) { - sb.append("null"); - } else { - sb.append(this.extraData3); - } - first = false; - } - if (isSetExtraInt1()) { - if (!first) sb.append(", "); - sb.append("extraInt1:"); - sb.append(this.extraInt1); - first = false; - } - if (isSetExtraInt2()) { - if (!first) sb.append(", "); - sb.append("extraInt2:"); - sb.append(this.extraInt2); - first = false; - } - if (isSetExtraInt3()) { - if (!first) sb.append(", "); - sb.append("extraInt3:"); - sb.append(this.extraInt3); - first = false; - } - if (isSetExtraLong1()) { - if (!first) sb.append(", "); - sb.append("extraLong1:"); - sb.append(this.extraLong1); - first = false; - } - if (isSetExtraLong2()) { - if (!first) sb.append(", "); - sb.append("extraLong2:"); - sb.append(this.extraLong2); - first = false; - } - if (isSetExtraLong3()) { - if (!first) sb.append(", "); - sb.append("extraLong3:"); - sb.append(this.extraLong3); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 RequestThriftDTOStandardSchemeFactory implements SchemeFactory { - public RequestThriftDTOStandardScheme getScheme() { - return new RequestThriftDTOStandardScheme(); - } - } - - private static class RequestThriftDTOStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, RequestThriftDTO 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: // REQUEST_HASH_CODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.requestHashCode = iprot.readI32(); - struct.setRequestHashCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATA_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.dataTime = iprot.readI64(); - struct.setDataTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // THREAD_CPUTIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.threadCPUTime = iprot.readI64(); - struct.setThreadCPUTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // THREAD_USER_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.threadUserTime = iprot.readI64(); - struct.setThreadUserTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // REQUEST_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.requestID = iprot.readString(); - struct.setRequestIDIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // REQUEST_URL - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.requestURL = iprot.readString(); - struct.setRequestURLIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // CLIENT_IP - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.clientIP = iprot.readString(); - struct.setClientIPIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // EXTRA_DATA1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.extraData1 = iprot.readString(); - struct.setExtraData1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // EXTRA_DATA2 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.extraData2 = iprot.readString(); - struct.setExtraData2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // EXTRA_DATA3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.extraData3 = iprot.readString(); - struct.setExtraData3IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // EXTRA_INT1 - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.extraInt1 = iprot.readI32(); - struct.setExtraInt1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 14: // EXTRA_INT2 - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.extraInt2 = iprot.readI32(); - struct.setExtraInt2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // EXTRA_INT3 - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.extraInt3 = iprot.readI32(); - struct.setExtraInt3IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 16: // EXTRA_LONG1 - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.extraLong1 = iprot.readI64(); - struct.setExtraLong1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 17: // EXTRA_LONG2 - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.extraLong2 = iprot.readI64(); - struct.setExtraLong2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 18: // EXTRA_LONG3 - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.extraLong3 = iprot.readI64(); - struct.setExtraLong3IsSet(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, RequestThriftDTO struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(REQUEST_HASH_CODE_FIELD_DESC); - oprot.writeI32(struct.requestHashCode); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); - oprot.writeI32(struct.dataType); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DATA_TIME_FIELD_DESC); - oprot.writeI64(struct.dataTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(THREAD_CPUTIME_FIELD_DESC); - oprot.writeI64(struct.threadCPUTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(THREAD_USER_TIME_FIELD_DESC); - oprot.writeI64(struct.threadUserTime); - oprot.writeFieldEnd(); - if (struct.requestID != null) { - if (struct.isSetRequestID()) { - oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC); - oprot.writeString(struct.requestID); - oprot.writeFieldEnd(); - } - } - if (struct.requestURL != null) { - if (struct.isSetRequestURL()) { - oprot.writeFieldBegin(REQUEST_URL_FIELD_DESC); - oprot.writeString(struct.requestURL); - oprot.writeFieldEnd(); - } - } - if (struct.clientIP != null) { - if (struct.isSetClientIP()) { - oprot.writeFieldBegin(CLIENT_IP_FIELD_DESC); - oprot.writeString(struct.clientIP); - oprot.writeFieldEnd(); - } - } - if (struct.extraData1 != null) { - if (struct.isSetExtraData1()) { - oprot.writeFieldBegin(EXTRA_DATA1_FIELD_DESC); - oprot.writeString(struct.extraData1); - oprot.writeFieldEnd(); - } - } - if (struct.extraData2 != null) { - if (struct.isSetExtraData2()) { - oprot.writeFieldBegin(EXTRA_DATA2_FIELD_DESC); - oprot.writeString(struct.extraData2); - oprot.writeFieldEnd(); - } - } - if (struct.extraData3 != null) { - if (struct.isSetExtraData3()) { - oprot.writeFieldBegin(EXTRA_DATA3_FIELD_DESC); - oprot.writeString(struct.extraData3); - oprot.writeFieldEnd(); - } - } - if (struct.isSetExtraInt1()) { - oprot.writeFieldBegin(EXTRA_INT1_FIELD_DESC); - oprot.writeI32(struct.extraInt1); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraInt2()) { - oprot.writeFieldBegin(EXTRA_INT2_FIELD_DESC); - oprot.writeI32(struct.extraInt2); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraInt3()) { - oprot.writeFieldBegin(EXTRA_INT3_FIELD_DESC); - oprot.writeI32(struct.extraInt3); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraLong1()) { - oprot.writeFieldBegin(EXTRA_LONG1_FIELD_DESC); - oprot.writeI64(struct.extraLong1); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraLong2()) { - oprot.writeFieldBegin(EXTRA_LONG2_FIELD_DESC); - oprot.writeI64(struct.extraLong2); - oprot.writeFieldEnd(); - } - if (struct.isSetExtraLong3()) { - oprot.writeFieldBegin(EXTRA_LONG3_FIELD_DESC); - oprot.writeI64(struct.extraLong3); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class RequestThriftDTOTupleSchemeFactory implements SchemeFactory { - public RequestThriftDTOTupleScheme getScheme() { - return new RequestThriftDTOTupleScheme(); - } - } - - private static class RequestThriftDTOTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RequestThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetRequestHashCode()) { - optionals.set(1); - } - if (struct.isSetDataType()) { - optionals.set(2); - } - if (struct.isSetDataTime()) { - optionals.set(3); - } - if (struct.isSetThreadCPUTime()) { - optionals.set(4); - } - if (struct.isSetThreadUserTime()) { - optionals.set(5); - } - if (struct.isSetRequestID()) { - optionals.set(6); - } - if (struct.isSetRequestURL()) { - optionals.set(7); - } - if (struct.isSetClientIP()) { - optionals.set(8); - } - if (struct.isSetExtraData1()) { - optionals.set(9); - } - if (struct.isSetExtraData2()) { - optionals.set(10); - } - if (struct.isSetExtraData3()) { - optionals.set(11); - } - if (struct.isSetExtraInt1()) { - optionals.set(12); - } - if (struct.isSetExtraInt2()) { - optionals.set(13); - } - if (struct.isSetExtraInt3()) { - optionals.set(14); - } - if (struct.isSetExtraLong1()) { - optionals.set(15); - } - if (struct.isSetExtraLong2()) { - optionals.set(16); - } - if (struct.isSetExtraLong3()) { - optionals.set(17); - } - oprot.writeBitSet(optionals, 18); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetRequestHashCode()) { - oprot.writeI32(struct.requestHashCode); - } - if (struct.isSetDataType()) { - oprot.writeI32(struct.dataType); - } - if (struct.isSetDataTime()) { - oprot.writeI64(struct.dataTime); - } - if (struct.isSetThreadCPUTime()) { - oprot.writeI64(struct.threadCPUTime); - } - if (struct.isSetThreadUserTime()) { - oprot.writeI64(struct.threadUserTime); - } - if (struct.isSetRequestID()) { - oprot.writeString(struct.requestID); - } - if (struct.isSetRequestURL()) { - oprot.writeString(struct.requestURL); - } - if (struct.isSetClientIP()) { - oprot.writeString(struct.clientIP); - } - if (struct.isSetExtraData1()) { - oprot.writeString(struct.extraData1); - } - if (struct.isSetExtraData2()) { - oprot.writeString(struct.extraData2); - } - if (struct.isSetExtraData3()) { - oprot.writeString(struct.extraData3); - } - if (struct.isSetExtraInt1()) { - oprot.writeI32(struct.extraInt1); - } - if (struct.isSetExtraInt2()) { - oprot.writeI32(struct.extraInt2); - } - if (struct.isSetExtraInt3()) { - oprot.writeI32(struct.extraInt3); - } - if (struct.isSetExtraLong1()) { - oprot.writeI64(struct.extraLong1); - } - if (struct.isSetExtraLong2()) { - oprot.writeI64(struct.extraLong2); - } - if (struct.isSetExtraLong3()) { - oprot.writeI64(struct.extraLong3); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, RequestThriftDTO struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(18); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.requestHashCode = iprot.readI32(); - struct.setRequestHashCodeIsSet(true); - } - if (incoming.get(2)) { - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - } - if (incoming.get(3)) { - struct.dataTime = iprot.readI64(); - struct.setDataTimeIsSet(true); - } - if (incoming.get(4)) { - struct.threadCPUTime = iprot.readI64(); - struct.setThreadCPUTimeIsSet(true); - } - if (incoming.get(5)) { - struct.threadUserTime = iprot.readI64(); - struct.setThreadUserTimeIsSet(true); - } - if (incoming.get(6)) { - struct.requestID = iprot.readString(); - struct.setRequestIDIsSet(true); - } - if (incoming.get(7)) { - struct.requestURL = iprot.readString(); - struct.setRequestURLIsSet(true); - } - if (incoming.get(8)) { - struct.clientIP = iprot.readString(); - struct.setClientIPIsSet(true); - } - if (incoming.get(9)) { - struct.extraData1 = iprot.readString(); - struct.setExtraData1IsSet(true); - } - if (incoming.get(10)) { - struct.extraData2 = iprot.readString(); - struct.setExtraData2IsSet(true); - } - if (incoming.get(11)) { - struct.extraData3 = iprot.readString(); - struct.setExtraData3IsSet(true); - } - if (incoming.get(12)) { - struct.extraInt1 = iprot.readI32(); - struct.setExtraInt1IsSet(true); - } - if (incoming.get(13)) { - struct.extraInt2 = iprot.readI32(); - struct.setExtraInt2IsSet(true); - } - if (incoming.get(14)) { - struct.extraInt3 = iprot.readI32(); - struct.setExtraInt3IsSet(true); - } - if (incoming.get(15)) { - struct.extraLong1 = iprot.readI64(); - struct.setExtraLong1IsSet(true); - } - if (incoming.get(16)) { - struct.extraLong2 = iprot.readI64(); - struct.setExtraLong2IsSet(true); - } - if (incoming.get(17)) { - struct.extraLong3 = iprot.readI64(); - struct.setExtraLong3IsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RequestThriftDTO implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestThriftDTO"); + + 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 REQUEST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHashCode", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField THREAD_CPUTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("threadCPUTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField THREAD_USER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("threadUserTime", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("requestID", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField REQUEST_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("requestURL", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField CLIENT_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("clientIP", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField EXTRA_DATA1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData1", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField EXTRA_DATA2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData2", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField EXTRA_DATA3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraData3", org.apache.thrift.protocol.TType.STRING, (short)12); + private static final org.apache.thrift.protocol.TField EXTRA_INT1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt1", org.apache.thrift.protocol.TType.I32, (short)13); + private static final org.apache.thrift.protocol.TField EXTRA_INT2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt2", org.apache.thrift.protocol.TType.I32, (short)14); + private static final org.apache.thrift.protocol.TField EXTRA_INT3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraInt3", org.apache.thrift.protocol.TType.I32, (short)15); + private static final org.apache.thrift.protocol.TField EXTRA_LONG1_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong1", org.apache.thrift.protocol.TType.I64, (short)16); + private static final org.apache.thrift.protocol.TField EXTRA_LONG2_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong2", org.apache.thrift.protocol.TType.I64, (short)17); + private static final org.apache.thrift.protocol.TField EXTRA_LONG3_FIELD_DESC = new org.apache.thrift.protocol.TField("extraLong3", org.apache.thrift.protocol.TType.I64, (short)18); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RequestThriftDTOStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RequestThriftDTOTupleSchemeFactory()); + } + + private String agentId; // required + private int requestHashCode; // required + private int dataType; // required + private long dataTime; // required + private long threadCPUTime; // required + private long threadUserTime; // required + private String requestID; // optional + private String requestURL; // optional + private String clientIP; // optional + private String extraData1; // optional + private String extraData2; // optional + private String extraData3; // optional + private int extraInt1; // optional + private int extraInt2; // optional + private int extraInt3; // optional + private long extraLong1; // optional + private long extraLong2; // optional + private long extraLong3; // 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"), + REQUEST_HASH_CODE((short)2, "requestHashCode"), + DATA_TYPE((short)3, "dataType"), + DATA_TIME((short)4, "dataTime"), + THREAD_CPUTIME((short)5, "threadCPUTime"), + THREAD_USER_TIME((short)6, "threadUserTime"), + REQUEST_ID((short)7, "requestID"), + REQUEST_URL((short)8, "requestURL"), + CLIENT_IP((short)9, "clientIP"), + EXTRA_DATA1((short)10, "extraData1"), + EXTRA_DATA2((short)11, "extraData2"), + EXTRA_DATA3((short)12, "extraData3"), + EXTRA_INT1((short)13, "extraInt1"), + EXTRA_INT2((short)14, "extraInt2"), + EXTRA_INT3((short)15, "extraInt3"), + EXTRA_LONG1((short)16, "extraLong1"), + EXTRA_LONG2((short)17, "extraLong2"), + EXTRA_LONG3((short)18, "extraLong3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // REQUEST_HASH_CODE + return REQUEST_HASH_CODE; + case 3: // DATA_TYPE + return DATA_TYPE; + case 4: // DATA_TIME + return DATA_TIME; + case 5: // THREAD_CPUTIME + return THREAD_CPUTIME; + case 6: // THREAD_USER_TIME + return THREAD_USER_TIME; + case 7: // REQUEST_ID + return REQUEST_ID; + case 8: // REQUEST_URL + return REQUEST_URL; + case 9: // CLIENT_IP + return CLIENT_IP; + case 10: // EXTRA_DATA1 + return EXTRA_DATA1; + case 11: // EXTRA_DATA2 + return EXTRA_DATA2; + case 12: // EXTRA_DATA3 + return EXTRA_DATA3; + case 13: // EXTRA_INT1 + return EXTRA_INT1; + case 14: // EXTRA_INT2 + return EXTRA_INT2; + case 15: // EXTRA_INT3 + return EXTRA_INT3; + case 16: // EXTRA_LONG1 + return EXTRA_LONG1; + case 17: // EXTRA_LONG2 + return EXTRA_LONG2; + case 18: // EXTRA_LONG3 + return EXTRA_LONG3; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __REQUESTHASHCODE_ISSET_ID = 0; + private static final int __DATATYPE_ISSET_ID = 1; + private static final int __DATATIME_ISSET_ID = 2; + private static final int __THREADCPUTIME_ISSET_ID = 3; + private static final int __THREADUSERTIME_ISSET_ID = 4; + private static final int __EXTRAINT1_ISSET_ID = 5; + private static final int __EXTRAINT2_ISSET_ID = 6; + private static final int __EXTRAINT3_ISSET_ID = 7; + private static final int __EXTRALONG1_ISSET_ID = 8; + private static final int __EXTRALONG2_ISSET_ID = 9; + private static final int __EXTRALONG3_ISSET_ID = 10; + private short __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.REQUEST_ID,_Fields.REQUEST_URL,_Fields.CLIENT_IP,_Fields.EXTRA_DATA1,_Fields.EXTRA_DATA2,_Fields.EXTRA_DATA3,_Fields.EXTRA_INT1,_Fields.EXTRA_INT2,_Fields.EXTRA_INT3,_Fields.EXTRA_LONG1,_Fields.EXTRA_LONG2,_Fields.EXTRA_LONG3}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REQUEST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("requestHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.THREAD_CPUTIME, new org.apache.thrift.meta_data.FieldMetaData("threadCPUTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.THREAD_USER_TIME, new org.apache.thrift.meta_data.FieldMetaData("threadUserTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestID", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REQUEST_URL, new org.apache.thrift.meta_data.FieldMetaData("requestURL", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CLIENT_IP, new org.apache.thrift.meta_data.FieldMetaData("clientIP", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_DATA1, new org.apache.thrift.meta_data.FieldMetaData("extraData1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_DATA2, new org.apache.thrift.meta_data.FieldMetaData("extraData2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_DATA3, new org.apache.thrift.meta_data.FieldMetaData("extraData3", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXTRA_INT1, new org.apache.thrift.meta_data.FieldMetaData("extraInt1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXTRA_INT2, new org.apache.thrift.meta_data.FieldMetaData("extraInt2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXTRA_INT3, new org.apache.thrift.meta_data.FieldMetaData("extraInt3", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXTRA_LONG1, new org.apache.thrift.meta_data.FieldMetaData("extraLong1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.EXTRA_LONG2, new org.apache.thrift.meta_data.FieldMetaData("extraLong2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.EXTRA_LONG3, new org.apache.thrift.meta_data.FieldMetaData("extraLong3", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestThriftDTO.class, metaDataMap); + } + + public RequestThriftDTO() { + } + + public RequestThriftDTO( + String agentId, + int requestHashCode, + int dataType, + long dataTime, + long threadCPUTime, + long threadUserTime) + { + this(); + this.agentId = agentId; + this.requestHashCode = requestHashCode; + setRequestHashCodeIsSet(true); + this.dataType = dataType; + setDataTypeIsSet(true); + this.dataTime = dataTime; + setDataTimeIsSet(true); + this.threadCPUTime = threadCPUTime; + setThreadCPUTimeIsSet(true); + this.threadUserTime = threadUserTime; + setThreadUserTimeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public RequestThriftDTO(RequestThriftDTO other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + this.requestHashCode = other.requestHashCode; + this.dataType = other.dataType; + this.dataTime = other.dataTime; + this.threadCPUTime = other.threadCPUTime; + this.threadUserTime = other.threadUserTime; + if (other.isSetRequestID()) { + this.requestID = other.requestID; + } + if (other.isSetRequestURL()) { + this.requestURL = other.requestURL; + } + if (other.isSetClientIP()) { + this.clientIP = other.clientIP; + } + if (other.isSetExtraData1()) { + this.extraData1 = other.extraData1; + } + if (other.isSetExtraData2()) { + this.extraData2 = other.extraData2; + } + if (other.isSetExtraData3()) { + this.extraData3 = other.extraData3; + } + this.extraInt1 = other.extraInt1; + this.extraInt2 = other.extraInt2; + this.extraInt3 = other.extraInt3; + this.extraLong1 = other.extraLong1; + this.extraLong2 = other.extraLong2; + this.extraLong3 = other.extraLong3; + } + + public RequestThriftDTO deepCopy() { + return new RequestThriftDTO(this); + } + + @Override + public void clear() { + this.agentId = null; + setRequestHashCodeIsSet(false); + this.requestHashCode = 0; + setDataTypeIsSet(false); + this.dataType = 0; + setDataTimeIsSet(false); + this.dataTime = 0; + setThreadCPUTimeIsSet(false); + this.threadCPUTime = 0; + setThreadUserTimeIsSet(false); + this.threadUserTime = 0; + this.requestID = null; + this.requestURL = null; + this.clientIP = null; + this.extraData1 = null; + this.extraData2 = null; + this.extraData3 = null; + setExtraInt1IsSet(false); + this.extraInt1 = 0; + setExtraInt2IsSet(false); + this.extraInt2 = 0; + setExtraInt3IsSet(false); + this.extraInt3 = 0; + setExtraLong1IsSet(false); + this.extraLong1 = 0; + setExtraLong2IsSet(false); + this.extraLong2 = 0; + setExtraLong3IsSet(false); + this.extraLong3 = 0; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 int getRequestHashCode() { + return this.requestHashCode; + } + + public void setRequestHashCode(int requestHashCode) { + this.requestHashCode = requestHashCode; + setRequestHashCodeIsSet(true); + } + + public void unsetRequestHashCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTHASHCODE_ISSET_ID); + } + + /** Returns true if field requestHashCode is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestHashCode() { + return EncodingUtils.testBit(__isset_bitfield, __REQUESTHASHCODE_ISSET_ID); + } + + public void setRequestHashCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTHASHCODE_ISSET_ID, value); + } + + public int getDataType() { + return this.dataType; + } + + public void setDataType(int dataType) { + this.dataType = dataType; + setDataTypeIsSet(true); + } + + public void unsetDataType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ + public boolean isSetDataType() { + return EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + public void setDataTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value); + } + + public long getDataTime() { + return this.dataTime; + } + + public void setDataTime(long dataTime) { + this.dataTime = dataTime; + setDataTimeIsSet(true); + } + + public void unsetDataTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATATIME_ISSET_ID); + } + + /** Returns true if field dataTime is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTime() { + return EncodingUtils.testBit(__isset_bitfield, __DATATIME_ISSET_ID); + } + + public void setDataTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATATIME_ISSET_ID, value); + } + + public long getThreadCPUTime() { + return this.threadCPUTime; + } + + public void setThreadCPUTime(long threadCPUTime) { + this.threadCPUTime = threadCPUTime; + setThreadCPUTimeIsSet(true); + } + + public void unsetThreadCPUTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THREADCPUTIME_ISSET_ID); + } + + /** Returns true if field threadCPUTime is set (has been assigned a value) and false otherwise */ + public boolean isSetThreadCPUTime() { + return EncodingUtils.testBit(__isset_bitfield, __THREADCPUTIME_ISSET_ID); + } + + public void setThreadCPUTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THREADCPUTIME_ISSET_ID, value); + } + + public long getThreadUserTime() { + return this.threadUserTime; + } + + public void setThreadUserTime(long threadUserTime) { + this.threadUserTime = threadUserTime; + setThreadUserTimeIsSet(true); + } + + public void unsetThreadUserTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THREADUSERTIME_ISSET_ID); + } + + /** Returns true if field threadUserTime is set (has been assigned a value) and false otherwise */ + public boolean isSetThreadUserTime() { + return EncodingUtils.testBit(__isset_bitfield, __THREADUSERTIME_ISSET_ID); + } + + public void setThreadUserTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THREADUSERTIME_ISSET_ID, value); + } + + public String getRequestID() { + return this.requestID; + } + + public void setRequestID(String requestID) { + this.requestID = requestID; + } + + public void unsetRequestID() { + this.requestID = null; + } + + /** Returns true if field requestID is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestID() { + return this.requestID != null; + } + + public void setRequestIDIsSet(boolean value) { + if (!value) { + this.requestID = null; + } + } + + public String getRequestURL() { + return this.requestURL; + } + + public void setRequestURL(String requestURL) { + this.requestURL = requestURL; + } + + public void unsetRequestURL() { + this.requestURL = null; + } + + /** Returns true if field requestURL is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestURL() { + return this.requestURL != null; + } + + public void setRequestURLIsSet(boolean value) { + if (!value) { + this.requestURL = null; + } + } + + public String getClientIP() { + return this.clientIP; + } + + public void setClientIP(String clientIP) { + this.clientIP = clientIP; + } + + public void unsetClientIP() { + this.clientIP = null; + } + + /** Returns true if field clientIP is set (has been assigned a value) and false otherwise */ + public boolean isSetClientIP() { + return this.clientIP != null; + } + + public void setClientIPIsSet(boolean value) { + if (!value) { + this.clientIP = null; + } + } + + public String getExtraData1() { + return this.extraData1; + } + + public void setExtraData1(String extraData1) { + this.extraData1 = extraData1; + } + + public void unsetExtraData1() { + this.extraData1 = null; + } + + /** Returns true if field extraData1 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraData1() { + return this.extraData1 != null; + } + + public void setExtraData1IsSet(boolean value) { + if (!value) { + this.extraData1 = null; + } + } + + public String getExtraData2() { + return this.extraData2; + } + + public void setExtraData2(String extraData2) { + this.extraData2 = extraData2; + } + + public void unsetExtraData2() { + this.extraData2 = null; + } + + /** Returns true if field extraData2 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraData2() { + return this.extraData2 != null; + } + + public void setExtraData2IsSet(boolean value) { + if (!value) { + this.extraData2 = null; + } + } + + public String getExtraData3() { + return this.extraData3; + } + + public void setExtraData3(String extraData3) { + this.extraData3 = extraData3; + } + + public void unsetExtraData3() { + this.extraData3 = null; + } + + /** Returns true if field extraData3 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraData3() { + return this.extraData3 != null; + } + + public void setExtraData3IsSet(boolean value) { + if (!value) { + this.extraData3 = null; + } + } + + public int getExtraInt1() { + return this.extraInt1; + } + + public void setExtraInt1(int extraInt1) { + this.extraInt1 = extraInt1; + setExtraInt1IsSet(true); + } + + public void unsetExtraInt1() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRAINT1_ISSET_ID); + } + + /** Returns true if field extraInt1 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraInt1() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRAINT1_ISSET_ID); + } + + public void setExtraInt1IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRAINT1_ISSET_ID, value); + } + + public int getExtraInt2() { + return this.extraInt2; + } + + public void setExtraInt2(int extraInt2) { + this.extraInt2 = extraInt2; + setExtraInt2IsSet(true); + } + + public void unsetExtraInt2() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRAINT2_ISSET_ID); + } + + /** Returns true if field extraInt2 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraInt2() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRAINT2_ISSET_ID); + } + + public void setExtraInt2IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRAINT2_ISSET_ID, value); + } + + public int getExtraInt3() { + return this.extraInt3; + } + + public void setExtraInt3(int extraInt3) { + this.extraInt3 = extraInt3; + setExtraInt3IsSet(true); + } + + public void unsetExtraInt3() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRAINT3_ISSET_ID); + } + + /** Returns true if field extraInt3 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraInt3() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRAINT3_ISSET_ID); + } + + public void setExtraInt3IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRAINT3_ISSET_ID, value); + } + + public long getExtraLong1() { + return this.extraLong1; + } + + public void setExtraLong1(long extraLong1) { + this.extraLong1 = extraLong1; + setExtraLong1IsSet(true); + } + + public void unsetExtraLong1() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRALONG1_ISSET_ID); + } + + /** Returns true if field extraLong1 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraLong1() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRALONG1_ISSET_ID); + } + + public void setExtraLong1IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRALONG1_ISSET_ID, value); + } + + public long getExtraLong2() { + return this.extraLong2; + } + + public void setExtraLong2(long extraLong2) { + this.extraLong2 = extraLong2; + setExtraLong2IsSet(true); + } + + public void unsetExtraLong2() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRALONG2_ISSET_ID); + } + + /** Returns true if field extraLong2 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraLong2() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRALONG2_ISSET_ID); + } + + public void setExtraLong2IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRALONG2_ISSET_ID, value); + } + + public long getExtraLong3() { + return this.extraLong3; + } + + public void setExtraLong3(long extraLong3) { + this.extraLong3 = extraLong3; + setExtraLong3IsSet(true); + } + + public void unsetExtraLong3() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXTRALONG3_ISSET_ID); + } + + /** Returns true if field extraLong3 is set (has been assigned a value) and false otherwise */ + public boolean isSetExtraLong3() { + return EncodingUtils.testBit(__isset_bitfield, __EXTRALONG3_ISSET_ID); + } + + public void setExtraLong3IsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXTRALONG3_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case REQUEST_HASH_CODE: + if (value == null) { + unsetRequestHashCode(); + } else { + setRequestHashCode((Integer)value); + } + break; + + case DATA_TYPE: + if (value == null) { + unsetDataType(); + } else { + setDataType((Integer)value); + } + break; + + case DATA_TIME: + if (value == null) { + unsetDataTime(); + } else { + setDataTime((Long)value); + } + break; + + case THREAD_CPUTIME: + if (value == null) { + unsetThreadCPUTime(); + } else { + setThreadCPUTime((Long)value); + } + break; + + case THREAD_USER_TIME: + if (value == null) { + unsetThreadUserTime(); + } else { + setThreadUserTime((Long)value); + } + break; + + case REQUEST_ID: + if (value == null) { + unsetRequestID(); + } else { + setRequestID((String)value); + } + break; + + case REQUEST_URL: + if (value == null) { + unsetRequestURL(); + } else { + setRequestURL((String)value); + } + break; + + case CLIENT_IP: + if (value == null) { + unsetClientIP(); + } else { + setClientIP((String)value); + } + break; + + case EXTRA_DATA1: + if (value == null) { + unsetExtraData1(); + } else { + setExtraData1((String)value); + } + break; + + case EXTRA_DATA2: + if (value == null) { + unsetExtraData2(); + } else { + setExtraData2((String)value); + } + break; + + case EXTRA_DATA3: + if (value == null) { + unsetExtraData3(); + } else { + setExtraData3((String)value); + } + break; + + case EXTRA_INT1: + if (value == null) { + unsetExtraInt1(); + } else { + setExtraInt1((Integer)value); + } + break; + + case EXTRA_INT2: + if (value == null) { + unsetExtraInt2(); + } else { + setExtraInt2((Integer)value); + } + break; + + case EXTRA_INT3: + if (value == null) { + unsetExtraInt3(); + } else { + setExtraInt3((Integer)value); + } + break; + + case EXTRA_LONG1: + if (value == null) { + unsetExtraLong1(); + } else { + setExtraLong1((Long)value); + } + break; + + case EXTRA_LONG2: + if (value == null) { + unsetExtraLong2(); + } else { + setExtraLong2((Long)value); + } + break; + + case EXTRA_LONG3: + if (value == null) { + unsetExtraLong3(); + } else { + setExtraLong3((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case REQUEST_HASH_CODE: + return Integer.valueOf(getRequestHashCode()); + + case DATA_TYPE: + return Integer.valueOf(getDataType()); + + case DATA_TIME: + return Long.valueOf(getDataTime()); + + case THREAD_CPUTIME: + return Long.valueOf(getThreadCPUTime()); + + case THREAD_USER_TIME: + return Long.valueOf(getThreadUserTime()); + + case REQUEST_ID: + return getRequestID(); + + case REQUEST_URL: + return getRequestURL(); + + case CLIENT_IP: + return getClientIP(); + + case EXTRA_DATA1: + return getExtraData1(); + + case EXTRA_DATA2: + return getExtraData2(); + + case EXTRA_DATA3: + return getExtraData3(); + + case EXTRA_INT1: + return Integer.valueOf(getExtraInt1()); + + case EXTRA_INT2: + return Integer.valueOf(getExtraInt2()); + + case EXTRA_INT3: + return Integer.valueOf(getExtraInt3()); + + case EXTRA_LONG1: + return Long.valueOf(getExtraLong1()); + + case EXTRA_LONG2: + return Long.valueOf(getExtraLong2()); + + case EXTRA_LONG3: + return Long.valueOf(getExtraLong3()); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case REQUEST_HASH_CODE: + return isSetRequestHashCode(); + case DATA_TYPE: + return isSetDataType(); + case DATA_TIME: + return isSetDataTime(); + case THREAD_CPUTIME: + return isSetThreadCPUTime(); + case THREAD_USER_TIME: + return isSetThreadUserTime(); + case REQUEST_ID: + return isSetRequestID(); + case REQUEST_URL: + return isSetRequestURL(); + case CLIENT_IP: + return isSetClientIP(); + case EXTRA_DATA1: + return isSetExtraData1(); + case EXTRA_DATA2: + return isSetExtraData2(); + case EXTRA_DATA3: + return isSetExtraData3(); + case EXTRA_INT1: + return isSetExtraInt1(); + case EXTRA_INT2: + return isSetExtraInt2(); + case EXTRA_INT3: + return isSetExtraInt3(); + case EXTRA_LONG1: + return isSetExtraLong1(); + case EXTRA_LONG2: + return isSetExtraLong2(); + case EXTRA_LONG3: + return isSetExtraLong3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof RequestThriftDTO) + return this.equals((RequestThriftDTO)that); + return false; + } + + public boolean equals(RequestThriftDTO that) { + if (that == null) + return false; + + 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_requestHashCode = true; + boolean that_present_requestHashCode = true; + if (this_present_requestHashCode || that_present_requestHashCode) { + if (!(this_present_requestHashCode && that_present_requestHashCode)) + return false; + if (this.requestHashCode != that.requestHashCode) + return false; + } + + boolean this_present_dataType = true; + boolean that_present_dataType = true; + if (this_present_dataType || that_present_dataType) { + if (!(this_present_dataType && that_present_dataType)) + return false; + if (this.dataType != that.dataType) + return false; + } + + boolean this_present_dataTime = true; + boolean that_present_dataTime = true; + if (this_present_dataTime || that_present_dataTime) { + if (!(this_present_dataTime && that_present_dataTime)) + return false; + if (this.dataTime != that.dataTime) + return false; + } + + boolean this_present_threadCPUTime = true; + boolean that_present_threadCPUTime = true; + if (this_present_threadCPUTime || that_present_threadCPUTime) { + if (!(this_present_threadCPUTime && that_present_threadCPUTime)) + return false; + if (this.threadCPUTime != that.threadCPUTime) + return false; + } + + boolean this_present_threadUserTime = true; + boolean that_present_threadUserTime = true; + if (this_present_threadUserTime || that_present_threadUserTime) { + if (!(this_present_threadUserTime && that_present_threadUserTime)) + return false; + if (this.threadUserTime != that.threadUserTime) + return false; + } + + boolean this_present_requestID = true && this.isSetRequestID(); + boolean that_present_requestID = true && that.isSetRequestID(); + if (this_present_requestID || that_present_requestID) { + if (!(this_present_requestID && that_present_requestID)) + return false; + if (!this.requestID.equals(that.requestID)) + return false; + } + + boolean this_present_requestURL = true && this.isSetRequestURL(); + boolean that_present_requestURL = true && that.isSetRequestURL(); + if (this_present_requestURL || that_present_requestURL) { + if (!(this_present_requestURL && that_present_requestURL)) + return false; + if (!this.requestURL.equals(that.requestURL)) + return false; + } + + boolean this_present_clientIP = true && this.isSetClientIP(); + boolean that_present_clientIP = true && that.isSetClientIP(); + if (this_present_clientIP || that_present_clientIP) { + if (!(this_present_clientIP && that_present_clientIP)) + return false; + if (!this.clientIP.equals(that.clientIP)) + return false; + } + + boolean this_present_extraData1 = true && this.isSetExtraData1(); + boolean that_present_extraData1 = true && that.isSetExtraData1(); + if (this_present_extraData1 || that_present_extraData1) { + if (!(this_present_extraData1 && that_present_extraData1)) + return false; + if (!this.extraData1.equals(that.extraData1)) + return false; + } + + boolean this_present_extraData2 = true && this.isSetExtraData2(); + boolean that_present_extraData2 = true && that.isSetExtraData2(); + if (this_present_extraData2 || that_present_extraData2) { + if (!(this_present_extraData2 && that_present_extraData2)) + return false; + if (!this.extraData2.equals(that.extraData2)) + return false; + } + + boolean this_present_extraData3 = true && this.isSetExtraData3(); + boolean that_present_extraData3 = true && that.isSetExtraData3(); + if (this_present_extraData3 || that_present_extraData3) { + if (!(this_present_extraData3 && that_present_extraData3)) + return false; + if (!this.extraData3.equals(that.extraData3)) + return false; + } + + boolean this_present_extraInt1 = true && this.isSetExtraInt1(); + boolean that_present_extraInt1 = true && that.isSetExtraInt1(); + if (this_present_extraInt1 || that_present_extraInt1) { + if (!(this_present_extraInt1 && that_present_extraInt1)) + return false; + if (this.extraInt1 != that.extraInt1) + return false; + } + + boolean this_present_extraInt2 = true && this.isSetExtraInt2(); + boolean that_present_extraInt2 = true && that.isSetExtraInt2(); + if (this_present_extraInt2 || that_present_extraInt2) { + if (!(this_present_extraInt2 && that_present_extraInt2)) + return false; + if (this.extraInt2 != that.extraInt2) + return false; + } + + boolean this_present_extraInt3 = true && this.isSetExtraInt3(); + boolean that_present_extraInt3 = true && that.isSetExtraInt3(); + if (this_present_extraInt3 || that_present_extraInt3) { + if (!(this_present_extraInt3 && that_present_extraInt3)) + return false; + if (this.extraInt3 != that.extraInt3) + return false; + } + + boolean this_present_extraLong1 = true && this.isSetExtraLong1(); + boolean that_present_extraLong1 = true && that.isSetExtraLong1(); + if (this_present_extraLong1 || that_present_extraLong1) { + if (!(this_present_extraLong1 && that_present_extraLong1)) + return false; + if (this.extraLong1 != that.extraLong1) + return false; + } + + boolean this_present_extraLong2 = true && this.isSetExtraLong2(); + boolean that_present_extraLong2 = true && that.isSetExtraLong2(); + if (this_present_extraLong2 || that_present_extraLong2) { + if (!(this_present_extraLong2 && that_present_extraLong2)) + return false; + if (this.extraLong2 != that.extraLong2) + return false; + } + + boolean this_present_extraLong3 = true && this.isSetExtraLong3(); + boolean that_present_extraLong3 = true && that.isSetExtraLong3(); + if (this_present_extraLong3 || that_present_extraLong3) { + if (!(this_present_extraLong3 && that_present_extraLong3)) + return false; + if (this.extraLong3 != that.extraLong3) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(RequestThriftDTO other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + RequestThriftDTO typedOther = (RequestThriftDTO)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRequestHashCode()).compareTo(typedOther.isSetRequestHashCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestHashCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestHashCode, typedOther.requestHashCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataType()).compareTo(typedOther.isSetDataType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, typedOther.dataType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataTime()).compareTo(typedOther.isSetDataTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTime, typedOther.dataTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetThreadCPUTime()).compareTo(typedOther.isSetThreadCPUTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetThreadCPUTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadCPUTime, typedOther.threadCPUTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetThreadUserTime()).compareTo(typedOther.isSetThreadUserTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetThreadUserTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threadUserTime, typedOther.threadUserTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRequestID()).compareTo(typedOther.isSetRequestID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestID, typedOther.requestID); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRequestURL()).compareTo(typedOther.isSetRequestURL()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestURL()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestURL, typedOther.requestURL); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetClientIP()).compareTo(typedOther.isSetClientIP()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClientIP()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientIP, typedOther.clientIP); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraData1()).compareTo(typedOther.isSetExtraData1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraData1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData1, typedOther.extraData1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraData2()).compareTo(typedOther.isSetExtraData2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraData2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData2, typedOther.extraData2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraData3()).compareTo(typedOther.isSetExtraData3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraData3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraData3, typedOther.extraData3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraInt1()).compareTo(typedOther.isSetExtraInt1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraInt1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt1, typedOther.extraInt1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraInt2()).compareTo(typedOther.isSetExtraInt2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraInt2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt2, typedOther.extraInt2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraInt3()).compareTo(typedOther.isSetExtraInt3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraInt3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraInt3, typedOther.extraInt3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraLong1()).compareTo(typedOther.isSetExtraLong1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraLong1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong1, typedOther.extraLong1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraLong2()).compareTo(typedOther.isSetExtraLong2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraLong2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong2, typedOther.extraLong2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExtraLong3()).compareTo(typedOther.isSetExtraLong3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExtraLong3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extraLong3, typedOther.extraLong3); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("RequestThriftDTO("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("requestHashCode:"); + sb.append(this.requestHashCode); + first = false; + if (!first) sb.append(", "); + sb.append("dataType:"); + sb.append(this.dataType); + first = false; + if (!first) sb.append(", "); + sb.append("dataTime:"); + sb.append(this.dataTime); + first = false; + if (!first) sb.append(", "); + sb.append("threadCPUTime:"); + sb.append(this.threadCPUTime); + first = false; + if (!first) sb.append(", "); + sb.append("threadUserTime:"); + sb.append(this.threadUserTime); + first = false; + if (isSetRequestID()) { + if (!first) sb.append(", "); + sb.append("requestID:"); + if (this.requestID == null) { + sb.append("null"); + } else { + sb.append(this.requestID); + } + first = false; + } + if (isSetRequestURL()) { + if (!first) sb.append(", "); + sb.append("requestURL:"); + if (this.requestURL == null) { + sb.append("null"); + } else { + sb.append(this.requestURL); + } + first = false; + } + if (isSetClientIP()) { + if (!first) sb.append(", "); + sb.append("clientIP:"); + if (this.clientIP == null) { + sb.append("null"); + } else { + sb.append(this.clientIP); + } + first = false; + } + if (isSetExtraData1()) { + if (!first) sb.append(", "); + sb.append("extraData1:"); + if (this.extraData1 == null) { + sb.append("null"); + } else { + sb.append(this.extraData1); + } + first = false; + } + if (isSetExtraData2()) { + if (!first) sb.append(", "); + sb.append("extraData2:"); + if (this.extraData2 == null) { + sb.append("null"); + } else { + sb.append(this.extraData2); + } + first = false; + } + if (isSetExtraData3()) { + if (!first) sb.append(", "); + sb.append("extraData3:"); + if (this.extraData3 == null) { + sb.append("null"); + } else { + sb.append(this.extraData3); + } + first = false; + } + if (isSetExtraInt1()) { + if (!first) sb.append(", "); + sb.append("extraInt1:"); + sb.append(this.extraInt1); + first = false; + } + if (isSetExtraInt2()) { + if (!first) sb.append(", "); + sb.append("extraInt2:"); + sb.append(this.extraInt2); + first = false; + } + if (isSetExtraInt3()) { + if (!first) sb.append(", "); + sb.append("extraInt3:"); + sb.append(this.extraInt3); + first = false; + } + if (isSetExtraLong1()) { + if (!first) sb.append(", "); + sb.append("extraLong1:"); + sb.append(this.extraLong1); + first = false; + } + if (isSetExtraLong2()) { + if (!first) sb.append(", "); + sb.append("extraLong2:"); + sb.append(this.extraLong2); + first = false; + } + if (isSetExtraLong3()) { + if (!first) sb.append(", "); + sb.append("extraLong3:"); + sb.append(this.extraLong3); + 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, 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 RequestThriftDTOStandardSchemeFactory implements SchemeFactory { + public RequestThriftDTOStandardScheme getScheme() { + return new RequestThriftDTOStandardScheme(); + } + } + + private static class RequestThriftDTOStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, RequestThriftDTO 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: // REQUEST_HASH_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.requestHashCode = iprot.readI32(); + struct.setRequestHashCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DATA_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DATA_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.dataTime = iprot.readI64(); + struct.setDataTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // THREAD_CPUTIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.threadCPUTime = iprot.readI64(); + struct.setThreadCPUTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // THREAD_USER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.threadUserTime = iprot.readI64(); + struct.setThreadUserTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // REQUEST_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.requestID = iprot.readString(); + struct.setRequestIDIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // REQUEST_URL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.requestURL = iprot.readString(); + struct.setRequestURLIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // CLIENT_IP + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.clientIP = iprot.readString(); + struct.setClientIPIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // EXTRA_DATA1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.extraData1 = iprot.readString(); + struct.setExtraData1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // EXTRA_DATA2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.extraData2 = iprot.readString(); + struct.setExtraData2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // EXTRA_DATA3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.extraData3 = iprot.readString(); + struct.setExtraData3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // EXTRA_INT1 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.extraInt1 = iprot.readI32(); + struct.setExtraInt1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // EXTRA_INT2 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.extraInt2 = iprot.readI32(); + struct.setExtraInt2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // EXTRA_INT3 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.extraInt3 = iprot.readI32(); + struct.setExtraInt3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // EXTRA_LONG1 + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.extraLong1 = iprot.readI64(); + struct.setExtraLong1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // EXTRA_LONG2 + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.extraLong2 = iprot.readI64(); + struct.setExtraLong2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 18: // EXTRA_LONG3 + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.extraLong3 = iprot.readI64(); + struct.setExtraLong3IsSet(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, RequestThriftDTO struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(REQUEST_HASH_CODE_FIELD_DESC); + oprot.writeI32(struct.requestHashCode); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); + oprot.writeI32(struct.dataType); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(DATA_TIME_FIELD_DESC); + oprot.writeI64(struct.dataTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(THREAD_CPUTIME_FIELD_DESC); + oprot.writeI64(struct.threadCPUTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(THREAD_USER_TIME_FIELD_DESC); + oprot.writeI64(struct.threadUserTime); + oprot.writeFieldEnd(); + if (struct.requestID != null) { + if (struct.isSetRequestID()) { + oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC); + oprot.writeString(struct.requestID); + oprot.writeFieldEnd(); + } + } + if (struct.requestURL != null) { + if (struct.isSetRequestURL()) { + oprot.writeFieldBegin(REQUEST_URL_FIELD_DESC); + oprot.writeString(struct.requestURL); + oprot.writeFieldEnd(); + } + } + if (struct.clientIP != null) { + if (struct.isSetClientIP()) { + oprot.writeFieldBegin(CLIENT_IP_FIELD_DESC); + oprot.writeString(struct.clientIP); + oprot.writeFieldEnd(); + } + } + if (struct.extraData1 != null) { + if (struct.isSetExtraData1()) { + oprot.writeFieldBegin(EXTRA_DATA1_FIELD_DESC); + oprot.writeString(struct.extraData1); + oprot.writeFieldEnd(); + } + } + if (struct.extraData2 != null) { + if (struct.isSetExtraData2()) { + oprot.writeFieldBegin(EXTRA_DATA2_FIELD_DESC); + oprot.writeString(struct.extraData2); + oprot.writeFieldEnd(); + } + } + if (struct.extraData3 != null) { + if (struct.isSetExtraData3()) { + oprot.writeFieldBegin(EXTRA_DATA3_FIELD_DESC); + oprot.writeString(struct.extraData3); + oprot.writeFieldEnd(); + } + } + if (struct.isSetExtraInt1()) { + oprot.writeFieldBegin(EXTRA_INT1_FIELD_DESC); + oprot.writeI32(struct.extraInt1); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraInt2()) { + oprot.writeFieldBegin(EXTRA_INT2_FIELD_DESC); + oprot.writeI32(struct.extraInt2); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraInt3()) { + oprot.writeFieldBegin(EXTRA_INT3_FIELD_DESC); + oprot.writeI32(struct.extraInt3); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraLong1()) { + oprot.writeFieldBegin(EXTRA_LONG1_FIELD_DESC); + oprot.writeI64(struct.extraLong1); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraLong2()) { + oprot.writeFieldBegin(EXTRA_LONG2_FIELD_DESC); + oprot.writeI64(struct.extraLong2); + oprot.writeFieldEnd(); + } + if (struct.isSetExtraLong3()) { + oprot.writeFieldBegin(EXTRA_LONG3_FIELD_DESC); + oprot.writeI64(struct.extraLong3); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RequestThriftDTOTupleSchemeFactory implements SchemeFactory { + public RequestThriftDTOTupleScheme getScheme() { + return new RequestThriftDTOTupleScheme(); + } + } + + private static class RequestThriftDTOTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, RequestThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetRequestHashCode()) { + optionals.set(1); + } + if (struct.isSetDataType()) { + optionals.set(2); + } + if (struct.isSetDataTime()) { + optionals.set(3); + } + if (struct.isSetThreadCPUTime()) { + optionals.set(4); + } + if (struct.isSetThreadUserTime()) { + optionals.set(5); + } + if (struct.isSetRequestID()) { + optionals.set(6); + } + if (struct.isSetRequestURL()) { + optionals.set(7); + } + if (struct.isSetClientIP()) { + optionals.set(8); + } + if (struct.isSetExtraData1()) { + optionals.set(9); + } + if (struct.isSetExtraData2()) { + optionals.set(10); + } + if (struct.isSetExtraData3()) { + optionals.set(11); + } + if (struct.isSetExtraInt1()) { + optionals.set(12); + } + if (struct.isSetExtraInt2()) { + optionals.set(13); + } + if (struct.isSetExtraInt3()) { + optionals.set(14); + } + if (struct.isSetExtraLong1()) { + optionals.set(15); + } + if (struct.isSetExtraLong2()) { + optionals.set(16); + } + if (struct.isSetExtraLong3()) { + optionals.set(17); + } + oprot.writeBitSet(optionals, 18); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetRequestHashCode()) { + oprot.writeI32(struct.requestHashCode); + } + if (struct.isSetDataType()) { + oprot.writeI32(struct.dataType); + } + if (struct.isSetDataTime()) { + oprot.writeI64(struct.dataTime); + } + if (struct.isSetThreadCPUTime()) { + oprot.writeI64(struct.threadCPUTime); + } + if (struct.isSetThreadUserTime()) { + oprot.writeI64(struct.threadUserTime); + } + if (struct.isSetRequestID()) { + oprot.writeString(struct.requestID); + } + if (struct.isSetRequestURL()) { + oprot.writeString(struct.requestURL); + } + if (struct.isSetClientIP()) { + oprot.writeString(struct.clientIP); + } + if (struct.isSetExtraData1()) { + oprot.writeString(struct.extraData1); + } + if (struct.isSetExtraData2()) { + oprot.writeString(struct.extraData2); + } + if (struct.isSetExtraData3()) { + oprot.writeString(struct.extraData3); + } + if (struct.isSetExtraInt1()) { + oprot.writeI32(struct.extraInt1); + } + if (struct.isSetExtraInt2()) { + oprot.writeI32(struct.extraInt2); + } + if (struct.isSetExtraInt3()) { + oprot.writeI32(struct.extraInt3); + } + if (struct.isSetExtraLong1()) { + oprot.writeI64(struct.extraLong1); + } + if (struct.isSetExtraLong2()) { + oprot.writeI64(struct.extraLong2); + } + if (struct.isSetExtraLong3()) { + oprot.writeI64(struct.extraLong3); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, RequestThriftDTO struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(18); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.requestHashCode = iprot.readI32(); + struct.setRequestHashCodeIsSet(true); + } + if (incoming.get(2)) { + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + } + if (incoming.get(3)) { + struct.dataTime = iprot.readI64(); + struct.setDataTimeIsSet(true); + } + if (incoming.get(4)) { + struct.threadCPUTime = iprot.readI64(); + struct.setThreadCPUTimeIsSet(true); + } + if (incoming.get(5)) { + struct.threadUserTime = iprot.readI64(); + struct.setThreadUserTimeIsSet(true); + } + if (incoming.get(6)) { + struct.requestID = iprot.readString(); + struct.setRequestIDIsSet(true); + } + if (incoming.get(7)) { + struct.requestURL = iprot.readString(); + struct.setRequestURLIsSet(true); + } + if (incoming.get(8)) { + struct.clientIP = iprot.readString(); + struct.setClientIPIsSet(true); + } + if (incoming.get(9)) { + struct.extraData1 = iprot.readString(); + struct.setExtraData1IsSet(true); + } + if (incoming.get(10)) { + struct.extraData2 = iprot.readString(); + struct.setExtraData2IsSet(true); + } + if (incoming.get(11)) { + struct.extraData3 = iprot.readString(); + struct.setExtraData3IsSet(true); + } + if (incoming.get(12)) { + struct.extraInt1 = iprot.readI32(); + struct.setExtraInt1IsSet(true); + } + if (incoming.get(13)) { + struct.extraInt2 = iprot.readI32(); + struct.setExtraInt2IsSet(true); + } + if (incoming.get(14)) { + struct.extraInt3 = iprot.readI32(); + struct.setExtraInt3IsSet(true); + } + if (incoming.get(15)) { + struct.extraLong1 = iprot.readI64(); + struct.setExtraLong1IsSet(true); + } + if (incoming.get(16)) { + struct.extraLong2 = iprot.readI64(); + struct.setExtraLong2IsSet(true); + } + if (incoming.get(17)) { + struct.extraLong3 = iprot.readI64(); + struct.setExtraLong3IsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/Span.java b/src/main/java/com/profiler/common/dto/thrift/Span.java index 3ed0ec59b..d4409f7d1 100644 --- a/src/main/java/com/profiler/common/dto/thrift/Span.java +++ b/src/main/java/com/profiler/common/dto/thrift/Span.java @@ -1,2328 +1,2331 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Span implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Span"); - - 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 APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)3); - private static final org.apache.thrift.protocol.TField MOST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mostTraceId", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField LEAST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("leastTraceId", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField PARENT_SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentSpanId", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsed", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField RPC_FIELD_DESC = new org.apache.thrift.protocol.TField("rpc", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)12); - private static final org.apache.thrift.protocol.TField END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("endPoint", org.apache.thrift.protocol.TType.STRING, (short)13); - private static final org.apache.thrift.protocol.TField REMOTE_ADDR_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteAddr", org.apache.thrift.protocol.TType.STRING, (short)14); - private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)15); - private static final org.apache.thrift.protocol.TField FLAG_FIELD_DESC = new org.apache.thrift.protocol.TField("flag", org.apache.thrift.protocol.TType.I16, (short)16); - private static final org.apache.thrift.protocol.TField ERR_FIELD_DESC = new org.apache.thrift.protocol.TField("err", org.apache.thrift.protocol.TType.I32, (short)17); - private static final org.apache.thrift.protocol.TField SPAN_EVENT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("spanEventList", org.apache.thrift.protocol.TType.LIST, (short)18); - private static final org.apache.thrift.protocol.TField PARENT_APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentApplicationName", org.apache.thrift.protocol.TType.STRING, (short)19); - private static final org.apache.thrift.protocol.TField PARENT_APPLICATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("parentApplicationType", org.apache.thrift.protocol.TType.I16, (short)20); - private static final org.apache.thrift.protocol.TField ACCEPTOR_HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("acceptorHost", org.apache.thrift.protocol.TType.STRING, (short)21); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SpanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SpanTupleSchemeFactory()); - } - - private String agentId; // required - private String applicationId; // required - private short agentIdentifier; // required - private long mostTraceId; // required - private long leastTraceId; // required - private int spanId; // required - private int parentSpanId; // optional - private long startTime; // required - private int elapsed; // required - private String rpc; // optional - private short serviceType; // required - private String endPoint; // optional - private String remoteAddr; // optional - private List annotations; // required - private short flag; // optional - private int err; // optional - private List spanEventList; // optional - private String parentApplicationName; // optional - private short parentApplicationType; // optional - private String acceptorHost; // 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"), - APPLICATION_ID((short)2, "applicationId"), - AGENT_IDENTIFIER((short)3, "agentIdentifier"), - MOST_TRACE_ID((short)4, "mostTraceId"), - LEAST_TRACE_ID((short)5, "leastTraceId"), - SPAN_ID((short)6, "spanId"), - PARENT_SPAN_ID((short)7, "parentSpanId"), - START_TIME((short)8, "startTime"), - ELAPSED((short)9, "elapsed"), - RPC((short)10, "rpc"), - SERVICE_TYPE((short)12, "serviceType"), - END_POINT((short)13, "endPoint"), - REMOTE_ADDR((short)14, "remoteAddr"), - ANNOTATIONS((short)15, "annotations"), - FLAG((short)16, "flag"), - ERR((short)17, "err"), - SPAN_EVENT_LIST((short)18, "spanEventList"), - PARENT_APPLICATION_NAME((short)19, "parentApplicationName"), - PARENT_APPLICATION_TYPE((short)20, "parentApplicationType"), - ACCEPTOR_HOST((short)21, "acceptorHost"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // APPLICATION_ID - return APPLICATION_ID; - case 3: // AGENT_IDENTIFIER - return AGENT_IDENTIFIER; - case 4: // MOST_TRACE_ID - return MOST_TRACE_ID; - case 5: // LEAST_TRACE_ID - return LEAST_TRACE_ID; - case 6: // SPAN_ID - return SPAN_ID; - case 7: // PARENT_SPAN_ID - return PARENT_SPAN_ID; - case 8: // START_TIME - return START_TIME; - case 9: // ELAPSED - return ELAPSED; - case 10: // RPC - return RPC; - case 12: // SERVICE_TYPE - return SERVICE_TYPE; - case 13: // END_POINT - return END_POINT; - case 14: // REMOTE_ADDR - return REMOTE_ADDR; - case 15: // ANNOTATIONS - return ANNOTATIONS; - case 16: // FLAG - return FLAG; - case 17: // ERR - return ERR; - case 18: // SPAN_EVENT_LIST - return SPAN_EVENT_LIST; - case 19: // PARENT_APPLICATION_NAME - return PARENT_APPLICATION_NAME; - case 20: // PARENT_APPLICATION_TYPE - return PARENT_APPLICATION_TYPE; - case 21: // ACCEPTOR_HOST - return ACCEPTOR_HOST; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __AGENTIDENTIFIER_ISSET_ID = 0; - private static final int __MOSTTRACEID_ISSET_ID = 1; - private static final int __LEASTTRACEID_ISSET_ID = 2; - private static final int __SPANID_ISSET_ID = 3; - private static final int __PARENTSPANID_ISSET_ID = 4; - private static final int __STARTTIME_ISSET_ID = 5; - private static final int __ELAPSED_ISSET_ID = 6; - private static final int __SERVICETYPE_ISSET_ID = 7; - private static final int __FLAG_ISSET_ID = 8; - private static final int __ERR_ISSET_ID = 9; - private static final int __PARENTAPPLICATIONTYPE_ISSET_ID = 10; - private BitSet __isset_bit_vector = new BitSet(11); - private _Fields optionals[] = {_Fields.PARENT_SPAN_ID,_Fields.RPC,_Fields.END_POINT,_Fields.REMOTE_ADDR,_Fields.FLAG,_Fields.ERR,_Fields.SPAN_EVENT_LIST,_Fields.PARENT_APPLICATION_NAME,_Fields.PARENT_APPLICATION_TYPE,_Fields.ACCEPTOR_HOST}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.MOST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("mostTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEAST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("leastTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PARENT_SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("parentSpanId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("elapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.RPC, new org.apache.thrift.meta_data.FieldMetaData("rpc", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.END_POINT, new org.apache.thrift.meta_data.FieldMetaData("endPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.REMOTE_ADDR, new org.apache.thrift.meta_data.FieldMetaData("remoteAddr", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", 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, Annotation.class)))); - tmpMap.put(_Fields.FLAG, new org.apache.thrift.meta_data.FieldMetaData("flag", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.ERR, new org.apache.thrift.meta_data.FieldMetaData("err", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SPAN_EVENT_LIST, new org.apache.thrift.meta_data.FieldMetaData("spanEventList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpanEvent.class)))); - tmpMap.put(_Fields.PARENT_APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentApplicationName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARENT_APPLICATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("parentApplicationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.ACCEPTOR_HOST, new org.apache.thrift.meta_data.FieldMetaData("acceptorHost", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Span.class, metaDataMap); - } - - public Span() { - this.parentSpanId = -1; - - this.flag = (short)0; - - } - - public Span( - String agentId, - String applicationId, - short agentIdentifier, - long mostTraceId, - long leastTraceId, - int spanId, - long startTime, - int elapsed, - short serviceType, - List annotations) - { - this(); - this.agentId = agentId; - this.applicationId = applicationId; - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - this.mostTraceId = mostTraceId; - setMostTraceIdIsSet(true); - this.leastTraceId = leastTraceId; - setLeastTraceIdIsSet(true); - this.spanId = spanId; - setSpanIdIsSet(true); - this.startTime = startTime; - setStartTimeIsSet(true); - this.elapsed = elapsed; - setElapsedIsSet(true); - this.serviceType = serviceType; - setServiceTypeIsSet(true); - this.annotations = annotations; - } - - /** - * Performs a deep copy on other. - */ - public Span(Span other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - if (other.isSetApplicationId()) { - this.applicationId = other.applicationId; - } - this.agentIdentifier = other.agentIdentifier; - this.mostTraceId = other.mostTraceId; - this.leastTraceId = other.leastTraceId; - this.spanId = other.spanId; - this.parentSpanId = other.parentSpanId; - this.startTime = other.startTime; - this.elapsed = other.elapsed; - if (other.isSetRpc()) { - this.rpc = other.rpc; - } - this.serviceType = other.serviceType; - if (other.isSetEndPoint()) { - this.endPoint = other.endPoint; - } - if (other.isSetRemoteAddr()) { - this.remoteAddr = other.remoteAddr; - } - if (other.isSetAnnotations()) { - List __this__annotations = new ArrayList(); - for (Annotation other_element : other.annotations) { - __this__annotations.add(new Annotation(other_element)); - } - this.annotations = __this__annotations; - } - this.flag = other.flag; - this.err = other.err; - if (other.isSetSpanEventList()) { - List __this__spanEventList = new ArrayList(); - for (SpanEvent other_element : other.spanEventList) { - __this__spanEventList.add(new SpanEvent(other_element)); - } - this.spanEventList = __this__spanEventList; - } - if (other.isSetParentApplicationName()) { - this.parentApplicationName = other.parentApplicationName; - } - this.parentApplicationType = other.parentApplicationType; - if (other.isSetAcceptorHost()) { - this.acceptorHost = other.acceptorHost; - } - } - - public Span deepCopy() { - return new Span(this); - } - - @Override - public void clear() { - this.agentId = null; - this.applicationId = null; - setAgentIdentifierIsSet(false); - this.agentIdentifier = 0; - setMostTraceIdIsSet(false); - this.mostTraceId = 0; - setLeastTraceIdIsSet(false); - this.leastTraceId = 0; - setSpanIdIsSet(false); - this.spanId = 0; - this.parentSpanId = -1; - - setStartTimeIsSet(false); - this.startTime = 0; - setElapsedIsSet(false); - this.elapsed = 0; - this.rpc = null; - setServiceTypeIsSet(false); - this.serviceType = 0; - this.endPoint = null; - this.remoteAddr = null; - this.annotations = null; - this.flag = (short)0; - - setErrIsSet(false); - this.err = 0; - this.spanEventList = null; - this.parentApplicationName = null; - setParentApplicationTypeIsSet(false); - this.parentApplicationType = 0; - this.acceptorHost = null; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 String getApplicationId() { - return this.applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public void unsetApplicationId() { - this.applicationId = null; - } - - /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ - public boolean isSetApplicationId() { - return this.applicationId != null; - } - - public void setApplicationIdIsSet(boolean value) { - if (!value) { - this.applicationId = null; - } - } - - public short getAgentIdentifier() { - return this.agentIdentifier; - } - - public void setAgentIdentifier(short agentIdentifier) { - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - } - - public void unsetAgentIdentifier() { - __isset_bit_vector.clear(__AGENTIDENTIFIER_ISSET_ID); - } - - /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentIdentifier() { - return __isset_bit_vector.get(__AGENTIDENTIFIER_ISSET_ID); - } - - public void setAgentIdentifierIsSet(boolean value) { - __isset_bit_vector.set(__AGENTIDENTIFIER_ISSET_ID, value); - } - - public long getMostTraceId() { - return this.mostTraceId; - } - - public void setMostTraceId(long mostTraceId) { - this.mostTraceId = mostTraceId; - setMostTraceIdIsSet(true); - } - - public void unsetMostTraceId() { - __isset_bit_vector.clear(__MOSTTRACEID_ISSET_ID); - } - - /** Returns true if field mostTraceId is set (has been assigned a value) and false otherwise */ - public boolean isSetMostTraceId() { - return __isset_bit_vector.get(__MOSTTRACEID_ISSET_ID); - } - - public void setMostTraceIdIsSet(boolean value) { - __isset_bit_vector.set(__MOSTTRACEID_ISSET_ID, value); - } - - public long getLeastTraceId() { - return this.leastTraceId; - } - - public void setLeastTraceId(long leastTraceId) { - this.leastTraceId = leastTraceId; - setLeastTraceIdIsSet(true); - } - - public void unsetLeastTraceId() { - __isset_bit_vector.clear(__LEASTTRACEID_ISSET_ID); - } - - /** Returns true if field leastTraceId is set (has been assigned a value) and false otherwise */ - public boolean isSetLeastTraceId() { - return __isset_bit_vector.get(__LEASTTRACEID_ISSET_ID); - } - - public void setLeastTraceIdIsSet(boolean value) { - __isset_bit_vector.set(__LEASTTRACEID_ISSET_ID, value); - } - - public int getSpanId() { - return this.spanId; - } - - public void setSpanId(int spanId) { - this.spanId = spanId; - setSpanIdIsSet(true); - } - - public void unsetSpanId() { - __isset_bit_vector.clear(__SPANID_ISSET_ID); - } - - /** Returns true if field spanId is set (has been assigned a value) and false otherwise */ - public boolean isSetSpanId() { - return __isset_bit_vector.get(__SPANID_ISSET_ID); - } - - public void setSpanIdIsSet(boolean value) { - __isset_bit_vector.set(__SPANID_ISSET_ID, value); - } - - public int getParentSpanId() { - return this.parentSpanId; - } - - public void setParentSpanId(int parentSpanId) { - this.parentSpanId = parentSpanId; - setParentSpanIdIsSet(true); - } - - public void unsetParentSpanId() { - __isset_bit_vector.clear(__PARENTSPANID_ISSET_ID); - } - - /** Returns true if field parentSpanId is set (has been assigned a value) and false otherwise */ - public boolean isSetParentSpanId() { - return __isset_bit_vector.get(__PARENTSPANID_ISSET_ID); - } - - public void setParentSpanIdIsSet(boolean value) { - __isset_bit_vector.set(__PARENTSPANID_ISSET_ID, value); - } - - public long getStartTime() { - return this.startTime; - } - - public void setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - } - - public void unsetStartTime() { - __isset_bit_vector.clear(__STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return __isset_bit_vector.get(__STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bit_vector.set(__STARTTIME_ISSET_ID, value); - } - - public int getElapsed() { - return this.elapsed; - } - - public void setElapsed(int elapsed) { - this.elapsed = elapsed; - setElapsedIsSet(true); - } - - public void unsetElapsed() { - __isset_bit_vector.clear(__ELAPSED_ISSET_ID); - } - - /** Returns true if field elapsed is set (has been assigned a value) and false otherwise */ - public boolean isSetElapsed() { - return __isset_bit_vector.get(__ELAPSED_ISSET_ID); - } - - public void setElapsedIsSet(boolean value) { - __isset_bit_vector.set(__ELAPSED_ISSET_ID, value); - } - - public String getRpc() { - return this.rpc; - } - - public void setRpc(String rpc) { - this.rpc = rpc; - } - - public void unsetRpc() { - this.rpc = null; - } - - /** Returns true if field rpc is set (has been assigned a value) and false otherwise */ - public boolean isSetRpc() { - return this.rpc != null; - } - - public void setRpcIsSet(boolean value) { - if (!value) { - this.rpc = null; - } - } - - public short getServiceType() { - return this.serviceType; - } - - public void setServiceType(short serviceType) { - this.serviceType = serviceType; - setServiceTypeIsSet(true); - } - - public void unsetServiceType() { - __isset_bit_vector.clear(__SERVICETYPE_ISSET_ID); - } - - /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ - public boolean isSetServiceType() { - return __isset_bit_vector.get(__SERVICETYPE_ISSET_ID); - } - - public void setServiceTypeIsSet(boolean value) { - __isset_bit_vector.set(__SERVICETYPE_ISSET_ID, value); - } - - public String getEndPoint() { - return this.endPoint; - } - - public void setEndPoint(String endPoint) { - this.endPoint = endPoint; - } - - public void unsetEndPoint() { - this.endPoint = null; - } - - /** Returns true if field endPoint is set (has been assigned a value) and false otherwise */ - public boolean isSetEndPoint() { - return this.endPoint != null; - } - - public void setEndPointIsSet(boolean value) { - if (!value) { - this.endPoint = null; - } - } - - public String getRemoteAddr() { - return this.remoteAddr; - } - - public void setRemoteAddr(String remoteAddr) { - this.remoteAddr = remoteAddr; - } - - public void unsetRemoteAddr() { - this.remoteAddr = null; - } - - /** Returns true if field remoteAddr is set (has been assigned a value) and false otherwise */ - public boolean isSetRemoteAddr() { - return this.remoteAddr != null; - } - - public void setRemoteAddrIsSet(boolean value) { - if (!value) { - this.remoteAddr = null; - } - } - - public int getAnnotationsSize() { - return (this.annotations == null) ? 0 : this.annotations.size(); - } - - public java.util.Iterator getAnnotationsIterator() { - return (this.annotations == null) ? null : this.annotations.iterator(); - } - - public void addToAnnotations(Annotation elem) { - if (this.annotations == null) { - this.annotations = new ArrayList(); - } - this.annotations.add(elem); - } - - public List getAnnotations() { - return this.annotations; - } - - public void setAnnotations(List annotations) { - this.annotations = annotations; - } - - public void unsetAnnotations() { - this.annotations = null; - } - - /** Returns true if field annotations is set (has been assigned a value) and false otherwise */ - public boolean isSetAnnotations() { - return this.annotations != null; - } - - public void setAnnotationsIsSet(boolean value) { - if (!value) { - this.annotations = null; - } - } - - public short getFlag() { - return this.flag; - } - - public void setFlag(short flag) { - this.flag = flag; - setFlagIsSet(true); - } - - public void unsetFlag() { - __isset_bit_vector.clear(__FLAG_ISSET_ID); - } - - /** Returns true if field flag is set (has been assigned a value) and false otherwise */ - public boolean isSetFlag() { - return __isset_bit_vector.get(__FLAG_ISSET_ID); - } - - public void setFlagIsSet(boolean value) { - __isset_bit_vector.set(__FLAG_ISSET_ID, value); - } - - public int getErr() { - return this.err; - } - - public void setErr(int err) { - this.err = err; - setErrIsSet(true); - } - - public void unsetErr() { - __isset_bit_vector.clear(__ERR_ISSET_ID); - } - - /** Returns true if field err is set (has been assigned a value) and false otherwise */ - public boolean isSetErr() { - return __isset_bit_vector.get(__ERR_ISSET_ID); - } - - public void setErrIsSet(boolean value) { - __isset_bit_vector.set(__ERR_ISSET_ID, value); - } - - public int getSpanEventListSize() { - return (this.spanEventList == null) ? 0 : this.spanEventList.size(); - } - - public java.util.Iterator getSpanEventListIterator() { - return (this.spanEventList == null) ? null : this.spanEventList.iterator(); - } - - public void addToSpanEventList(SpanEvent elem) { - if (this.spanEventList == null) { - this.spanEventList = new ArrayList(); - } - this.spanEventList.add(elem); - } - - public List getSpanEventList() { - return this.spanEventList; - } - - public void setSpanEventList(List spanEventList) { - this.spanEventList = spanEventList; - } - - public void unsetSpanEventList() { - this.spanEventList = null; - } - - /** Returns true if field spanEventList is set (has been assigned a value) and false otherwise */ - public boolean isSetSpanEventList() { - return this.spanEventList != null; - } - - public void setSpanEventListIsSet(boolean value) { - if (!value) { - this.spanEventList = null; - } - } - - public String getParentApplicationName() { - return this.parentApplicationName; - } - - public void setParentApplicationName(String parentApplicationName) { - this.parentApplicationName = parentApplicationName; - } - - public void unsetParentApplicationName() { - this.parentApplicationName = null; - } - - /** Returns true if field parentApplicationName is set (has been assigned a value) and false otherwise */ - public boolean isSetParentApplicationName() { - return this.parentApplicationName != null; - } - - public void setParentApplicationNameIsSet(boolean value) { - if (!value) { - this.parentApplicationName = null; - } - } - - public short getParentApplicationType() { - return this.parentApplicationType; - } - - public void setParentApplicationType(short parentApplicationType) { - this.parentApplicationType = parentApplicationType; - setParentApplicationTypeIsSet(true); - } - - public void unsetParentApplicationType() { - __isset_bit_vector.clear(__PARENTAPPLICATIONTYPE_ISSET_ID); - } - - /** Returns true if field parentApplicationType is set (has been assigned a value) and false otherwise */ - public boolean isSetParentApplicationType() { - return __isset_bit_vector.get(__PARENTAPPLICATIONTYPE_ISSET_ID); - } - - public void setParentApplicationTypeIsSet(boolean value) { - __isset_bit_vector.set(__PARENTAPPLICATIONTYPE_ISSET_ID, value); - } - - public String getAcceptorHost() { - return this.acceptorHost; - } - - public void setAcceptorHost(String acceptorHost) { - this.acceptorHost = acceptorHost; - } - - public void unsetAcceptorHost() { - this.acceptorHost = null; - } - - /** Returns true if field acceptorHost is set (has been assigned a value) and false otherwise */ - public boolean isSetAcceptorHost() { - return this.acceptorHost != null; - } - - public void setAcceptorHostIsSet(boolean value) { - if (!value) { - this.acceptorHost = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case APPLICATION_ID: - if (value == null) { - unsetApplicationId(); - } else { - setApplicationId((String)value); - } - break; - - case AGENT_IDENTIFIER: - if (value == null) { - unsetAgentIdentifier(); - } else { - setAgentIdentifier((Short)value); - } - break; - - case MOST_TRACE_ID: - if (value == null) { - unsetMostTraceId(); - } else { - setMostTraceId((Long)value); - } - break; - - case LEAST_TRACE_ID: - if (value == null) { - unsetLeastTraceId(); - } else { - setLeastTraceId((Long)value); - } - break; - - case SPAN_ID: - if (value == null) { - unsetSpanId(); - } else { - setSpanId((Integer)value); - } - break; - - case PARENT_SPAN_ID: - if (value == null) { - unsetParentSpanId(); - } else { - setParentSpanId((Integer)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((Long)value); - } - break; - - case ELAPSED: - if (value == null) { - unsetElapsed(); - } else { - setElapsed((Integer)value); - } - break; - - case RPC: - if (value == null) { - unsetRpc(); - } else { - setRpc((String)value); - } - break; - - case SERVICE_TYPE: - if (value == null) { - unsetServiceType(); - } else { - setServiceType((Short)value); - } - break; - - case END_POINT: - if (value == null) { - unsetEndPoint(); - } else { - setEndPoint((String)value); - } - break; - - case REMOTE_ADDR: - if (value == null) { - unsetRemoteAddr(); - } else { - setRemoteAddr((String)value); - } - break; - - case ANNOTATIONS: - if (value == null) { - unsetAnnotations(); - } else { - setAnnotations((List)value); - } - break; - - case FLAG: - if (value == null) { - unsetFlag(); - } else { - setFlag((Short)value); - } - break; - - case ERR: - if (value == null) { - unsetErr(); - } else { - setErr((Integer)value); - } - break; - - case SPAN_EVENT_LIST: - if (value == null) { - unsetSpanEventList(); - } else { - setSpanEventList((List)value); - } - break; - - case PARENT_APPLICATION_NAME: - if (value == null) { - unsetParentApplicationName(); - } else { - setParentApplicationName((String)value); - } - break; - - case PARENT_APPLICATION_TYPE: - if (value == null) { - unsetParentApplicationType(); - } else { - setParentApplicationType((Short)value); - } - break; - - case ACCEPTOR_HOST: - if (value == null) { - unsetAcceptorHost(); - } else { - setAcceptorHost((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case APPLICATION_ID: - return getApplicationId(); - - case AGENT_IDENTIFIER: - return Short.valueOf(getAgentIdentifier()); - - case MOST_TRACE_ID: - return Long.valueOf(getMostTraceId()); - - case LEAST_TRACE_ID: - return Long.valueOf(getLeastTraceId()); - - case SPAN_ID: - return Integer.valueOf(getSpanId()); - - case PARENT_SPAN_ID: - return Integer.valueOf(getParentSpanId()); - - case START_TIME: - return Long.valueOf(getStartTime()); - - case ELAPSED: - return Integer.valueOf(getElapsed()); - - case RPC: - return getRpc(); - - case SERVICE_TYPE: - return Short.valueOf(getServiceType()); - - case END_POINT: - return getEndPoint(); - - case REMOTE_ADDR: - return getRemoteAddr(); - - case ANNOTATIONS: - return getAnnotations(); - - case FLAG: - return Short.valueOf(getFlag()); - - case ERR: - return Integer.valueOf(getErr()); - - case SPAN_EVENT_LIST: - return getSpanEventList(); - - case PARENT_APPLICATION_NAME: - return getParentApplicationName(); - - case PARENT_APPLICATION_TYPE: - return Short.valueOf(getParentApplicationType()); - - case ACCEPTOR_HOST: - return getAcceptorHost(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case APPLICATION_ID: - return isSetApplicationId(); - case AGENT_IDENTIFIER: - return isSetAgentIdentifier(); - case MOST_TRACE_ID: - return isSetMostTraceId(); - case LEAST_TRACE_ID: - return isSetLeastTraceId(); - case SPAN_ID: - return isSetSpanId(); - case PARENT_SPAN_ID: - return isSetParentSpanId(); - case START_TIME: - return isSetStartTime(); - case ELAPSED: - return isSetElapsed(); - case RPC: - return isSetRpc(); - case SERVICE_TYPE: - return isSetServiceType(); - case END_POINT: - return isSetEndPoint(); - case REMOTE_ADDR: - return isSetRemoteAddr(); - case ANNOTATIONS: - return isSetAnnotations(); - case FLAG: - return isSetFlag(); - case ERR: - return isSetErr(); - case SPAN_EVENT_LIST: - return isSetSpanEventList(); - case PARENT_APPLICATION_NAME: - return isSetParentApplicationName(); - case PARENT_APPLICATION_TYPE: - return isSetParentApplicationType(); - case ACCEPTOR_HOST: - return isSetAcceptorHost(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Span) - return this.equals((Span)that); - return false; - } - - public boolean equals(Span that) { - if (that == null) - return false; - - 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_applicationId = true && this.isSetApplicationId(); - boolean that_present_applicationId = true && that.isSetApplicationId(); - if (this_present_applicationId || that_present_applicationId) { - if (!(this_present_applicationId && that_present_applicationId)) - return false; - if (!this.applicationId.equals(that.applicationId)) - return false; - } - - boolean this_present_agentIdentifier = true; - boolean that_present_agentIdentifier = true; - if (this_present_agentIdentifier || that_present_agentIdentifier) { - if (!(this_present_agentIdentifier && that_present_agentIdentifier)) - return false; - if (this.agentIdentifier != that.agentIdentifier) - return false; - } - - boolean this_present_mostTraceId = true; - boolean that_present_mostTraceId = true; - if (this_present_mostTraceId || that_present_mostTraceId) { - if (!(this_present_mostTraceId && that_present_mostTraceId)) - return false; - if (this.mostTraceId != that.mostTraceId) - return false; - } - - boolean this_present_leastTraceId = true; - boolean that_present_leastTraceId = true; - if (this_present_leastTraceId || that_present_leastTraceId) { - if (!(this_present_leastTraceId && that_present_leastTraceId)) - return false; - if (this.leastTraceId != that.leastTraceId) - return false; - } - - boolean this_present_spanId = true; - boolean that_present_spanId = true; - if (this_present_spanId || that_present_spanId) { - if (!(this_present_spanId && that_present_spanId)) - return false; - if (this.spanId != that.spanId) - return false; - } - - boolean this_present_parentSpanId = true && this.isSetParentSpanId(); - boolean that_present_parentSpanId = true && that.isSetParentSpanId(); - if (this_present_parentSpanId || that_present_parentSpanId) { - if (!(this_present_parentSpanId && that_present_parentSpanId)) - return false; - if (this.parentSpanId != that.parentSpanId) - return false; - } - - boolean this_present_startTime = true; - boolean that_present_startTime = true; - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_elapsed = true; - boolean that_present_elapsed = true; - if (this_present_elapsed || that_present_elapsed) { - if (!(this_present_elapsed && that_present_elapsed)) - return false; - if (this.elapsed != that.elapsed) - return false; - } - - boolean this_present_rpc = true && this.isSetRpc(); - boolean that_present_rpc = true && that.isSetRpc(); - if (this_present_rpc || that_present_rpc) { - if (!(this_present_rpc && that_present_rpc)) - return false; - if (!this.rpc.equals(that.rpc)) - return false; - } - - boolean this_present_serviceType = true; - boolean that_present_serviceType = true; - if (this_present_serviceType || that_present_serviceType) { - if (!(this_present_serviceType && that_present_serviceType)) - return false; - if (this.serviceType != that.serviceType) - return false; - } - - boolean this_present_endPoint = true && this.isSetEndPoint(); - boolean that_present_endPoint = true && that.isSetEndPoint(); - if (this_present_endPoint || that_present_endPoint) { - if (!(this_present_endPoint && that_present_endPoint)) - return false; - if (!this.endPoint.equals(that.endPoint)) - return false; - } - - boolean this_present_remoteAddr = true && this.isSetRemoteAddr(); - boolean that_present_remoteAddr = true && that.isSetRemoteAddr(); - if (this_present_remoteAddr || that_present_remoteAddr) { - if (!(this_present_remoteAddr && that_present_remoteAddr)) - return false; - if (!this.remoteAddr.equals(that.remoteAddr)) - return false; - } - - boolean this_present_annotations = true && this.isSetAnnotations(); - boolean that_present_annotations = true && that.isSetAnnotations(); - if (this_present_annotations || that_present_annotations) { - if (!(this_present_annotations && that_present_annotations)) - return false; - if (!this.annotations.equals(that.annotations)) - return false; - } - - boolean this_present_flag = true && this.isSetFlag(); - boolean that_present_flag = true && that.isSetFlag(); - if (this_present_flag || that_present_flag) { - if (!(this_present_flag && that_present_flag)) - return false; - if (this.flag != that.flag) - return false; - } - - boolean this_present_err = true && this.isSetErr(); - boolean that_present_err = true && that.isSetErr(); - if (this_present_err || that_present_err) { - if (!(this_present_err && that_present_err)) - return false; - if (this.err != that.err) - return false; - } - - boolean this_present_spanEventList = true && this.isSetSpanEventList(); - boolean that_present_spanEventList = true && that.isSetSpanEventList(); - if (this_present_spanEventList || that_present_spanEventList) { - if (!(this_present_spanEventList && that_present_spanEventList)) - return false; - if (!this.spanEventList.equals(that.spanEventList)) - return false; - } - - boolean this_present_parentApplicationName = true && this.isSetParentApplicationName(); - boolean that_present_parentApplicationName = true && that.isSetParentApplicationName(); - if (this_present_parentApplicationName || that_present_parentApplicationName) { - if (!(this_present_parentApplicationName && that_present_parentApplicationName)) - return false; - if (!this.parentApplicationName.equals(that.parentApplicationName)) - return false; - } - - boolean this_present_parentApplicationType = true && this.isSetParentApplicationType(); - boolean that_present_parentApplicationType = true && that.isSetParentApplicationType(); - if (this_present_parentApplicationType || that_present_parentApplicationType) { - if (!(this_present_parentApplicationType && that_present_parentApplicationType)) - return false; - if (this.parentApplicationType != that.parentApplicationType) - return false; - } - - boolean this_present_acceptorHost = true && this.isSetAcceptorHost(); - boolean that_present_acceptorHost = true && that.isSetAcceptorHost(); - if (this_present_acceptorHost || that_present_acceptorHost) { - if (!(this_present_acceptorHost && that_present_acceptorHost)) - return false; - if (!this.acceptorHost.equals(that.acceptorHost)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(Span other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - Span typedOther = (Span)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(typedOther.isSetApplicationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApplicationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, typedOther.applicationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentIdentifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMostTraceId()).compareTo(typedOther.isSetMostTraceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMostTraceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mostTraceId, typedOther.mostTraceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLeastTraceId()).compareTo(typedOther.isSetLeastTraceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLeastTraceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leastTraceId, typedOther.leastTraceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(typedOther.isSetSpanId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpanId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, typedOther.spanId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParentSpanId()).compareTo(typedOther.isSetParentSpanId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParentSpanId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSpanId, typedOther.parentSpanId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetElapsed()).compareTo(typedOther.isSetElapsed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetElapsed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsed, typedOther.elapsed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRpc()).compareTo(typedOther.isSetRpc()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRpc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rpc, typedOther.rpc); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServiceType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEndPoint()).compareTo(typedOther.isSetEndPoint()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndPoint()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endPoint, typedOther.endPoint); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRemoteAddr()).compareTo(typedOther.isSetRemoteAddr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRemoteAddr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remoteAddr, typedOther.remoteAddr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAnnotations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFlag()).compareTo(typedOther.isSetFlag()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFlag()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.flag, typedOther.flag); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetErr()).compareTo(typedOther.isSetErr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetErr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err, typedOther.err); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpanEventList()).compareTo(typedOther.isSetSpanEventList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpanEventList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanEventList, typedOther.spanEventList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParentApplicationName()).compareTo(typedOther.isSetParentApplicationName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParentApplicationName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentApplicationName, typedOther.parentApplicationName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParentApplicationType()).compareTo(typedOther.isSetParentApplicationType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParentApplicationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentApplicationType, typedOther.parentApplicationType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAcceptorHost()).compareTo(typedOther.isSetAcceptorHost()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAcceptorHost()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acceptorHost, typedOther.acceptorHost); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Span("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("applicationId:"); - if (this.applicationId == null) { - sb.append("null"); - } else { - sb.append(this.applicationId); - } - first = false; - if (!first) sb.append(", "); - sb.append("agentIdentifier:"); - sb.append(this.agentIdentifier); - first = false; - if (!first) sb.append(", "); - sb.append("mostTraceId:"); - sb.append(this.mostTraceId); - first = false; - if (!first) sb.append(", "); - sb.append("leastTraceId:"); - sb.append(this.leastTraceId); - first = false; - if (!first) sb.append(", "); - sb.append("spanId:"); - sb.append(this.spanId); - first = false; - if (isSetParentSpanId()) { - if (!first) sb.append(", "); - sb.append("parentSpanId:"); - sb.append(this.parentSpanId); - first = false; - } - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - if (!first) sb.append(", "); - sb.append("elapsed:"); - sb.append(this.elapsed); - first = false; - if (isSetRpc()) { - if (!first) sb.append(", "); - sb.append("rpc:"); - if (this.rpc == null) { - sb.append("null"); - } else { - sb.append(this.rpc); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("serviceType:"); - sb.append(this.serviceType); - first = false; - if (isSetEndPoint()) { - if (!first) sb.append(", "); - sb.append("endPoint:"); - if (this.endPoint == null) { - sb.append("null"); - } else { - sb.append(this.endPoint); - } - first = false; - } - if (isSetRemoteAddr()) { - if (!first) sb.append(", "); - sb.append("remoteAddr:"); - if (this.remoteAddr == null) { - sb.append("null"); - } else { - sb.append(this.remoteAddr); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("annotations:"); - if (this.annotations == null) { - sb.append("null"); - } else { - sb.append(this.annotations); - } - first = false; - if (isSetFlag()) { - if (!first) sb.append(", "); - sb.append("flag:"); - sb.append(this.flag); - first = false; - } - if (isSetErr()) { - if (!first) sb.append(", "); - sb.append("err:"); - sb.append(this.err); - first = false; - } - if (isSetSpanEventList()) { - if (!first) sb.append(", "); - sb.append("spanEventList:"); - if (this.spanEventList == null) { - sb.append("null"); - } else { - sb.append(this.spanEventList); - } - first = false; - } - if (isSetParentApplicationName()) { - if (!first) sb.append(", "); - sb.append("parentApplicationName:"); - if (this.parentApplicationName == null) { - sb.append("null"); - } else { - sb.append(this.parentApplicationName); - } - first = false; - } - if (isSetParentApplicationType()) { - if (!first) sb.append(", "); - sb.append("parentApplicationType:"); - sb.append(this.parentApplicationType); - first = false; - } - if (isSetAcceptorHost()) { - if (!first) sb.append(", "); - sb.append("acceptorHost:"); - if (this.acceptorHost == null) { - sb.append("null"); - } else { - sb.append(this.acceptorHost); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 SpanStandardSchemeFactory implements SchemeFactory { - public SpanStandardScheme getScheme() { - return new SpanStandardScheme(); - } - } - - private static class SpanStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Span 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: // APPLICATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.applicationId = iprot.readString(); - struct.setApplicationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // AGENT_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MOST_TRACE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.mostTraceId = iprot.readI64(); - struct.setMostTraceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LEAST_TRACE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.leastTraceId = iprot.readI64(); - struct.setLeastTraceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // SPAN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.spanId = iprot.readI32(); - struct.setSpanIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // PARENT_SPAN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.parentSpanId = iprot.readI32(); - struct.setParentSpanIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // ELAPSED - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.elapsed = iprot.readI32(); - struct.setElapsedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // RPC - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.rpc = iprot.readString(); - struct.setRpcIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // SERVICE_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.serviceType = iprot.readI16(); - struct.setServiceTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // END_POINT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.endPoint = iprot.readString(); - struct.setEndPointIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 14: // REMOTE_ADDR - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.remoteAddr = iprot.readString(); - struct.setRemoteAddrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // ANNOTATIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); - struct.annotations = new ArrayList(_list16.size); - for (int _i17 = 0; _i17 < _list16.size; ++_i17) - { - Annotation _elem18; // required - _elem18 = new Annotation(); - _elem18.read(iprot); - struct.annotations.add(_elem18); - } - iprot.readListEnd(); - } - struct.setAnnotationsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 16: // FLAG - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.flag = iprot.readI16(); - struct.setFlagIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 17: // ERR - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.err = iprot.readI32(); - struct.setErrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 18: // SPAN_EVENT_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); - struct.spanEventList = new ArrayList(_list19.size); - for (int _i20 = 0; _i20 < _list19.size; ++_i20) - { - SpanEvent _elem21; // required - _elem21 = new SpanEvent(); - _elem21.read(iprot); - struct.spanEventList.add(_elem21); - } - iprot.readListEnd(); - } - struct.setSpanEventListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 19: // PARENT_APPLICATION_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.parentApplicationName = iprot.readString(); - struct.setParentApplicationNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 20: // PARENT_APPLICATION_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.parentApplicationType = iprot.readI16(); - struct.setParentApplicationTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 21: // ACCEPTOR_HOST - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.acceptorHost = iprot.readString(); - struct.setAcceptorHostIsSet(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, Span struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - if (struct.applicationId != null) { - oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); - oprot.writeString(struct.applicationId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); - oprot.writeI16(struct.agentIdentifier); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MOST_TRACE_ID_FIELD_DESC); - oprot.writeI64(struct.mostTraceId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LEAST_TRACE_ID_FIELD_DESC); - oprot.writeI64(struct.leastTraceId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SPAN_ID_FIELD_DESC); - oprot.writeI32(struct.spanId); - oprot.writeFieldEnd(); - if (struct.isSetParentSpanId()) { - oprot.writeFieldBegin(PARENT_SPAN_ID_FIELD_DESC); - oprot.writeI32(struct.parentSpanId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(ELAPSED_FIELD_DESC); - oprot.writeI32(struct.elapsed); - oprot.writeFieldEnd(); - if (struct.rpc != null) { - if (struct.isSetRpc()) { - oprot.writeFieldBegin(RPC_FIELD_DESC); - oprot.writeString(struct.rpc); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); - oprot.writeI16(struct.serviceType); - oprot.writeFieldEnd(); - if (struct.endPoint != null) { - if (struct.isSetEndPoint()) { - oprot.writeFieldBegin(END_POINT_FIELD_DESC); - oprot.writeString(struct.endPoint); - oprot.writeFieldEnd(); - } - } - if (struct.remoteAddr != null) { - if (struct.isSetRemoteAddr()) { - oprot.writeFieldBegin(REMOTE_ADDR_FIELD_DESC); - oprot.writeString(struct.remoteAddr); - oprot.writeFieldEnd(); - } - } - if (struct.annotations != null) { - oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.annotations.size())); - for (Annotation _iter22 : struct.annotations) - { - _iter22.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetFlag()) { - oprot.writeFieldBegin(FLAG_FIELD_DESC); - oprot.writeI16(struct.flag); - oprot.writeFieldEnd(); - } - if (struct.isSetErr()) { - oprot.writeFieldBegin(ERR_FIELD_DESC); - oprot.writeI32(struct.err); - oprot.writeFieldEnd(); - } - if (struct.spanEventList != null) { - if (struct.isSetSpanEventList()) { - oprot.writeFieldBegin(SPAN_EVENT_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.spanEventList.size())); - for (SpanEvent _iter23 : struct.spanEventList) - { - _iter23.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.parentApplicationName != null) { - if (struct.isSetParentApplicationName()) { - oprot.writeFieldBegin(PARENT_APPLICATION_NAME_FIELD_DESC); - oprot.writeString(struct.parentApplicationName); - oprot.writeFieldEnd(); - } - } - if (struct.isSetParentApplicationType()) { - oprot.writeFieldBegin(PARENT_APPLICATION_TYPE_FIELD_DESC); - oprot.writeI16(struct.parentApplicationType); - oprot.writeFieldEnd(); - } - if (struct.acceptorHost != null) { - if (struct.isSetAcceptorHost()) { - oprot.writeFieldBegin(ACCEPTOR_HOST_FIELD_DESC); - oprot.writeString(struct.acceptorHost); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SpanTupleSchemeFactory implements SchemeFactory { - public SpanTupleScheme getScheme() { - return new SpanTupleScheme(); - } - } - - private static class SpanTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetApplicationId()) { - optionals.set(1); - } - if (struct.isSetAgentIdentifier()) { - optionals.set(2); - } - if (struct.isSetMostTraceId()) { - optionals.set(3); - } - if (struct.isSetLeastTraceId()) { - optionals.set(4); - } - if (struct.isSetSpanId()) { - optionals.set(5); - } - if (struct.isSetParentSpanId()) { - optionals.set(6); - } - if (struct.isSetStartTime()) { - optionals.set(7); - } - if (struct.isSetElapsed()) { - optionals.set(8); - } - if (struct.isSetRpc()) { - optionals.set(9); - } - if (struct.isSetServiceType()) { - optionals.set(10); - } - if (struct.isSetEndPoint()) { - optionals.set(11); - } - if (struct.isSetRemoteAddr()) { - optionals.set(12); - } - if (struct.isSetAnnotations()) { - optionals.set(13); - } - if (struct.isSetFlag()) { - optionals.set(14); - } - if (struct.isSetErr()) { - optionals.set(15); - } - if (struct.isSetSpanEventList()) { - optionals.set(16); - } - if (struct.isSetParentApplicationName()) { - optionals.set(17); - } - if (struct.isSetParentApplicationType()) { - optionals.set(18); - } - if (struct.isSetAcceptorHost()) { - optionals.set(19); - } - oprot.writeBitSet(optionals, 20); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetApplicationId()) { - oprot.writeString(struct.applicationId); - } - if (struct.isSetAgentIdentifier()) { - oprot.writeI16(struct.agentIdentifier); - } - if (struct.isSetMostTraceId()) { - oprot.writeI64(struct.mostTraceId); - } - if (struct.isSetLeastTraceId()) { - oprot.writeI64(struct.leastTraceId); - } - if (struct.isSetSpanId()) { - oprot.writeI32(struct.spanId); - } - if (struct.isSetParentSpanId()) { - oprot.writeI32(struct.parentSpanId); - } - if (struct.isSetStartTime()) { - oprot.writeI64(struct.startTime); - } - if (struct.isSetElapsed()) { - oprot.writeI32(struct.elapsed); - } - if (struct.isSetRpc()) { - oprot.writeString(struct.rpc); - } - if (struct.isSetServiceType()) { - oprot.writeI16(struct.serviceType); - } - if (struct.isSetEndPoint()) { - oprot.writeString(struct.endPoint); - } - if (struct.isSetRemoteAddr()) { - oprot.writeString(struct.remoteAddr); - } - if (struct.isSetAnnotations()) { - { - oprot.writeI32(struct.annotations.size()); - for (Annotation _iter24 : struct.annotations) - { - _iter24.write(oprot); - } - } - } - if (struct.isSetFlag()) { - oprot.writeI16(struct.flag); - } - if (struct.isSetErr()) { - oprot.writeI32(struct.err); - } - if (struct.isSetSpanEventList()) { - { - oprot.writeI32(struct.spanEventList.size()); - for (SpanEvent _iter25 : struct.spanEventList) - { - _iter25.write(oprot); - } - } - } - if (struct.isSetParentApplicationName()) { - oprot.writeString(struct.parentApplicationName); - } - if (struct.isSetParentApplicationType()) { - oprot.writeI16(struct.parentApplicationType); - } - if (struct.isSetAcceptorHost()) { - oprot.writeString(struct.acceptorHost); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(20); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.applicationId = iprot.readString(); - struct.setApplicationIdIsSet(true); - } - if (incoming.get(2)) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } - if (incoming.get(3)) { - struct.mostTraceId = iprot.readI64(); - struct.setMostTraceIdIsSet(true); - } - if (incoming.get(4)) { - struct.leastTraceId = iprot.readI64(); - struct.setLeastTraceIdIsSet(true); - } - if (incoming.get(5)) { - struct.spanId = iprot.readI32(); - struct.setSpanIdIsSet(true); - } - if (incoming.get(6)) { - struct.parentSpanId = iprot.readI32(); - struct.setParentSpanIdIsSet(true); - } - if (incoming.get(7)) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } - if (incoming.get(8)) { - struct.elapsed = iprot.readI32(); - struct.setElapsedIsSet(true); - } - if (incoming.get(9)) { - struct.rpc = iprot.readString(); - struct.setRpcIsSet(true); - } - if (incoming.get(10)) { - struct.serviceType = iprot.readI16(); - struct.setServiceTypeIsSet(true); - } - if (incoming.get(11)) { - struct.endPoint = iprot.readString(); - struct.setEndPointIsSet(true); - } - if (incoming.get(12)) { - struct.remoteAddr = iprot.readString(); - struct.setRemoteAddrIsSet(true); - } - if (incoming.get(13)) { - { - org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.annotations = new ArrayList(_list26.size); - for (int _i27 = 0; _i27 < _list26.size; ++_i27) - { - Annotation _elem28; // required - _elem28 = new Annotation(); - _elem28.read(iprot); - struct.annotations.add(_elem28); - } - } - struct.setAnnotationsIsSet(true); - } - if (incoming.get(14)) { - struct.flag = iprot.readI16(); - struct.setFlagIsSet(true); - } - if (incoming.get(15)) { - struct.err = iprot.readI32(); - struct.setErrIsSet(true); - } - if (incoming.get(16)) { - { - org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.spanEventList = new ArrayList(_list29.size); - for (int _i30 = 0; _i30 < _list29.size; ++_i30) - { - SpanEvent _elem31; // required - _elem31 = new SpanEvent(); - _elem31.read(iprot); - struct.spanEventList.add(_elem31); - } - } - struct.setSpanEventListIsSet(true); - } - if (incoming.get(17)) { - struct.parentApplicationName = iprot.readString(); - struct.setParentApplicationNameIsSet(true); - } - if (incoming.get(18)) { - struct.parentApplicationType = iprot.readI16(); - struct.setParentApplicationTypeIsSet(true); - } - if (incoming.get(19)) { - struct.acceptorHost = iprot.readString(); - struct.setAcceptorHostIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Span implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Span"); + + 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 APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)3); + private static final org.apache.thrift.protocol.TField MOST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mostTraceId", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField LEAST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("leastTraceId", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField PARENT_SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentSpanId", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsed", org.apache.thrift.protocol.TType.I32, (short)9); + private static final org.apache.thrift.protocol.TField RPC_FIELD_DESC = new org.apache.thrift.protocol.TField("rpc", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)12); + private static final org.apache.thrift.protocol.TField END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("endPoint", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField REMOTE_ADDR_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteAddr", org.apache.thrift.protocol.TType.STRING, (short)14); + private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)15); + private static final org.apache.thrift.protocol.TField FLAG_FIELD_DESC = new org.apache.thrift.protocol.TField("flag", org.apache.thrift.protocol.TType.I16, (short)16); + private static final org.apache.thrift.protocol.TField ERR_FIELD_DESC = new org.apache.thrift.protocol.TField("err", org.apache.thrift.protocol.TType.I32, (short)17); + private static final org.apache.thrift.protocol.TField SPAN_EVENT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("spanEventList", org.apache.thrift.protocol.TType.LIST, (short)18); + private static final org.apache.thrift.protocol.TField PARENT_APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentApplicationName", org.apache.thrift.protocol.TType.STRING, (short)19); + private static final org.apache.thrift.protocol.TField PARENT_APPLICATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("parentApplicationType", org.apache.thrift.protocol.TType.I16, (short)20); + private static final org.apache.thrift.protocol.TField ACCEPTOR_HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("acceptorHost", org.apache.thrift.protocol.TType.STRING, (short)21); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SpanStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SpanTupleSchemeFactory()); + } + + private String agentId; // required + private String applicationId; // required + private short agentIdentifier; // required + private long mostTraceId; // required + private long leastTraceId; // required + private int spanId; // required + private int parentSpanId; // optional + private long startTime; // required + private int elapsed; // required + private String rpc; // optional + private short serviceType; // required + private String endPoint; // optional + private String remoteAddr; // optional + private List annotations; // required + private short flag; // optional + private int err; // optional + private List spanEventList; // optional + private String parentApplicationName; // optional + private short parentApplicationType; // optional + private String acceptorHost; // 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"), + APPLICATION_ID((short)2, "applicationId"), + AGENT_IDENTIFIER((short)3, "agentIdentifier"), + MOST_TRACE_ID((short)4, "mostTraceId"), + LEAST_TRACE_ID((short)5, "leastTraceId"), + SPAN_ID((short)6, "spanId"), + PARENT_SPAN_ID((short)7, "parentSpanId"), + START_TIME((short)8, "startTime"), + ELAPSED((short)9, "elapsed"), + RPC((short)10, "rpc"), + SERVICE_TYPE((short)12, "serviceType"), + END_POINT((short)13, "endPoint"), + REMOTE_ADDR((short)14, "remoteAddr"), + ANNOTATIONS((short)15, "annotations"), + FLAG((short)16, "flag"), + ERR((short)17, "err"), + SPAN_EVENT_LIST((short)18, "spanEventList"), + PARENT_APPLICATION_NAME((short)19, "parentApplicationName"), + PARENT_APPLICATION_TYPE((short)20, "parentApplicationType"), + ACCEPTOR_HOST((short)21, "acceptorHost"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // APPLICATION_ID + return APPLICATION_ID; + case 3: // AGENT_IDENTIFIER + return AGENT_IDENTIFIER; + case 4: // MOST_TRACE_ID + return MOST_TRACE_ID; + case 5: // LEAST_TRACE_ID + return LEAST_TRACE_ID; + case 6: // SPAN_ID + return SPAN_ID; + case 7: // PARENT_SPAN_ID + return PARENT_SPAN_ID; + case 8: // START_TIME + return START_TIME; + case 9: // ELAPSED + return ELAPSED; + case 10: // RPC + return RPC; + case 12: // SERVICE_TYPE + return SERVICE_TYPE; + case 13: // END_POINT + return END_POINT; + case 14: // REMOTE_ADDR + return REMOTE_ADDR; + case 15: // ANNOTATIONS + return ANNOTATIONS; + case 16: // FLAG + return FLAG; + case 17: // ERR + return ERR; + case 18: // SPAN_EVENT_LIST + return SPAN_EVENT_LIST; + case 19: // PARENT_APPLICATION_NAME + return PARENT_APPLICATION_NAME; + case 20: // PARENT_APPLICATION_TYPE + return PARENT_APPLICATION_TYPE; + case 21: // ACCEPTOR_HOST + return ACCEPTOR_HOST; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __AGENTIDENTIFIER_ISSET_ID = 0; + private static final int __MOSTTRACEID_ISSET_ID = 1; + private static final int __LEASTTRACEID_ISSET_ID = 2; + private static final int __SPANID_ISSET_ID = 3; + private static final int __PARENTSPANID_ISSET_ID = 4; + private static final int __STARTTIME_ISSET_ID = 5; + private static final int __ELAPSED_ISSET_ID = 6; + private static final int __SERVICETYPE_ISSET_ID = 7; + private static final int __FLAG_ISSET_ID = 8; + private static final int __ERR_ISSET_ID = 9; + private static final int __PARENTAPPLICATIONTYPE_ISSET_ID = 10; + private short __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PARENT_SPAN_ID,_Fields.RPC,_Fields.END_POINT,_Fields.REMOTE_ADDR,_Fields.FLAG,_Fields.ERR,_Fields.SPAN_EVENT_LIST,_Fields.PARENT_APPLICATION_NAME,_Fields.PARENT_APPLICATION_TYPE,_Fields.ACCEPTOR_HOST}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.MOST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("mostTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEAST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("leastTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.PARENT_SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("parentSpanId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("elapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RPC, new org.apache.thrift.meta_data.FieldMetaData("rpc", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.END_POINT, new org.apache.thrift.meta_data.FieldMetaData("endPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REMOTE_ADDR, new org.apache.thrift.meta_data.FieldMetaData("remoteAddr", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", 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, Annotation.class)))); + tmpMap.put(_Fields.FLAG, new org.apache.thrift.meta_data.FieldMetaData("flag", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.ERR, new org.apache.thrift.meta_data.FieldMetaData("err", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SPAN_EVENT_LIST, new org.apache.thrift.meta_data.FieldMetaData("spanEventList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpanEvent.class)))); + tmpMap.put(_Fields.PARENT_APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentApplicationName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARENT_APPLICATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("parentApplicationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.ACCEPTOR_HOST, new org.apache.thrift.meta_data.FieldMetaData("acceptorHost", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Span.class, metaDataMap); + } + + public Span() { + this.parentSpanId = -1; + + this.flag = (short)0; + + } + + public Span( + String agentId, + String applicationId, + short agentIdentifier, + long mostTraceId, + long leastTraceId, + int spanId, + long startTime, + int elapsed, + short serviceType, + List annotations) + { + this(); + this.agentId = agentId; + this.applicationId = applicationId; + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + this.mostTraceId = mostTraceId; + setMostTraceIdIsSet(true); + this.leastTraceId = leastTraceId; + setLeastTraceIdIsSet(true); + this.spanId = spanId; + setSpanIdIsSet(true); + this.startTime = startTime; + setStartTimeIsSet(true); + this.elapsed = elapsed; + setElapsedIsSet(true); + this.serviceType = serviceType; + setServiceTypeIsSet(true); + this.annotations = annotations; + } + + /** + * Performs a deep copy on other. + */ + public Span(Span other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + if (other.isSetApplicationId()) { + this.applicationId = other.applicationId; + } + this.agentIdentifier = other.agentIdentifier; + this.mostTraceId = other.mostTraceId; + this.leastTraceId = other.leastTraceId; + this.spanId = other.spanId; + this.parentSpanId = other.parentSpanId; + this.startTime = other.startTime; + this.elapsed = other.elapsed; + if (other.isSetRpc()) { + this.rpc = other.rpc; + } + this.serviceType = other.serviceType; + if (other.isSetEndPoint()) { + this.endPoint = other.endPoint; + } + if (other.isSetRemoteAddr()) { + this.remoteAddr = other.remoteAddr; + } + if (other.isSetAnnotations()) { + List __this__annotations = new ArrayList(); + for (Annotation other_element : other.annotations) { + __this__annotations.add(new Annotation(other_element)); + } + this.annotations = __this__annotations; + } + this.flag = other.flag; + this.err = other.err; + if (other.isSetSpanEventList()) { + List __this__spanEventList = new ArrayList(); + for (SpanEvent other_element : other.spanEventList) { + __this__spanEventList.add(new SpanEvent(other_element)); + } + this.spanEventList = __this__spanEventList; + } + if (other.isSetParentApplicationName()) { + this.parentApplicationName = other.parentApplicationName; + } + this.parentApplicationType = other.parentApplicationType; + if (other.isSetAcceptorHost()) { + this.acceptorHost = other.acceptorHost; + } + } + + public Span deepCopy() { + return new Span(this); + } + + @Override + public void clear() { + this.agentId = null; + this.applicationId = null; + setAgentIdentifierIsSet(false); + this.agentIdentifier = 0; + setMostTraceIdIsSet(false); + this.mostTraceId = 0; + setLeastTraceIdIsSet(false); + this.leastTraceId = 0; + setSpanIdIsSet(false); + this.spanId = 0; + this.parentSpanId = -1; + + setStartTimeIsSet(false); + this.startTime = 0; + setElapsedIsSet(false); + this.elapsed = 0; + this.rpc = null; + setServiceTypeIsSet(false); + this.serviceType = 0; + this.endPoint = null; + this.remoteAddr = null; + this.annotations = null; + this.flag = (short)0; + + setErrIsSet(false); + this.err = 0; + this.spanEventList = null; + this.parentApplicationName = null; + setParentApplicationTypeIsSet(false); + this.parentApplicationType = 0; + this.acceptorHost = null; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public void unsetApplicationId() { + this.applicationId = null; + } + + /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ + public boolean isSetApplicationId() { + return this.applicationId != null; + } + + public void setApplicationIdIsSet(boolean value) { + if (!value) { + this.applicationId = null; + } + } + + public short getAgentIdentifier() { + return this.agentIdentifier; + } + + public void setAgentIdentifier(short agentIdentifier) { + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + } + + public void unsetAgentIdentifier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentIdentifier() { + return EncodingUtils.testBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + public void setAgentIdentifierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID, value); + } + + public long getMostTraceId() { + return this.mostTraceId; + } + + public void setMostTraceId(long mostTraceId) { + this.mostTraceId = mostTraceId; + setMostTraceIdIsSet(true); + } + + public void unsetMostTraceId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID); + } + + /** Returns true if field mostTraceId is set (has been assigned a value) and false otherwise */ + public boolean isSetMostTraceId() { + return EncodingUtils.testBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID); + } + + public void setMostTraceIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID, value); + } + + public long getLeastTraceId() { + return this.leastTraceId; + } + + public void setLeastTraceId(long leastTraceId) { + this.leastTraceId = leastTraceId; + setLeastTraceIdIsSet(true); + } + + public void unsetLeastTraceId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID); + } + + /** Returns true if field leastTraceId is set (has been assigned a value) and false otherwise */ + public boolean isSetLeastTraceId() { + return EncodingUtils.testBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID); + } + + public void setLeastTraceIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID, value); + } + + public int getSpanId() { + return this.spanId; + } + + public void setSpanId(int spanId) { + this.spanId = spanId; + setSpanIdIsSet(true); + } + + public void unsetSpanId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID); + } + + /** Returns true if field spanId is set (has been assigned a value) and false otherwise */ + public boolean isSetSpanId() { + return EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID); + } + + public void setSpanIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value); + } + + public int getParentSpanId() { + return this.parentSpanId; + } + + public void setParentSpanId(int parentSpanId) { + this.parentSpanId = parentSpanId; + setParentSpanIdIsSet(true); + } + + public void unsetParentSpanId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTSPANID_ISSET_ID); + } + + /** Returns true if field parentSpanId is set (has been assigned a value) and false otherwise */ + public boolean isSetParentSpanId() { + return EncodingUtils.testBit(__isset_bitfield, __PARENTSPANID_ISSET_ID); + } + + public void setParentSpanIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTSPANID_ISSET_ID, value); + } + + public long getStartTime() { + return this.startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + } + + public void unsetStartTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public int getElapsed() { + return this.elapsed; + } + + public void setElapsed(int elapsed) { + this.elapsed = elapsed; + setElapsedIsSet(true); + } + + public void unsetElapsed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_ISSET_ID); + } + + /** Returns true if field elapsed is set (has been assigned a value) and false otherwise */ + public boolean isSetElapsed() { + return EncodingUtils.testBit(__isset_bitfield, __ELAPSED_ISSET_ID); + } + + public void setElapsedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ELAPSED_ISSET_ID, value); + } + + public String getRpc() { + return this.rpc; + } + + public void setRpc(String rpc) { + this.rpc = rpc; + } + + public void unsetRpc() { + this.rpc = null; + } + + /** Returns true if field rpc is set (has been assigned a value) and false otherwise */ + public boolean isSetRpc() { + return this.rpc != null; + } + + public void setRpcIsSet(boolean value) { + if (!value) { + this.rpc = null; + } + } + + public short getServiceType() { + return this.serviceType; + } + + public void setServiceType(short serviceType) { + this.serviceType = serviceType; + setServiceTypeIsSet(true); + } + + public void unsetServiceType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ + public boolean isSetServiceType() { + return EncodingUtils.testBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + public void setServiceTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVICETYPE_ISSET_ID, value); + } + + public String getEndPoint() { + return this.endPoint; + } + + public void setEndPoint(String endPoint) { + this.endPoint = endPoint; + } + + public void unsetEndPoint() { + this.endPoint = null; + } + + /** Returns true if field endPoint is set (has been assigned a value) and false otherwise */ + public boolean isSetEndPoint() { + return this.endPoint != null; + } + + public void setEndPointIsSet(boolean value) { + if (!value) { + this.endPoint = null; + } + } + + public String getRemoteAddr() { + return this.remoteAddr; + } + + public void setRemoteAddr(String remoteAddr) { + this.remoteAddr = remoteAddr; + } + + public void unsetRemoteAddr() { + this.remoteAddr = null; + } + + /** Returns true if field remoteAddr is set (has been assigned a value) and false otherwise */ + public boolean isSetRemoteAddr() { + return this.remoteAddr != null; + } + + public void setRemoteAddrIsSet(boolean value) { + if (!value) { + this.remoteAddr = null; + } + } + + public int getAnnotationsSize() { + return (this.annotations == null) ? 0 : this.annotations.size(); + } + + public java.util.Iterator getAnnotationsIterator() { + return (this.annotations == null) ? null : this.annotations.iterator(); + } + + public void addToAnnotations(Annotation elem) { + if (this.annotations == null) { + this.annotations = new ArrayList(); + } + this.annotations.add(elem); + } + + public List getAnnotations() { + return this.annotations; + } + + public void setAnnotations(List annotations) { + this.annotations = annotations; + } + + public void unsetAnnotations() { + this.annotations = null; + } + + /** Returns true if field annotations is set (has been assigned a value) and false otherwise */ + public boolean isSetAnnotations() { + return this.annotations != null; + } + + public void setAnnotationsIsSet(boolean value) { + if (!value) { + this.annotations = null; + } + } + + public short getFlag() { + return this.flag; + } + + public void setFlag(short flag) { + this.flag = flag; + setFlagIsSet(true); + } + + public void unsetFlag() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FLAG_ISSET_ID); + } + + /** Returns true if field flag is set (has been assigned a value) and false otherwise */ + public boolean isSetFlag() { + return EncodingUtils.testBit(__isset_bitfield, __FLAG_ISSET_ID); + } + + public void setFlagIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FLAG_ISSET_ID, value); + } + + public int getErr() { + return this.err; + } + + public void setErr(int err) { + this.err = err; + setErrIsSet(true); + } + + public void unsetErr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERR_ISSET_ID); + } + + /** Returns true if field err is set (has been assigned a value) and false otherwise */ + public boolean isSetErr() { + return EncodingUtils.testBit(__isset_bitfield, __ERR_ISSET_ID); + } + + public void setErrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERR_ISSET_ID, value); + } + + public int getSpanEventListSize() { + return (this.spanEventList == null) ? 0 : this.spanEventList.size(); + } + + public java.util.Iterator getSpanEventListIterator() { + return (this.spanEventList == null) ? null : this.spanEventList.iterator(); + } + + public void addToSpanEventList(SpanEvent elem) { + if (this.spanEventList == null) { + this.spanEventList = new ArrayList(); + } + this.spanEventList.add(elem); + } + + public List getSpanEventList() { + return this.spanEventList; + } + + public void setSpanEventList(List spanEventList) { + this.spanEventList = spanEventList; + } + + public void unsetSpanEventList() { + this.spanEventList = null; + } + + /** Returns true if field spanEventList is set (has been assigned a value) and false otherwise */ + public boolean isSetSpanEventList() { + return this.spanEventList != null; + } + + public void setSpanEventListIsSet(boolean value) { + if (!value) { + this.spanEventList = null; + } + } + + public String getParentApplicationName() { + return this.parentApplicationName; + } + + public void setParentApplicationName(String parentApplicationName) { + this.parentApplicationName = parentApplicationName; + } + + public void unsetParentApplicationName() { + this.parentApplicationName = null; + } + + /** Returns true if field parentApplicationName is set (has been assigned a value) and false otherwise */ + public boolean isSetParentApplicationName() { + return this.parentApplicationName != null; + } + + public void setParentApplicationNameIsSet(boolean value) { + if (!value) { + this.parentApplicationName = null; + } + } + + public short getParentApplicationType() { + return this.parentApplicationType; + } + + public void setParentApplicationType(short parentApplicationType) { + this.parentApplicationType = parentApplicationType; + setParentApplicationTypeIsSet(true); + } + + public void unsetParentApplicationType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTAPPLICATIONTYPE_ISSET_ID); + } + + /** Returns true if field parentApplicationType is set (has been assigned a value) and false otherwise */ + public boolean isSetParentApplicationType() { + return EncodingUtils.testBit(__isset_bitfield, __PARENTAPPLICATIONTYPE_ISSET_ID); + } + + public void setParentApplicationTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTAPPLICATIONTYPE_ISSET_ID, value); + } + + public String getAcceptorHost() { + return this.acceptorHost; + } + + public void setAcceptorHost(String acceptorHost) { + this.acceptorHost = acceptorHost; + } + + public void unsetAcceptorHost() { + this.acceptorHost = null; + } + + /** Returns true if field acceptorHost is set (has been assigned a value) and false otherwise */ + public boolean isSetAcceptorHost() { + return this.acceptorHost != null; + } + + public void setAcceptorHostIsSet(boolean value) { + if (!value) { + this.acceptorHost = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case APPLICATION_ID: + if (value == null) { + unsetApplicationId(); + } else { + setApplicationId((String)value); + } + break; + + case AGENT_IDENTIFIER: + if (value == null) { + unsetAgentIdentifier(); + } else { + setAgentIdentifier((Short)value); + } + break; + + case MOST_TRACE_ID: + if (value == null) { + unsetMostTraceId(); + } else { + setMostTraceId((Long)value); + } + break; + + case LEAST_TRACE_ID: + if (value == null) { + unsetLeastTraceId(); + } else { + setLeastTraceId((Long)value); + } + break; + + case SPAN_ID: + if (value == null) { + unsetSpanId(); + } else { + setSpanId((Integer)value); + } + break; + + case PARENT_SPAN_ID: + if (value == null) { + unsetParentSpanId(); + } else { + setParentSpanId((Integer)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((Long)value); + } + break; + + case ELAPSED: + if (value == null) { + unsetElapsed(); + } else { + setElapsed((Integer)value); + } + break; + + case RPC: + if (value == null) { + unsetRpc(); + } else { + setRpc((String)value); + } + break; + + case SERVICE_TYPE: + if (value == null) { + unsetServiceType(); + } else { + setServiceType((Short)value); + } + break; + + case END_POINT: + if (value == null) { + unsetEndPoint(); + } else { + setEndPoint((String)value); + } + break; + + case REMOTE_ADDR: + if (value == null) { + unsetRemoteAddr(); + } else { + setRemoteAddr((String)value); + } + break; + + case ANNOTATIONS: + if (value == null) { + unsetAnnotations(); + } else { + setAnnotations((List)value); + } + break; + + case FLAG: + if (value == null) { + unsetFlag(); + } else { + setFlag((Short)value); + } + break; + + case ERR: + if (value == null) { + unsetErr(); + } else { + setErr((Integer)value); + } + break; + + case SPAN_EVENT_LIST: + if (value == null) { + unsetSpanEventList(); + } else { + setSpanEventList((List)value); + } + break; + + case PARENT_APPLICATION_NAME: + if (value == null) { + unsetParentApplicationName(); + } else { + setParentApplicationName((String)value); + } + break; + + case PARENT_APPLICATION_TYPE: + if (value == null) { + unsetParentApplicationType(); + } else { + setParentApplicationType((Short)value); + } + break; + + case ACCEPTOR_HOST: + if (value == null) { + unsetAcceptorHost(); + } else { + setAcceptorHost((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case APPLICATION_ID: + return getApplicationId(); + + case AGENT_IDENTIFIER: + return Short.valueOf(getAgentIdentifier()); + + case MOST_TRACE_ID: + return Long.valueOf(getMostTraceId()); + + case LEAST_TRACE_ID: + return Long.valueOf(getLeastTraceId()); + + case SPAN_ID: + return Integer.valueOf(getSpanId()); + + case PARENT_SPAN_ID: + return Integer.valueOf(getParentSpanId()); + + case START_TIME: + return Long.valueOf(getStartTime()); + + case ELAPSED: + return Integer.valueOf(getElapsed()); + + case RPC: + return getRpc(); + + case SERVICE_TYPE: + return Short.valueOf(getServiceType()); + + case END_POINT: + return getEndPoint(); + + case REMOTE_ADDR: + return getRemoteAddr(); + + case ANNOTATIONS: + return getAnnotations(); + + case FLAG: + return Short.valueOf(getFlag()); + + case ERR: + return Integer.valueOf(getErr()); + + case SPAN_EVENT_LIST: + return getSpanEventList(); + + case PARENT_APPLICATION_NAME: + return getParentApplicationName(); + + case PARENT_APPLICATION_TYPE: + return Short.valueOf(getParentApplicationType()); + + case ACCEPTOR_HOST: + return getAcceptorHost(); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case APPLICATION_ID: + return isSetApplicationId(); + case AGENT_IDENTIFIER: + return isSetAgentIdentifier(); + case MOST_TRACE_ID: + return isSetMostTraceId(); + case LEAST_TRACE_ID: + return isSetLeastTraceId(); + case SPAN_ID: + return isSetSpanId(); + case PARENT_SPAN_ID: + return isSetParentSpanId(); + case START_TIME: + return isSetStartTime(); + case ELAPSED: + return isSetElapsed(); + case RPC: + return isSetRpc(); + case SERVICE_TYPE: + return isSetServiceType(); + case END_POINT: + return isSetEndPoint(); + case REMOTE_ADDR: + return isSetRemoteAddr(); + case ANNOTATIONS: + return isSetAnnotations(); + case FLAG: + return isSetFlag(); + case ERR: + return isSetErr(); + case SPAN_EVENT_LIST: + return isSetSpanEventList(); + case PARENT_APPLICATION_NAME: + return isSetParentApplicationName(); + case PARENT_APPLICATION_TYPE: + return isSetParentApplicationType(); + case ACCEPTOR_HOST: + return isSetAcceptorHost(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Span) + return this.equals((Span)that); + return false; + } + + public boolean equals(Span that) { + if (that == null) + return false; + + 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_applicationId = true && this.isSetApplicationId(); + boolean that_present_applicationId = true && that.isSetApplicationId(); + if (this_present_applicationId || that_present_applicationId) { + if (!(this_present_applicationId && that_present_applicationId)) + return false; + if (!this.applicationId.equals(that.applicationId)) + return false; + } + + boolean this_present_agentIdentifier = true; + boolean that_present_agentIdentifier = true; + if (this_present_agentIdentifier || that_present_agentIdentifier) { + if (!(this_present_agentIdentifier && that_present_agentIdentifier)) + return false; + if (this.agentIdentifier != that.agentIdentifier) + return false; + } + + boolean this_present_mostTraceId = true; + boolean that_present_mostTraceId = true; + if (this_present_mostTraceId || that_present_mostTraceId) { + if (!(this_present_mostTraceId && that_present_mostTraceId)) + return false; + if (this.mostTraceId != that.mostTraceId) + return false; + } + + boolean this_present_leastTraceId = true; + boolean that_present_leastTraceId = true; + if (this_present_leastTraceId || that_present_leastTraceId) { + if (!(this_present_leastTraceId && that_present_leastTraceId)) + return false; + if (this.leastTraceId != that.leastTraceId) + return false; + } + + boolean this_present_spanId = true; + boolean that_present_spanId = true; + if (this_present_spanId || that_present_spanId) { + if (!(this_present_spanId && that_present_spanId)) + return false; + if (this.spanId != that.spanId) + return false; + } + + boolean this_present_parentSpanId = true && this.isSetParentSpanId(); + boolean that_present_parentSpanId = true && that.isSetParentSpanId(); + if (this_present_parentSpanId || that_present_parentSpanId) { + if (!(this_present_parentSpanId && that_present_parentSpanId)) + return false; + if (this.parentSpanId != that.parentSpanId) + return false; + } + + boolean this_present_startTime = true; + boolean that_present_startTime = true; + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_elapsed = true; + boolean that_present_elapsed = true; + if (this_present_elapsed || that_present_elapsed) { + if (!(this_present_elapsed && that_present_elapsed)) + return false; + if (this.elapsed != that.elapsed) + return false; + } + + boolean this_present_rpc = true && this.isSetRpc(); + boolean that_present_rpc = true && that.isSetRpc(); + if (this_present_rpc || that_present_rpc) { + if (!(this_present_rpc && that_present_rpc)) + return false; + if (!this.rpc.equals(that.rpc)) + return false; + } + + boolean this_present_serviceType = true; + boolean that_present_serviceType = true; + if (this_present_serviceType || that_present_serviceType) { + if (!(this_present_serviceType && that_present_serviceType)) + return false; + if (this.serviceType != that.serviceType) + return false; + } + + boolean this_present_endPoint = true && this.isSetEndPoint(); + boolean that_present_endPoint = true && that.isSetEndPoint(); + if (this_present_endPoint || that_present_endPoint) { + if (!(this_present_endPoint && that_present_endPoint)) + return false; + if (!this.endPoint.equals(that.endPoint)) + return false; + } + + boolean this_present_remoteAddr = true && this.isSetRemoteAddr(); + boolean that_present_remoteAddr = true && that.isSetRemoteAddr(); + if (this_present_remoteAddr || that_present_remoteAddr) { + if (!(this_present_remoteAddr && that_present_remoteAddr)) + return false; + if (!this.remoteAddr.equals(that.remoteAddr)) + return false; + } + + boolean this_present_annotations = true && this.isSetAnnotations(); + boolean that_present_annotations = true && that.isSetAnnotations(); + if (this_present_annotations || that_present_annotations) { + if (!(this_present_annotations && that_present_annotations)) + return false; + if (!this.annotations.equals(that.annotations)) + return false; + } + + boolean this_present_flag = true && this.isSetFlag(); + boolean that_present_flag = true && that.isSetFlag(); + if (this_present_flag || that_present_flag) { + if (!(this_present_flag && that_present_flag)) + return false; + if (this.flag != that.flag) + return false; + } + + boolean this_present_err = true && this.isSetErr(); + boolean that_present_err = true && that.isSetErr(); + if (this_present_err || that_present_err) { + if (!(this_present_err && that_present_err)) + return false; + if (this.err != that.err) + return false; + } + + boolean this_present_spanEventList = true && this.isSetSpanEventList(); + boolean that_present_spanEventList = true && that.isSetSpanEventList(); + if (this_present_spanEventList || that_present_spanEventList) { + if (!(this_present_spanEventList && that_present_spanEventList)) + return false; + if (!this.spanEventList.equals(that.spanEventList)) + return false; + } + + boolean this_present_parentApplicationName = true && this.isSetParentApplicationName(); + boolean that_present_parentApplicationName = true && that.isSetParentApplicationName(); + if (this_present_parentApplicationName || that_present_parentApplicationName) { + if (!(this_present_parentApplicationName && that_present_parentApplicationName)) + return false; + if (!this.parentApplicationName.equals(that.parentApplicationName)) + return false; + } + + boolean this_present_parentApplicationType = true && this.isSetParentApplicationType(); + boolean that_present_parentApplicationType = true && that.isSetParentApplicationType(); + if (this_present_parentApplicationType || that_present_parentApplicationType) { + if (!(this_present_parentApplicationType && that_present_parentApplicationType)) + return false; + if (this.parentApplicationType != that.parentApplicationType) + return false; + } + + boolean this_present_acceptorHost = true && this.isSetAcceptorHost(); + boolean that_present_acceptorHost = true && that.isSetAcceptorHost(); + if (this_present_acceptorHost || that_present_acceptorHost) { + if (!(this_present_acceptorHost && that_present_acceptorHost)) + return false; + if (!this.acceptorHost.equals(that.acceptorHost)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Span other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Span typedOther = (Span)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(typedOther.isSetApplicationId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetApplicationId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, typedOther.applicationId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentIdentifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMostTraceId()).compareTo(typedOther.isSetMostTraceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMostTraceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mostTraceId, typedOther.mostTraceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLeastTraceId()).compareTo(typedOther.isSetLeastTraceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLeastTraceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leastTraceId, typedOther.leastTraceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(typedOther.isSetSpanId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSpanId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, typedOther.spanId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParentSpanId()).compareTo(typedOther.isSetParentSpanId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentSpanId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSpanId, typedOther.parentSpanId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetElapsed()).compareTo(typedOther.isSetElapsed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetElapsed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsed, typedOther.elapsed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRpc()).compareTo(typedOther.isSetRpc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRpc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rpc, typedOther.rpc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServiceType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndPoint()).compareTo(typedOther.isSetEndPoint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndPoint()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endPoint, typedOther.endPoint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRemoteAddr()).compareTo(typedOther.isSetRemoteAddr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRemoteAddr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remoteAddr, typedOther.remoteAddr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAnnotations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFlag()).compareTo(typedOther.isSetFlag()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFlag()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.flag, typedOther.flag); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetErr()).compareTo(typedOther.isSetErr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err, typedOther.err); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSpanEventList()).compareTo(typedOther.isSetSpanEventList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSpanEventList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanEventList, typedOther.spanEventList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParentApplicationName()).compareTo(typedOther.isSetParentApplicationName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentApplicationName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentApplicationName, typedOther.parentApplicationName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParentApplicationType()).compareTo(typedOther.isSetParentApplicationType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentApplicationType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentApplicationType, typedOther.parentApplicationType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAcceptorHost()).compareTo(typedOther.isSetAcceptorHost()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAcceptorHost()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acceptorHost, typedOther.acceptorHost); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Span("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("applicationId:"); + if (this.applicationId == null) { + sb.append("null"); + } else { + sb.append(this.applicationId); + } + first = false; + if (!first) sb.append(", "); + sb.append("agentIdentifier:"); + sb.append(this.agentIdentifier); + first = false; + if (!first) sb.append(", "); + sb.append("mostTraceId:"); + sb.append(this.mostTraceId); + first = false; + if (!first) sb.append(", "); + sb.append("leastTraceId:"); + sb.append(this.leastTraceId); + first = false; + if (!first) sb.append(", "); + sb.append("spanId:"); + sb.append(this.spanId); + first = false; + if (isSetParentSpanId()) { + if (!first) sb.append(", "); + sb.append("parentSpanId:"); + sb.append(this.parentSpanId); + first = false; + } + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + if (!first) sb.append(", "); + sb.append("elapsed:"); + sb.append(this.elapsed); + first = false; + if (isSetRpc()) { + if (!first) sb.append(", "); + sb.append("rpc:"); + if (this.rpc == null) { + sb.append("null"); + } else { + sb.append(this.rpc); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("serviceType:"); + sb.append(this.serviceType); + first = false; + if (isSetEndPoint()) { + if (!first) sb.append(", "); + sb.append("endPoint:"); + if (this.endPoint == null) { + sb.append("null"); + } else { + sb.append(this.endPoint); + } + first = false; + } + if (isSetRemoteAddr()) { + if (!first) sb.append(", "); + sb.append("remoteAddr:"); + if (this.remoteAddr == null) { + sb.append("null"); + } else { + sb.append(this.remoteAddr); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("annotations:"); + if (this.annotations == null) { + sb.append("null"); + } else { + sb.append(this.annotations); + } + first = false; + if (isSetFlag()) { + if (!first) sb.append(", "); + sb.append("flag:"); + sb.append(this.flag); + first = false; + } + if (isSetErr()) { + if (!first) sb.append(", "); + sb.append("err:"); + sb.append(this.err); + first = false; + } + if (isSetSpanEventList()) { + if (!first) sb.append(", "); + sb.append("spanEventList:"); + if (this.spanEventList == null) { + sb.append("null"); + } else { + sb.append(this.spanEventList); + } + first = false; + } + if (isSetParentApplicationName()) { + if (!first) sb.append(", "); + sb.append("parentApplicationName:"); + if (this.parentApplicationName == null) { + sb.append("null"); + } else { + sb.append(this.parentApplicationName); + } + first = false; + } + if (isSetParentApplicationType()) { + if (!first) sb.append(", "); + sb.append("parentApplicationType:"); + sb.append(this.parentApplicationType); + first = false; + } + if (isSetAcceptorHost()) { + if (!first) sb.append(", "); + sb.append("acceptorHost:"); + if (this.acceptorHost == null) { + sb.append("null"); + } else { + sb.append(this.acceptorHost); + } + 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, 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 SpanStandardSchemeFactory implements SchemeFactory { + public SpanStandardScheme getScheme() { + return new SpanStandardScheme(); + } + } + + private static class SpanStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Span 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: // APPLICATION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // AGENT_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MOST_TRACE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.mostTraceId = iprot.readI64(); + struct.setMostTraceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LEAST_TRACE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.leastTraceId = iprot.readI64(); + struct.setLeastTraceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SPAN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.spanId = iprot.readI32(); + struct.setSpanIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PARENT_SPAN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.parentSpanId = iprot.readI32(); + struct.setParentSpanIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // ELAPSED + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.elapsed = iprot.readI32(); + struct.setElapsedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // RPC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.rpc = iprot.readString(); + struct.setRpcIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // SERVICE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // END_POINT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endPoint = iprot.readString(); + struct.setEndPointIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // REMOTE_ADDR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.remoteAddr = iprot.readString(); + struct.setRemoteAddrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // ANNOTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.annotations = new ArrayList(_list16.size); + for (int _i17 = 0; _i17 < _list16.size; ++_i17) + { + Annotation _elem18; // required + _elem18 = new Annotation(); + _elem18.read(iprot); + struct.annotations.add(_elem18); + } + iprot.readListEnd(); + } + struct.setAnnotationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // FLAG + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.flag = iprot.readI16(); + struct.setFlagIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // ERR + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.err = iprot.readI32(); + struct.setErrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 18: // SPAN_EVENT_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); + struct.spanEventList = new ArrayList(_list19.size); + for (int _i20 = 0; _i20 < _list19.size; ++_i20) + { + SpanEvent _elem21; // required + _elem21 = new SpanEvent(); + _elem21.read(iprot); + struct.spanEventList.add(_elem21); + } + iprot.readListEnd(); + } + struct.setSpanEventListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 19: // PARENT_APPLICATION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.parentApplicationName = iprot.readString(); + struct.setParentApplicationNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 20: // PARENT_APPLICATION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.parentApplicationType = iprot.readI16(); + struct.setParentApplicationTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 21: // ACCEPTOR_HOST + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.acceptorHost = iprot.readString(); + struct.setAcceptorHostIsSet(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, Span struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + if (struct.applicationId != null) { + oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); + oprot.writeString(struct.applicationId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); + oprot.writeI16(struct.agentIdentifier); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MOST_TRACE_ID_FIELD_DESC); + oprot.writeI64(struct.mostTraceId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LEAST_TRACE_ID_FIELD_DESC); + oprot.writeI64(struct.leastTraceId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(SPAN_ID_FIELD_DESC); + oprot.writeI32(struct.spanId); + oprot.writeFieldEnd(); + if (struct.isSetParentSpanId()) { + oprot.writeFieldBegin(PARENT_SPAN_ID_FIELD_DESC); + oprot.writeI32(struct.parentSpanId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(ELAPSED_FIELD_DESC); + oprot.writeI32(struct.elapsed); + oprot.writeFieldEnd(); + if (struct.rpc != null) { + if (struct.isSetRpc()) { + oprot.writeFieldBegin(RPC_FIELD_DESC); + oprot.writeString(struct.rpc); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); + oprot.writeI16(struct.serviceType); + oprot.writeFieldEnd(); + if (struct.endPoint != null) { + if (struct.isSetEndPoint()) { + oprot.writeFieldBegin(END_POINT_FIELD_DESC); + oprot.writeString(struct.endPoint); + oprot.writeFieldEnd(); + } + } + if (struct.remoteAddr != null) { + if (struct.isSetRemoteAddr()) { + oprot.writeFieldBegin(REMOTE_ADDR_FIELD_DESC); + oprot.writeString(struct.remoteAddr); + oprot.writeFieldEnd(); + } + } + if (struct.annotations != null) { + oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.annotations.size())); + for (Annotation _iter22 : struct.annotations) + { + _iter22.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetFlag()) { + oprot.writeFieldBegin(FLAG_FIELD_DESC); + oprot.writeI16(struct.flag); + oprot.writeFieldEnd(); + } + if (struct.isSetErr()) { + oprot.writeFieldBegin(ERR_FIELD_DESC); + oprot.writeI32(struct.err); + oprot.writeFieldEnd(); + } + if (struct.spanEventList != null) { + if (struct.isSetSpanEventList()) { + oprot.writeFieldBegin(SPAN_EVENT_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.spanEventList.size())); + for (SpanEvent _iter23 : struct.spanEventList) + { + _iter23.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.parentApplicationName != null) { + if (struct.isSetParentApplicationName()) { + oprot.writeFieldBegin(PARENT_APPLICATION_NAME_FIELD_DESC); + oprot.writeString(struct.parentApplicationName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetParentApplicationType()) { + oprot.writeFieldBegin(PARENT_APPLICATION_TYPE_FIELD_DESC); + oprot.writeI16(struct.parentApplicationType); + oprot.writeFieldEnd(); + } + if (struct.acceptorHost != null) { + if (struct.isSetAcceptorHost()) { + oprot.writeFieldBegin(ACCEPTOR_HOST_FIELD_DESC); + oprot.writeString(struct.acceptorHost); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SpanTupleSchemeFactory implements SchemeFactory { + public SpanTupleScheme getScheme() { + return new SpanTupleScheme(); + } + } + + private static class SpanTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetApplicationId()) { + optionals.set(1); + } + if (struct.isSetAgentIdentifier()) { + optionals.set(2); + } + if (struct.isSetMostTraceId()) { + optionals.set(3); + } + if (struct.isSetLeastTraceId()) { + optionals.set(4); + } + if (struct.isSetSpanId()) { + optionals.set(5); + } + if (struct.isSetParentSpanId()) { + optionals.set(6); + } + if (struct.isSetStartTime()) { + optionals.set(7); + } + if (struct.isSetElapsed()) { + optionals.set(8); + } + if (struct.isSetRpc()) { + optionals.set(9); + } + if (struct.isSetServiceType()) { + optionals.set(10); + } + if (struct.isSetEndPoint()) { + optionals.set(11); + } + if (struct.isSetRemoteAddr()) { + optionals.set(12); + } + if (struct.isSetAnnotations()) { + optionals.set(13); + } + if (struct.isSetFlag()) { + optionals.set(14); + } + if (struct.isSetErr()) { + optionals.set(15); + } + if (struct.isSetSpanEventList()) { + optionals.set(16); + } + if (struct.isSetParentApplicationName()) { + optionals.set(17); + } + if (struct.isSetParentApplicationType()) { + optionals.set(18); + } + if (struct.isSetAcceptorHost()) { + optionals.set(19); + } + oprot.writeBitSet(optionals, 20); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetApplicationId()) { + oprot.writeString(struct.applicationId); + } + if (struct.isSetAgentIdentifier()) { + oprot.writeI16(struct.agentIdentifier); + } + if (struct.isSetMostTraceId()) { + oprot.writeI64(struct.mostTraceId); + } + if (struct.isSetLeastTraceId()) { + oprot.writeI64(struct.leastTraceId); + } + if (struct.isSetSpanId()) { + oprot.writeI32(struct.spanId); + } + if (struct.isSetParentSpanId()) { + oprot.writeI32(struct.parentSpanId); + } + if (struct.isSetStartTime()) { + oprot.writeI64(struct.startTime); + } + if (struct.isSetElapsed()) { + oprot.writeI32(struct.elapsed); + } + if (struct.isSetRpc()) { + oprot.writeString(struct.rpc); + } + if (struct.isSetServiceType()) { + oprot.writeI16(struct.serviceType); + } + if (struct.isSetEndPoint()) { + oprot.writeString(struct.endPoint); + } + if (struct.isSetRemoteAddr()) { + oprot.writeString(struct.remoteAddr); + } + if (struct.isSetAnnotations()) { + { + oprot.writeI32(struct.annotations.size()); + for (Annotation _iter24 : struct.annotations) + { + _iter24.write(oprot); + } + } + } + if (struct.isSetFlag()) { + oprot.writeI16(struct.flag); + } + if (struct.isSetErr()) { + oprot.writeI32(struct.err); + } + if (struct.isSetSpanEventList()) { + { + oprot.writeI32(struct.spanEventList.size()); + for (SpanEvent _iter25 : struct.spanEventList) + { + _iter25.write(oprot); + } + } + } + if (struct.isSetParentApplicationName()) { + oprot.writeString(struct.parentApplicationName); + } + if (struct.isSetParentApplicationType()) { + oprot.writeI16(struct.parentApplicationType); + } + if (struct.isSetAcceptorHost()) { + oprot.writeString(struct.acceptorHost); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(20); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); + } + if (incoming.get(2)) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } + if (incoming.get(3)) { + struct.mostTraceId = iprot.readI64(); + struct.setMostTraceIdIsSet(true); + } + if (incoming.get(4)) { + struct.leastTraceId = iprot.readI64(); + struct.setLeastTraceIdIsSet(true); + } + if (incoming.get(5)) { + struct.spanId = iprot.readI32(); + struct.setSpanIdIsSet(true); + } + if (incoming.get(6)) { + struct.parentSpanId = iprot.readI32(); + struct.setParentSpanIdIsSet(true); + } + if (incoming.get(7)) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } + if (incoming.get(8)) { + struct.elapsed = iprot.readI32(); + struct.setElapsedIsSet(true); + } + if (incoming.get(9)) { + struct.rpc = iprot.readString(); + struct.setRpcIsSet(true); + } + if (incoming.get(10)) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } + if (incoming.get(11)) { + struct.endPoint = iprot.readString(); + struct.setEndPointIsSet(true); + } + if (incoming.get(12)) { + struct.remoteAddr = iprot.readString(); + struct.setRemoteAddrIsSet(true); + } + if (incoming.get(13)) { + { + org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.annotations = new ArrayList(_list26.size); + for (int _i27 = 0; _i27 < _list26.size; ++_i27) + { + Annotation _elem28; // required + _elem28 = new Annotation(); + _elem28.read(iprot); + struct.annotations.add(_elem28); + } + } + struct.setAnnotationsIsSet(true); + } + if (incoming.get(14)) { + struct.flag = iprot.readI16(); + struct.setFlagIsSet(true); + } + if (incoming.get(15)) { + struct.err = iprot.readI32(); + struct.setErrIsSet(true); + } + if (incoming.get(16)) { + { + org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.spanEventList = new ArrayList(_list29.size); + for (int _i30 = 0; _i30 < _list29.size; ++_i30) + { + SpanEvent _elem31; // required + _elem31 = new SpanEvent(); + _elem31.read(iprot); + struct.spanEventList.add(_elem31); + } + } + struct.setSpanEventListIsSet(true); + } + if (incoming.get(17)) { + struct.parentApplicationName = iprot.readString(); + struct.setParentApplicationNameIsSet(true); + } + if (incoming.get(18)) { + struct.parentApplicationType = iprot.readI16(); + struct.setParentApplicationTypeIsSet(true); + } + if (incoming.get(19)) { + struct.acceptorHost = iprot.readString(); + struct.setAcceptorHostIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/SpanChunk.java b/src/main/java/com/profiler/common/dto/thrift/SpanChunk.java index da68469fd..06ca80774 100644 --- a/src/main/java/com/profiler/common/dto/thrift/SpanChunk.java +++ b/src/main/java/com/profiler/common/dto/thrift/SpanChunk.java @@ -1,1008 +1,1206 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SpanChunk implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpanChunk"); - - 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 APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)3); - private static final org.apache.thrift.protocol.TField MOST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mostTraceId", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField LEAST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("leastTraceId", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField SPAN_EVENT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("spanEventList", org.apache.thrift.protocol.TType.LIST, (short)7); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SpanChunkStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SpanChunkTupleSchemeFactory()); - } - - private String agentId; // required - private String applicationId; // required - private short agentIdentifier; // required - private long mostTraceId; // required - private long leastTraceId; // required - private int spanId; // required - private List spanEventList; // 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 { - AGENT_ID((short)1, "agentId"), - APPLICATION_ID((short)2, "applicationId"), - AGENT_IDENTIFIER((short)3, "agentIdentifier"), - MOST_TRACE_ID((short)4, "mostTraceId"), - LEAST_TRACE_ID((short)5, "leastTraceId"), - SPAN_ID((short)6, "spanId"), - SPAN_EVENT_LIST((short)7, "spanEventList"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // APPLICATION_ID - return APPLICATION_ID; - case 3: // AGENT_IDENTIFIER - return AGENT_IDENTIFIER; - case 4: // MOST_TRACE_ID - return MOST_TRACE_ID; - case 5: // LEAST_TRACE_ID - return LEAST_TRACE_ID; - case 6: // SPAN_ID - return SPAN_ID; - case 7: // SPAN_EVENT_LIST - return SPAN_EVENT_LIST; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __AGENTIDENTIFIER_ISSET_ID = 0; - private static final int __MOSTTRACEID_ISSET_ID = 1; - private static final int __LEASTTRACEID_ISSET_ID = 2; - private static final int __SPANID_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.MOST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("mostTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEAST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("leastTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SPAN_EVENT_LIST, new org.apache.thrift.meta_data.FieldMetaData("spanEventList", 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, SpanEvent.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpanChunk.class, metaDataMap); - } - - public SpanChunk() { - } - - public SpanChunk( - String agentId, - String applicationId, - short agentIdentifier, - long mostTraceId, - long leastTraceId, - int spanId, - List spanEventList) - { - this(); - this.agentId = agentId; - this.applicationId = applicationId; - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - this.mostTraceId = mostTraceId; - setMostTraceIdIsSet(true); - this.leastTraceId = leastTraceId; - setLeastTraceIdIsSet(true); - this.spanId = spanId; - setSpanIdIsSet(true); - this.spanEventList = spanEventList; - } - - /** - * Performs a deep copy on other. - */ - public SpanChunk(SpanChunk other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - if (other.isSetApplicationId()) { - this.applicationId = other.applicationId; - } - this.agentIdentifier = other.agentIdentifier; - this.mostTraceId = other.mostTraceId; - this.leastTraceId = other.leastTraceId; - this.spanId = other.spanId; - if (other.isSetSpanEventList()) { - List __this__spanEventList = new ArrayList(); - for (SpanEvent other_element : other.spanEventList) { - __this__spanEventList.add(new SpanEvent(other_element)); - } - this.spanEventList = __this__spanEventList; - } - } - - public SpanChunk deepCopy() { - return new SpanChunk(this); - } - - @Override - public void clear() { - this.agentId = null; - this.applicationId = null; - setAgentIdentifierIsSet(false); - this.agentIdentifier = 0; - setMostTraceIdIsSet(false); - this.mostTraceId = 0; - setLeastTraceIdIsSet(false); - this.leastTraceId = 0; - setSpanIdIsSet(false); - this.spanId = 0; - this.spanEventList = null; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 String getApplicationId() { - return this.applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public void unsetApplicationId() { - this.applicationId = null; - } - - /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ - public boolean isSetApplicationId() { - return this.applicationId != null; - } - - public void setApplicationIdIsSet(boolean value) { - if (!value) { - this.applicationId = null; - } - } - - public short getAgentIdentifier() { - return this.agentIdentifier; - } - - public void setAgentIdentifier(short agentIdentifier) { - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - } - - public void unsetAgentIdentifier() { - __isset_bit_vector.clear(__AGENTIDENTIFIER_ISSET_ID); - } - - /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentIdentifier() { - return __isset_bit_vector.get(__AGENTIDENTIFIER_ISSET_ID); - } - - public void setAgentIdentifierIsSet(boolean value) { - __isset_bit_vector.set(__AGENTIDENTIFIER_ISSET_ID, value); - } - - public long getMostTraceId() { - return this.mostTraceId; - } - - public void setMostTraceId(long mostTraceId) { - this.mostTraceId = mostTraceId; - setMostTraceIdIsSet(true); - } - - public void unsetMostTraceId() { - __isset_bit_vector.clear(__MOSTTRACEID_ISSET_ID); - } - - /** Returns true if field mostTraceId is set (has been assigned a value) and false otherwise */ - public boolean isSetMostTraceId() { - return __isset_bit_vector.get(__MOSTTRACEID_ISSET_ID); - } - - public void setMostTraceIdIsSet(boolean value) { - __isset_bit_vector.set(__MOSTTRACEID_ISSET_ID, value); - } - - public long getLeastTraceId() { - return this.leastTraceId; - } - - public void setLeastTraceId(long leastTraceId) { - this.leastTraceId = leastTraceId; - setLeastTraceIdIsSet(true); - } - - public void unsetLeastTraceId() { - __isset_bit_vector.clear(__LEASTTRACEID_ISSET_ID); - } - - /** Returns true if field leastTraceId is set (has been assigned a value) and false otherwise */ - public boolean isSetLeastTraceId() { - return __isset_bit_vector.get(__LEASTTRACEID_ISSET_ID); - } - - public void setLeastTraceIdIsSet(boolean value) { - __isset_bit_vector.set(__LEASTTRACEID_ISSET_ID, value); - } - - public int getSpanId() { - return this.spanId; - } - - public void setSpanId(int spanId) { - this.spanId = spanId; - setSpanIdIsSet(true); - } - - public void unsetSpanId() { - __isset_bit_vector.clear(__SPANID_ISSET_ID); - } - - /** Returns true if field spanId is set (has been assigned a value) and false otherwise */ - public boolean isSetSpanId() { - return __isset_bit_vector.get(__SPANID_ISSET_ID); - } - - public void setSpanIdIsSet(boolean value) { - __isset_bit_vector.set(__SPANID_ISSET_ID, value); - } - - public int getSpanEventListSize() { - return (this.spanEventList == null) ? 0 : this.spanEventList.size(); - } - - public java.util.Iterator getSpanEventListIterator() { - return (this.spanEventList == null) ? null : this.spanEventList.iterator(); - } - - public void addToSpanEventList(SpanEvent elem) { - if (this.spanEventList == null) { - this.spanEventList = new ArrayList(); - } - this.spanEventList.add(elem); - } - - public List getSpanEventList() { - return this.spanEventList; - } - - public void setSpanEventList(List spanEventList) { - this.spanEventList = spanEventList; - } - - public void unsetSpanEventList() { - this.spanEventList = null; - } - - /** Returns true if field spanEventList is set (has been assigned a value) and false otherwise */ - public boolean isSetSpanEventList() { - return this.spanEventList != null; - } - - public void setSpanEventListIsSet(boolean value) { - if (!value) { - this.spanEventList = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case APPLICATION_ID: - if (value == null) { - unsetApplicationId(); - } else { - setApplicationId((String)value); - } - break; - - case AGENT_IDENTIFIER: - if (value == null) { - unsetAgentIdentifier(); - } else { - setAgentIdentifier((Short)value); - } - break; - - case MOST_TRACE_ID: - if (value == null) { - unsetMostTraceId(); - } else { - setMostTraceId((Long)value); - } - break; - - case LEAST_TRACE_ID: - if (value == null) { - unsetLeastTraceId(); - } else { - setLeastTraceId((Long)value); - } - break; - - case SPAN_ID: - if (value == null) { - unsetSpanId(); - } else { - setSpanId((Integer)value); - } - break; - - case SPAN_EVENT_LIST: - if (value == null) { - unsetSpanEventList(); - } else { - setSpanEventList((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case APPLICATION_ID: - return getApplicationId(); - - case AGENT_IDENTIFIER: - return Short.valueOf(getAgentIdentifier()); - - case MOST_TRACE_ID: - return Long.valueOf(getMostTraceId()); - - case LEAST_TRACE_ID: - return Long.valueOf(getLeastTraceId()); - - case SPAN_ID: - return Integer.valueOf(getSpanId()); - - case SPAN_EVENT_LIST: - return getSpanEventList(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case APPLICATION_ID: - return isSetApplicationId(); - case AGENT_IDENTIFIER: - return isSetAgentIdentifier(); - case MOST_TRACE_ID: - return isSetMostTraceId(); - case LEAST_TRACE_ID: - return isSetLeastTraceId(); - case SPAN_ID: - return isSetSpanId(); - case SPAN_EVENT_LIST: - return isSetSpanEventList(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SpanChunk) - return this.equals((SpanChunk)that); - return false; - } - - public boolean equals(SpanChunk that) { - if (that == null) - return false; - - 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_applicationId = true && this.isSetApplicationId(); - boolean that_present_applicationId = true && that.isSetApplicationId(); - if (this_present_applicationId || that_present_applicationId) { - if (!(this_present_applicationId && that_present_applicationId)) - return false; - if (!this.applicationId.equals(that.applicationId)) - return false; - } - - boolean this_present_agentIdentifier = true; - boolean that_present_agentIdentifier = true; - if (this_present_agentIdentifier || that_present_agentIdentifier) { - if (!(this_present_agentIdentifier && that_present_agentIdentifier)) - return false; - if (this.agentIdentifier != that.agentIdentifier) - return false; - } - - boolean this_present_mostTraceId = true; - boolean that_present_mostTraceId = true; - if (this_present_mostTraceId || that_present_mostTraceId) { - if (!(this_present_mostTraceId && that_present_mostTraceId)) - return false; - if (this.mostTraceId != that.mostTraceId) - return false; - } - - boolean this_present_leastTraceId = true; - boolean that_present_leastTraceId = true; - if (this_present_leastTraceId || that_present_leastTraceId) { - if (!(this_present_leastTraceId && that_present_leastTraceId)) - return false; - if (this.leastTraceId != that.leastTraceId) - return false; - } - - boolean this_present_spanId = true; - boolean that_present_spanId = true; - if (this_present_spanId || that_present_spanId) { - if (!(this_present_spanId && that_present_spanId)) - return false; - if (this.spanId != that.spanId) - return false; - } - - boolean this_present_spanEventList = true && this.isSetSpanEventList(); - boolean that_present_spanEventList = true && that.isSetSpanEventList(); - if (this_present_spanEventList || that_present_spanEventList) { - if (!(this_present_spanEventList && that_present_spanEventList)) - return false; - if (!this.spanEventList.equals(that.spanEventList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(SpanChunk other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - SpanChunk typedOther = (SpanChunk)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(typedOther.isSetApplicationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApplicationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, typedOther.applicationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentIdentifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMostTraceId()).compareTo(typedOther.isSetMostTraceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMostTraceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mostTraceId, typedOther.mostTraceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLeastTraceId()).compareTo(typedOther.isSetLeastTraceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLeastTraceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leastTraceId, typedOther.leastTraceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(typedOther.isSetSpanId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpanId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, typedOther.spanId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpanEventList()).compareTo(typedOther.isSetSpanEventList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpanEventList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanEventList, typedOther.spanEventList); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("SpanChunk("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("applicationId:"); - if (this.applicationId == null) { - sb.append("null"); - } else { - sb.append(this.applicationId); - } - first = false; - if (!first) sb.append(", "); - sb.append("agentIdentifier:"); - sb.append(this.agentIdentifier); - first = false; - if (!first) sb.append(", "); - sb.append("mostTraceId:"); - sb.append(this.mostTraceId); - first = false; - if (!first) sb.append(", "); - sb.append("leastTraceId:"); - sb.append(this.leastTraceId); - first = false; - if (!first) sb.append(", "); - sb.append("spanId:"); - sb.append(this.spanId); - first = false; - if (!first) sb.append(", "); - sb.append("spanEventList:"); - if (this.spanEventList == null) { - sb.append("null"); - } else { - sb.append(this.spanEventList); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 SpanChunkStandardSchemeFactory implements SchemeFactory { - public SpanChunkStandardScheme getScheme() { - return new SpanChunkStandardScheme(); - } - } - - private static class SpanChunkStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SpanChunk 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: // APPLICATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.applicationId = iprot.readString(); - struct.setApplicationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // AGENT_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MOST_TRACE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.mostTraceId = iprot.readI64(); - struct.setMostTraceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LEAST_TRACE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.leastTraceId = iprot.readI64(); - struct.setLeastTraceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // SPAN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.spanId = iprot.readI32(); - struct.setSpanIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // SPAN_EVENT_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); - struct.spanEventList = new ArrayList(_list32.size); - for (int _i33 = 0; _i33 < _list32.size; ++_i33) - { - SpanEvent _elem34; // required - _elem34 = new SpanEvent(); - _elem34.read(iprot); - struct.spanEventList.add(_elem34); - } - iprot.readListEnd(); - } - struct.setSpanEventListIsSet(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, SpanChunk struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - if (struct.applicationId != null) { - oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); - oprot.writeString(struct.applicationId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); - oprot.writeI16(struct.agentIdentifier); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MOST_TRACE_ID_FIELD_DESC); - oprot.writeI64(struct.mostTraceId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LEAST_TRACE_ID_FIELD_DESC); - oprot.writeI64(struct.leastTraceId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SPAN_ID_FIELD_DESC); - oprot.writeI32(struct.spanId); - oprot.writeFieldEnd(); - if (struct.spanEventList != null) { - oprot.writeFieldBegin(SPAN_EVENT_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.spanEventList.size())); - for (SpanEvent _iter35 : struct.spanEventList) - { - _iter35.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SpanChunkTupleSchemeFactory implements SchemeFactory { - public SpanChunkTupleScheme getScheme() { - return new SpanChunkTupleScheme(); - } - } - - private static class SpanChunkTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SpanChunk struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetApplicationId()) { - optionals.set(1); - } - if (struct.isSetAgentIdentifier()) { - optionals.set(2); - } - if (struct.isSetMostTraceId()) { - optionals.set(3); - } - if (struct.isSetLeastTraceId()) { - optionals.set(4); - } - if (struct.isSetSpanId()) { - optionals.set(5); - } - if (struct.isSetSpanEventList()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetApplicationId()) { - oprot.writeString(struct.applicationId); - } - if (struct.isSetAgentIdentifier()) { - oprot.writeI16(struct.agentIdentifier); - } - if (struct.isSetMostTraceId()) { - oprot.writeI64(struct.mostTraceId); - } - if (struct.isSetLeastTraceId()) { - oprot.writeI64(struct.leastTraceId); - } - if (struct.isSetSpanId()) { - oprot.writeI32(struct.spanId); - } - if (struct.isSetSpanEventList()) { - { - oprot.writeI32(struct.spanEventList.size()); - for (SpanEvent _iter36 : struct.spanEventList) - { - _iter36.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SpanChunk struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.applicationId = iprot.readString(); - struct.setApplicationIdIsSet(true); - } - if (incoming.get(2)) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } - if (incoming.get(3)) { - struct.mostTraceId = iprot.readI64(); - struct.setMostTraceIdIsSet(true); - } - if (incoming.get(4)) { - struct.leastTraceId = iprot.readI64(); - struct.setLeastTraceIdIsSet(true); - } - if (incoming.get(5)) { - struct.spanId = iprot.readI32(); - struct.setSpanIdIsSet(true); - } - if (incoming.get(6)) { - { - org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.spanEventList = new ArrayList(_list37.size); - for (int _i38 = 0; _i38 < _list37.size; ++_i38) - { - SpanEvent _elem39; // required - _elem39 = new SpanEvent(); - _elem39.read(iprot); - struct.spanEventList.add(_elem39); - } - } - struct.setSpanEventListIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SpanChunk implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpanChunk"); + + 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 APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)3); + private static final org.apache.thrift.protocol.TField AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)4); + private static final org.apache.thrift.protocol.TField MOST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mostTraceId", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField LEAST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("leastTraceId", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("endPoint", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField SPAN_EVENT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("spanEventList", org.apache.thrift.protocol.TType.LIST, (short)9); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SpanChunkStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SpanChunkTupleSchemeFactory()); + } + + private String agentId; // required + private String applicationId; // required + private short serviceType; // required + private short agentIdentifier; // required + private long mostTraceId; // required + private long leastTraceId; // required + private int spanId; // required + private String endPoint; // optional + private List spanEventList; // 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 { + AGENT_ID((short)1, "agentId"), + APPLICATION_ID((short)2, "applicationId"), + SERVICE_TYPE((short)3, "serviceType"), + AGENT_IDENTIFIER((short)4, "agentIdentifier"), + MOST_TRACE_ID((short)5, "mostTraceId"), + LEAST_TRACE_ID((short)6, "leastTraceId"), + SPAN_ID((short)7, "spanId"), + END_POINT((short)8, "endPoint"), + SPAN_EVENT_LIST((short)9, "spanEventList"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // APPLICATION_ID + return APPLICATION_ID; + case 3: // SERVICE_TYPE + return SERVICE_TYPE; + case 4: // AGENT_IDENTIFIER + return AGENT_IDENTIFIER; + case 5: // MOST_TRACE_ID + return MOST_TRACE_ID; + case 6: // LEAST_TRACE_ID + return LEAST_TRACE_ID; + case 7: // SPAN_ID + return SPAN_ID; + case 8: // END_POINT + return END_POINT; + case 9: // SPAN_EVENT_LIST + return SPAN_EVENT_LIST; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SERVICETYPE_ISSET_ID = 0; + private static final int __AGENTIDENTIFIER_ISSET_ID = 1; + private static final int __MOSTTRACEID_ISSET_ID = 2; + private static final int __LEASTTRACEID_ISSET_ID = 3; + private static final int __SPANID_ISSET_ID = 4; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.END_POINT}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.MOST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("mostTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEAST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("leastTraceId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.END_POINT, new org.apache.thrift.meta_data.FieldMetaData("endPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SPAN_EVENT_LIST, new org.apache.thrift.meta_data.FieldMetaData("spanEventList", 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, SpanEvent.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpanChunk.class, metaDataMap); + } + + public SpanChunk() { + } + + public SpanChunk( + String agentId, + String applicationId, + short serviceType, + short agentIdentifier, + long mostTraceId, + long leastTraceId, + int spanId, + List spanEventList) + { + this(); + this.agentId = agentId; + this.applicationId = applicationId; + this.serviceType = serviceType; + setServiceTypeIsSet(true); + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + this.mostTraceId = mostTraceId; + setMostTraceIdIsSet(true); + this.leastTraceId = leastTraceId; + setLeastTraceIdIsSet(true); + this.spanId = spanId; + setSpanIdIsSet(true); + this.spanEventList = spanEventList; + } + + /** + * Performs a deep copy on other. + */ + public SpanChunk(SpanChunk other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + if (other.isSetApplicationId()) { + this.applicationId = other.applicationId; + } + this.serviceType = other.serviceType; + this.agentIdentifier = other.agentIdentifier; + this.mostTraceId = other.mostTraceId; + this.leastTraceId = other.leastTraceId; + this.spanId = other.spanId; + if (other.isSetEndPoint()) { + this.endPoint = other.endPoint; + } + if (other.isSetSpanEventList()) { + List __this__spanEventList = new ArrayList(); + for (SpanEvent other_element : other.spanEventList) { + __this__spanEventList.add(new SpanEvent(other_element)); + } + this.spanEventList = __this__spanEventList; + } + } + + public SpanChunk deepCopy() { + return new SpanChunk(this); + } + + @Override + public void clear() { + this.agentId = null; + this.applicationId = null; + setServiceTypeIsSet(false); + this.serviceType = 0; + setAgentIdentifierIsSet(false); + this.agentIdentifier = 0; + setMostTraceIdIsSet(false); + this.mostTraceId = 0; + setLeastTraceIdIsSet(false); + this.leastTraceId = 0; + setSpanIdIsSet(false); + this.spanId = 0; + this.endPoint = null; + this.spanEventList = null; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public void unsetApplicationId() { + this.applicationId = null; + } + + /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ + public boolean isSetApplicationId() { + return this.applicationId != null; + } + + public void setApplicationIdIsSet(boolean value) { + if (!value) { + this.applicationId = null; + } + } + + public short getServiceType() { + return this.serviceType; + } + + public void setServiceType(short serviceType) { + this.serviceType = serviceType; + setServiceTypeIsSet(true); + } + + public void unsetServiceType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ + public boolean isSetServiceType() { + return EncodingUtils.testBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + public void setServiceTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVICETYPE_ISSET_ID, value); + } + + public short getAgentIdentifier() { + return this.agentIdentifier; + } + + public void setAgentIdentifier(short agentIdentifier) { + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + } + + public void unsetAgentIdentifier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentIdentifier() { + return EncodingUtils.testBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + public void setAgentIdentifierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID, value); + } + + public long getMostTraceId() { + return this.mostTraceId; + } + + public void setMostTraceId(long mostTraceId) { + this.mostTraceId = mostTraceId; + setMostTraceIdIsSet(true); + } + + public void unsetMostTraceId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID); + } + + /** Returns true if field mostTraceId is set (has been assigned a value) and false otherwise */ + public boolean isSetMostTraceId() { + return EncodingUtils.testBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID); + } + + public void setMostTraceIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID, value); + } + + public long getLeastTraceId() { + return this.leastTraceId; + } + + public void setLeastTraceId(long leastTraceId) { + this.leastTraceId = leastTraceId; + setLeastTraceIdIsSet(true); + } + + public void unsetLeastTraceId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID); + } + + /** Returns true if field leastTraceId is set (has been assigned a value) and false otherwise */ + public boolean isSetLeastTraceId() { + return EncodingUtils.testBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID); + } + + public void setLeastTraceIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID, value); + } + + public int getSpanId() { + return this.spanId; + } + + public void setSpanId(int spanId) { + this.spanId = spanId; + setSpanIdIsSet(true); + } + + public void unsetSpanId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID); + } + + /** Returns true if field spanId is set (has been assigned a value) and false otherwise */ + public boolean isSetSpanId() { + return EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID); + } + + public void setSpanIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value); + } + + public String getEndPoint() { + return this.endPoint; + } + + public void setEndPoint(String endPoint) { + this.endPoint = endPoint; + } + + public void unsetEndPoint() { + this.endPoint = null; + } + + /** Returns true if field endPoint is set (has been assigned a value) and false otherwise */ + public boolean isSetEndPoint() { + return this.endPoint != null; + } + + public void setEndPointIsSet(boolean value) { + if (!value) { + this.endPoint = null; + } + } + + public int getSpanEventListSize() { + return (this.spanEventList == null) ? 0 : this.spanEventList.size(); + } + + public java.util.Iterator getSpanEventListIterator() { + return (this.spanEventList == null) ? null : this.spanEventList.iterator(); + } + + public void addToSpanEventList(SpanEvent elem) { + if (this.spanEventList == null) { + this.spanEventList = new ArrayList(); + } + this.spanEventList.add(elem); + } + + public List getSpanEventList() { + return this.spanEventList; + } + + public void setSpanEventList(List spanEventList) { + this.spanEventList = spanEventList; + } + + public void unsetSpanEventList() { + this.spanEventList = null; + } + + /** Returns true if field spanEventList is set (has been assigned a value) and false otherwise */ + public boolean isSetSpanEventList() { + return this.spanEventList != null; + } + + public void setSpanEventListIsSet(boolean value) { + if (!value) { + this.spanEventList = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case APPLICATION_ID: + if (value == null) { + unsetApplicationId(); + } else { + setApplicationId((String)value); + } + break; + + case SERVICE_TYPE: + if (value == null) { + unsetServiceType(); + } else { + setServiceType((Short)value); + } + break; + + case AGENT_IDENTIFIER: + if (value == null) { + unsetAgentIdentifier(); + } else { + setAgentIdentifier((Short)value); + } + break; + + case MOST_TRACE_ID: + if (value == null) { + unsetMostTraceId(); + } else { + setMostTraceId((Long)value); + } + break; + + case LEAST_TRACE_ID: + if (value == null) { + unsetLeastTraceId(); + } else { + setLeastTraceId((Long)value); + } + break; + + case SPAN_ID: + if (value == null) { + unsetSpanId(); + } else { + setSpanId((Integer)value); + } + break; + + case END_POINT: + if (value == null) { + unsetEndPoint(); + } else { + setEndPoint((String)value); + } + break; + + case SPAN_EVENT_LIST: + if (value == null) { + unsetSpanEventList(); + } else { + setSpanEventList((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case APPLICATION_ID: + return getApplicationId(); + + case SERVICE_TYPE: + return Short.valueOf(getServiceType()); + + case AGENT_IDENTIFIER: + return Short.valueOf(getAgentIdentifier()); + + case MOST_TRACE_ID: + return Long.valueOf(getMostTraceId()); + + case LEAST_TRACE_ID: + return Long.valueOf(getLeastTraceId()); + + case SPAN_ID: + return Integer.valueOf(getSpanId()); + + case END_POINT: + return getEndPoint(); + + case SPAN_EVENT_LIST: + return getSpanEventList(); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case APPLICATION_ID: + return isSetApplicationId(); + case SERVICE_TYPE: + return isSetServiceType(); + case AGENT_IDENTIFIER: + return isSetAgentIdentifier(); + case MOST_TRACE_ID: + return isSetMostTraceId(); + case LEAST_TRACE_ID: + return isSetLeastTraceId(); + case SPAN_ID: + return isSetSpanId(); + case END_POINT: + return isSetEndPoint(); + case SPAN_EVENT_LIST: + return isSetSpanEventList(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SpanChunk) + return this.equals((SpanChunk)that); + return false; + } + + public boolean equals(SpanChunk that) { + if (that == null) + return false; + + 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_applicationId = true && this.isSetApplicationId(); + boolean that_present_applicationId = true && that.isSetApplicationId(); + if (this_present_applicationId || that_present_applicationId) { + if (!(this_present_applicationId && that_present_applicationId)) + return false; + if (!this.applicationId.equals(that.applicationId)) + return false; + } + + boolean this_present_serviceType = true; + boolean that_present_serviceType = true; + if (this_present_serviceType || that_present_serviceType) { + if (!(this_present_serviceType && that_present_serviceType)) + return false; + if (this.serviceType != that.serviceType) + return false; + } + + boolean this_present_agentIdentifier = true; + boolean that_present_agentIdentifier = true; + if (this_present_agentIdentifier || that_present_agentIdentifier) { + if (!(this_present_agentIdentifier && that_present_agentIdentifier)) + return false; + if (this.agentIdentifier != that.agentIdentifier) + return false; + } + + boolean this_present_mostTraceId = true; + boolean that_present_mostTraceId = true; + if (this_present_mostTraceId || that_present_mostTraceId) { + if (!(this_present_mostTraceId && that_present_mostTraceId)) + return false; + if (this.mostTraceId != that.mostTraceId) + return false; + } + + boolean this_present_leastTraceId = true; + boolean that_present_leastTraceId = true; + if (this_present_leastTraceId || that_present_leastTraceId) { + if (!(this_present_leastTraceId && that_present_leastTraceId)) + return false; + if (this.leastTraceId != that.leastTraceId) + return false; + } + + boolean this_present_spanId = true; + boolean that_present_spanId = true; + if (this_present_spanId || that_present_spanId) { + if (!(this_present_spanId && that_present_spanId)) + return false; + if (this.spanId != that.spanId) + return false; + } + + boolean this_present_endPoint = true && this.isSetEndPoint(); + boolean that_present_endPoint = true && that.isSetEndPoint(); + if (this_present_endPoint || that_present_endPoint) { + if (!(this_present_endPoint && that_present_endPoint)) + return false; + if (!this.endPoint.equals(that.endPoint)) + return false; + } + + boolean this_present_spanEventList = true && this.isSetSpanEventList(); + boolean that_present_spanEventList = true && that.isSetSpanEventList(); + if (this_present_spanEventList || that_present_spanEventList) { + if (!(this_present_spanEventList && that_present_spanEventList)) + return false; + if (!this.spanEventList.equals(that.spanEventList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SpanChunk other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SpanChunk typedOther = (SpanChunk)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(typedOther.isSetApplicationId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetApplicationId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, typedOther.applicationId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServiceType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentIdentifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMostTraceId()).compareTo(typedOther.isSetMostTraceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMostTraceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mostTraceId, typedOther.mostTraceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLeastTraceId()).compareTo(typedOther.isSetLeastTraceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLeastTraceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leastTraceId, typedOther.leastTraceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(typedOther.isSetSpanId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSpanId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, typedOther.spanId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndPoint()).compareTo(typedOther.isSetEndPoint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndPoint()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endPoint, typedOther.endPoint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSpanEventList()).compareTo(typedOther.isSetSpanEventList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSpanEventList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanEventList, typedOther.spanEventList); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SpanChunk("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("applicationId:"); + if (this.applicationId == null) { + sb.append("null"); + } else { + sb.append(this.applicationId); + } + first = false; + if (!first) sb.append(", "); + sb.append("serviceType:"); + sb.append(this.serviceType); + first = false; + if (!first) sb.append(", "); + sb.append("agentIdentifier:"); + sb.append(this.agentIdentifier); + first = false; + if (!first) sb.append(", "); + sb.append("mostTraceId:"); + sb.append(this.mostTraceId); + first = false; + if (!first) sb.append(", "); + sb.append("leastTraceId:"); + sb.append(this.leastTraceId); + first = false; + if (!first) sb.append(", "); + sb.append("spanId:"); + sb.append(this.spanId); + first = false; + if (isSetEndPoint()) { + if (!first) sb.append(", "); + sb.append("endPoint:"); + if (this.endPoint == null) { + sb.append("null"); + } else { + sb.append(this.endPoint); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("spanEventList:"); + if (this.spanEventList == null) { + sb.append("null"); + } else { + sb.append(this.spanEventList); + } + 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, 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 SpanChunkStandardSchemeFactory implements SchemeFactory { + public SpanChunkStandardScheme getScheme() { + return new SpanChunkStandardScheme(); + } + } + + private static class SpanChunkStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SpanChunk 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: // APPLICATION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SERVICE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // AGENT_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // MOST_TRACE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.mostTraceId = iprot.readI64(); + struct.setMostTraceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // LEAST_TRACE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.leastTraceId = iprot.readI64(); + struct.setLeastTraceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SPAN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.spanId = iprot.readI32(); + struct.setSpanIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // END_POINT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endPoint = iprot.readString(); + struct.setEndPointIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // SPAN_EVENT_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); + struct.spanEventList = new ArrayList(_list32.size); + for (int _i33 = 0; _i33 < _list32.size; ++_i33) + { + SpanEvent _elem34; // required + _elem34 = new SpanEvent(); + _elem34.read(iprot); + struct.spanEventList.add(_elem34); + } + iprot.readListEnd(); + } + struct.setSpanEventListIsSet(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, SpanChunk struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + if (struct.applicationId != null) { + oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); + oprot.writeString(struct.applicationId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); + oprot.writeI16(struct.serviceType); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); + oprot.writeI16(struct.agentIdentifier); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MOST_TRACE_ID_FIELD_DESC); + oprot.writeI64(struct.mostTraceId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LEAST_TRACE_ID_FIELD_DESC); + oprot.writeI64(struct.leastTraceId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(SPAN_ID_FIELD_DESC); + oprot.writeI32(struct.spanId); + oprot.writeFieldEnd(); + if (struct.endPoint != null) { + if (struct.isSetEndPoint()) { + oprot.writeFieldBegin(END_POINT_FIELD_DESC); + oprot.writeString(struct.endPoint); + oprot.writeFieldEnd(); + } + } + if (struct.spanEventList != null) { + oprot.writeFieldBegin(SPAN_EVENT_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.spanEventList.size())); + for (SpanEvent _iter35 : struct.spanEventList) + { + _iter35.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SpanChunkTupleSchemeFactory implements SchemeFactory { + public SpanChunkTupleScheme getScheme() { + return new SpanChunkTupleScheme(); + } + } + + private static class SpanChunkTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SpanChunk struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetApplicationId()) { + optionals.set(1); + } + if (struct.isSetServiceType()) { + optionals.set(2); + } + if (struct.isSetAgentIdentifier()) { + optionals.set(3); + } + if (struct.isSetMostTraceId()) { + optionals.set(4); + } + if (struct.isSetLeastTraceId()) { + optionals.set(5); + } + if (struct.isSetSpanId()) { + optionals.set(6); + } + if (struct.isSetEndPoint()) { + optionals.set(7); + } + if (struct.isSetSpanEventList()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetApplicationId()) { + oprot.writeString(struct.applicationId); + } + if (struct.isSetServiceType()) { + oprot.writeI16(struct.serviceType); + } + if (struct.isSetAgentIdentifier()) { + oprot.writeI16(struct.agentIdentifier); + } + if (struct.isSetMostTraceId()) { + oprot.writeI64(struct.mostTraceId); + } + if (struct.isSetLeastTraceId()) { + oprot.writeI64(struct.leastTraceId); + } + if (struct.isSetSpanId()) { + oprot.writeI32(struct.spanId); + } + if (struct.isSetEndPoint()) { + oprot.writeString(struct.endPoint); + } + if (struct.isSetSpanEventList()) { + { + oprot.writeI32(struct.spanEventList.size()); + for (SpanEvent _iter36 : struct.spanEventList) + { + _iter36.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SpanChunk struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); + } + if (incoming.get(2)) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } + if (incoming.get(3)) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } + if (incoming.get(4)) { + struct.mostTraceId = iprot.readI64(); + struct.setMostTraceIdIsSet(true); + } + if (incoming.get(5)) { + struct.leastTraceId = iprot.readI64(); + struct.setLeastTraceIdIsSet(true); + } + if (incoming.get(6)) { + struct.spanId = iprot.readI32(); + struct.setSpanIdIsSet(true); + } + if (incoming.get(7)) { + struct.endPoint = iprot.readString(); + struct.setEndPointIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.spanEventList = new ArrayList(_list37.size); + for (int _i38 = 0; _i38 < _list37.size; ++_i38) + { + SpanEvent _elem39; // required + _elem39 = new SpanEvent(); + _elem39.read(iprot); + struct.spanEventList.add(_elem39); + } + } + struct.setSpanEventListIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/SpanEvent.java b/src/main/java/com/profiler/common/dto/thrift/SpanEvent.java index 9ebc818d8..f9c06a2e0 100644 --- a/src/main/java/com/profiler/common/dto/thrift/SpanEvent.java +++ b/src/main/java/com/profiler/common/dto/thrift/SpanEvent.java @@ -1,2033 +1,2036 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SpanEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpanEvent"); - - 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 APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)3); - private static final org.apache.thrift.protocol.TField MOST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mostTraceId", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField LEAST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("leastTraceId", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField SEQUENCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sequence", org.apache.thrift.protocol.TType.I16, (short)7); - private static final org.apache.thrift.protocol.TField START_ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("startElapsed", org.apache.thrift.protocol.TType.I32, (short)8); - private static final org.apache.thrift.protocol.TField END_ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("endElapsed", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField RPC_FIELD_DESC = new org.apache.thrift.protocol.TField("rpc", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)12); - private static final org.apache.thrift.protocol.TField END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("endPoint", org.apache.thrift.protocol.TType.STRING, (short)13); - private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)14); - private static final org.apache.thrift.protocol.TField DEPTH_FIELD_DESC = new org.apache.thrift.protocol.TField("depth", org.apache.thrift.protocol.TType.I32, (short)15); - private static final org.apache.thrift.protocol.TField NEXT_SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nextSpanId", org.apache.thrift.protocol.TType.I32, (short)16); - private static final org.apache.thrift.protocol.TField DESTINATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("destinationId", org.apache.thrift.protocol.TType.STRING, (short)20); - private static final org.apache.thrift.protocol.TField DESTINATION_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("destinationAddress", org.apache.thrift.protocol.TType.LIST, (short)21); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SpanEventStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SpanEventTupleSchemeFactory()); - } - - private String agentId; // optional - private String applicationId; // optional - private short agentIdentifier; // optional - private long mostTraceId; // optional - private long leastTraceId; // optional - private int spanId; // optional - private short sequence; // required - private int startElapsed; // required - private int endElapsed; // required - private String rpc; // optional - private short serviceType; // required - private String endPoint; // optional - private List annotations; // required - private int depth; // optional - private int nextSpanId; // optional - private String destinationId; // optional - private List destinationAddress; // 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"), - APPLICATION_ID((short)2, "applicationId"), - AGENT_IDENTIFIER((short)3, "agentIdentifier"), - MOST_TRACE_ID((short)4, "mostTraceId"), - LEAST_TRACE_ID((short)5, "leastTraceId"), - SPAN_ID((short)6, "spanId"), - SEQUENCE((short)7, "sequence"), - START_ELAPSED((short)8, "startElapsed"), - END_ELAPSED((short)9, "endElapsed"), - RPC((short)10, "rpc"), - SERVICE_TYPE((short)12, "serviceType"), - END_POINT((short)13, "endPoint"), - ANNOTATIONS((short)14, "annotations"), - DEPTH((short)15, "depth"), - NEXT_SPAN_ID((short)16, "nextSpanId"), - DESTINATION_ID((short)20, "destinationId"), - DESTINATION_ADDRESS((short)21, "destinationAddress"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // APPLICATION_ID - return APPLICATION_ID; - case 3: // AGENT_IDENTIFIER - return AGENT_IDENTIFIER; - case 4: // MOST_TRACE_ID - return MOST_TRACE_ID; - case 5: // LEAST_TRACE_ID - return LEAST_TRACE_ID; - case 6: // SPAN_ID - return SPAN_ID; - case 7: // SEQUENCE - return SEQUENCE; - case 8: // START_ELAPSED - return START_ELAPSED; - case 9: // END_ELAPSED - return END_ELAPSED; - case 10: // RPC - return RPC; - case 12: // SERVICE_TYPE - return SERVICE_TYPE; - case 13: // END_POINT - return END_POINT; - case 14: // ANNOTATIONS - return ANNOTATIONS; - case 15: // DEPTH - return DEPTH; - case 16: // NEXT_SPAN_ID - return NEXT_SPAN_ID; - case 20: // DESTINATION_ID - return DESTINATION_ID; - case 21: // DESTINATION_ADDRESS - return DESTINATION_ADDRESS; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __AGENTIDENTIFIER_ISSET_ID = 0; - private static final int __MOSTTRACEID_ISSET_ID = 1; - private static final int __LEASTTRACEID_ISSET_ID = 2; - private static final int __SPANID_ISSET_ID = 3; - private static final int __SEQUENCE_ISSET_ID = 4; - private static final int __STARTELAPSED_ISSET_ID = 5; - private static final int __ENDELAPSED_ISSET_ID = 6; - private static final int __SERVICETYPE_ISSET_ID = 7; - private static final int __DEPTH_ISSET_ID = 8; - private static final int __NEXTSPANID_ISSET_ID = 9; - private BitSet __isset_bit_vector = new BitSet(10); - private _Fields optionals[] = {_Fields.AGENT_ID,_Fields.APPLICATION_ID,_Fields.AGENT_IDENTIFIER,_Fields.MOST_TRACE_ID,_Fields.LEAST_TRACE_ID,_Fields.SPAN_ID,_Fields.RPC,_Fields.END_POINT,_Fields.DEPTH,_Fields.NEXT_SPAN_ID,_Fields.DESTINATION_ID,_Fields.DESTINATION_ADDRESS}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.MOST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("mostTraceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEAST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("leastTraceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SEQUENCE, new org.apache.thrift.meta_data.FieldMetaData("sequence", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.START_ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("startElapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.END_ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("endElapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.RPC, new org.apache.thrift.meta_data.FieldMetaData("rpc", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.END_POINT, new org.apache.thrift.meta_data.FieldMetaData("endPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", 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, Annotation.class)))); - tmpMap.put(_Fields.DEPTH, new org.apache.thrift.meta_data.FieldMetaData("depth", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.NEXT_SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("nextSpanId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DESTINATION_ID, new org.apache.thrift.meta_data.FieldMetaData("destinationId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DESTINATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("destinationAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL, - 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 = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpanEvent.class, metaDataMap); - } - - public SpanEvent() { - } - - public SpanEvent( - short sequence, - int startElapsed, - int endElapsed, - short serviceType, - List annotations) - { - this(); - this.sequence = sequence; - setSequenceIsSet(true); - this.startElapsed = startElapsed; - setStartElapsedIsSet(true); - this.endElapsed = endElapsed; - setEndElapsedIsSet(true); - this.serviceType = serviceType; - setServiceTypeIsSet(true); - this.annotations = annotations; - } - - /** - * Performs a deep copy on other. - */ - public SpanEvent(SpanEvent other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - if (other.isSetApplicationId()) { - this.applicationId = other.applicationId; - } - this.agentIdentifier = other.agentIdentifier; - this.mostTraceId = other.mostTraceId; - this.leastTraceId = other.leastTraceId; - this.spanId = other.spanId; - this.sequence = other.sequence; - this.startElapsed = other.startElapsed; - this.endElapsed = other.endElapsed; - if (other.isSetRpc()) { - this.rpc = other.rpc; - } - this.serviceType = other.serviceType; - if (other.isSetEndPoint()) { - this.endPoint = other.endPoint; - } - if (other.isSetAnnotations()) { - List __this__annotations = new ArrayList(); - for (Annotation other_element : other.annotations) { - __this__annotations.add(new Annotation(other_element)); - } - this.annotations = __this__annotations; - } - this.depth = other.depth; - this.nextSpanId = other.nextSpanId; - if (other.isSetDestinationId()) { - this.destinationId = other.destinationId; - } - if (other.isSetDestinationAddress()) { - List __this__destinationAddress = new ArrayList(); - for (String other_element : other.destinationAddress) { - __this__destinationAddress.add(other_element); - } - this.destinationAddress = __this__destinationAddress; - } - } - - public SpanEvent deepCopy() { - return new SpanEvent(this); - } - - @Override - public void clear() { - this.agentId = null; - this.applicationId = null; - setAgentIdentifierIsSet(false); - this.agentIdentifier = 0; - setMostTraceIdIsSet(false); - this.mostTraceId = 0; - setLeastTraceIdIsSet(false); - this.leastTraceId = 0; - setSpanIdIsSet(false); - this.spanId = 0; - setSequenceIsSet(false); - this.sequence = 0; - setStartElapsedIsSet(false); - this.startElapsed = 0; - setEndElapsedIsSet(false); - this.endElapsed = 0; - this.rpc = null; - setServiceTypeIsSet(false); - this.serviceType = 0; - this.endPoint = null; - this.annotations = null; - setDepthIsSet(false); - this.depth = 0; - setNextSpanIdIsSet(false); - this.nextSpanId = 0; - this.destinationId = null; - this.destinationAddress = null; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 String getApplicationId() { - return this.applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public void unsetApplicationId() { - this.applicationId = null; - } - - /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ - public boolean isSetApplicationId() { - return this.applicationId != null; - } - - public void setApplicationIdIsSet(boolean value) { - if (!value) { - this.applicationId = null; - } - } - - public short getAgentIdentifier() { - return this.agentIdentifier; - } - - public void setAgentIdentifier(short agentIdentifier) { - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - } - - public void unsetAgentIdentifier() { - __isset_bit_vector.clear(__AGENTIDENTIFIER_ISSET_ID); - } - - /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentIdentifier() { - return __isset_bit_vector.get(__AGENTIDENTIFIER_ISSET_ID); - } - - public void setAgentIdentifierIsSet(boolean value) { - __isset_bit_vector.set(__AGENTIDENTIFIER_ISSET_ID, value); - } - - public long getMostTraceId() { - return this.mostTraceId; - } - - public void setMostTraceId(long mostTraceId) { - this.mostTraceId = mostTraceId; - setMostTraceIdIsSet(true); - } - - public void unsetMostTraceId() { - __isset_bit_vector.clear(__MOSTTRACEID_ISSET_ID); - } - - /** Returns true if field mostTraceId is set (has been assigned a value) and false otherwise */ - public boolean isSetMostTraceId() { - return __isset_bit_vector.get(__MOSTTRACEID_ISSET_ID); - } - - public void setMostTraceIdIsSet(boolean value) { - __isset_bit_vector.set(__MOSTTRACEID_ISSET_ID, value); - } - - public long getLeastTraceId() { - return this.leastTraceId; - } - - public void setLeastTraceId(long leastTraceId) { - this.leastTraceId = leastTraceId; - setLeastTraceIdIsSet(true); - } - - public void unsetLeastTraceId() { - __isset_bit_vector.clear(__LEASTTRACEID_ISSET_ID); - } - - /** Returns true if field leastTraceId is set (has been assigned a value) and false otherwise */ - public boolean isSetLeastTraceId() { - return __isset_bit_vector.get(__LEASTTRACEID_ISSET_ID); - } - - public void setLeastTraceIdIsSet(boolean value) { - __isset_bit_vector.set(__LEASTTRACEID_ISSET_ID, value); - } - - public int getSpanId() { - return this.spanId; - } - - public void setSpanId(int spanId) { - this.spanId = spanId; - setSpanIdIsSet(true); - } - - public void unsetSpanId() { - __isset_bit_vector.clear(__SPANID_ISSET_ID); - } - - /** Returns true if field spanId is set (has been assigned a value) and false otherwise */ - public boolean isSetSpanId() { - return __isset_bit_vector.get(__SPANID_ISSET_ID); - } - - public void setSpanIdIsSet(boolean value) { - __isset_bit_vector.set(__SPANID_ISSET_ID, value); - } - - public short getSequence() { - return this.sequence; - } - - public void setSequence(short sequence) { - this.sequence = sequence; - setSequenceIsSet(true); - } - - public void unsetSequence() { - __isset_bit_vector.clear(__SEQUENCE_ISSET_ID); - } - - /** Returns true if field sequence is set (has been assigned a value) and false otherwise */ - public boolean isSetSequence() { - return __isset_bit_vector.get(__SEQUENCE_ISSET_ID); - } - - public void setSequenceIsSet(boolean value) { - __isset_bit_vector.set(__SEQUENCE_ISSET_ID, value); - } - - public int getStartElapsed() { - return this.startElapsed; - } - - public void setStartElapsed(int startElapsed) { - this.startElapsed = startElapsed; - setStartElapsedIsSet(true); - } - - public void unsetStartElapsed() { - __isset_bit_vector.clear(__STARTELAPSED_ISSET_ID); - } - - /** Returns true if field startElapsed is set (has been assigned a value) and false otherwise */ - public boolean isSetStartElapsed() { - return __isset_bit_vector.get(__STARTELAPSED_ISSET_ID); - } - - public void setStartElapsedIsSet(boolean value) { - __isset_bit_vector.set(__STARTELAPSED_ISSET_ID, value); - } - - public int getEndElapsed() { - return this.endElapsed; - } - - public void setEndElapsed(int endElapsed) { - this.endElapsed = endElapsed; - setEndElapsedIsSet(true); - } - - public void unsetEndElapsed() { - __isset_bit_vector.clear(__ENDELAPSED_ISSET_ID); - } - - /** Returns true if field endElapsed is set (has been assigned a value) and false otherwise */ - public boolean isSetEndElapsed() { - return __isset_bit_vector.get(__ENDELAPSED_ISSET_ID); - } - - public void setEndElapsedIsSet(boolean value) { - __isset_bit_vector.set(__ENDELAPSED_ISSET_ID, value); - } - - public String getRpc() { - return this.rpc; - } - - public void setRpc(String rpc) { - this.rpc = rpc; - } - - public void unsetRpc() { - this.rpc = null; - } - - /** Returns true if field rpc is set (has been assigned a value) and false otherwise */ - public boolean isSetRpc() { - return this.rpc != null; - } - - public void setRpcIsSet(boolean value) { - if (!value) { - this.rpc = null; - } - } - - public short getServiceType() { - return this.serviceType; - } - - public void setServiceType(short serviceType) { - this.serviceType = serviceType; - setServiceTypeIsSet(true); - } - - public void unsetServiceType() { - __isset_bit_vector.clear(__SERVICETYPE_ISSET_ID); - } - - /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ - public boolean isSetServiceType() { - return __isset_bit_vector.get(__SERVICETYPE_ISSET_ID); - } - - public void setServiceTypeIsSet(boolean value) { - __isset_bit_vector.set(__SERVICETYPE_ISSET_ID, value); - } - - public String getEndPoint() { - return this.endPoint; - } - - public void setEndPoint(String endPoint) { - this.endPoint = endPoint; - } - - public void unsetEndPoint() { - this.endPoint = null; - } - - /** Returns true if field endPoint is set (has been assigned a value) and false otherwise */ - public boolean isSetEndPoint() { - return this.endPoint != null; - } - - public void setEndPointIsSet(boolean value) { - if (!value) { - this.endPoint = null; - } - } - - public int getAnnotationsSize() { - return (this.annotations == null) ? 0 : this.annotations.size(); - } - - public java.util.Iterator getAnnotationsIterator() { - return (this.annotations == null) ? null : this.annotations.iterator(); - } - - public void addToAnnotations(Annotation elem) { - if (this.annotations == null) { - this.annotations = new ArrayList(); - } - this.annotations.add(elem); - } - - public List getAnnotations() { - return this.annotations; - } - - public void setAnnotations(List annotations) { - this.annotations = annotations; - } - - public void unsetAnnotations() { - this.annotations = null; - } - - /** Returns true if field annotations is set (has been assigned a value) and false otherwise */ - public boolean isSetAnnotations() { - return this.annotations != null; - } - - public void setAnnotationsIsSet(boolean value) { - if (!value) { - this.annotations = null; - } - } - - public int getDepth() { - return this.depth; - } - - public void setDepth(int depth) { - this.depth = depth; - setDepthIsSet(true); - } - - public void unsetDepth() { - __isset_bit_vector.clear(__DEPTH_ISSET_ID); - } - - /** Returns true if field depth is set (has been assigned a value) and false otherwise */ - public boolean isSetDepth() { - return __isset_bit_vector.get(__DEPTH_ISSET_ID); - } - - public void setDepthIsSet(boolean value) { - __isset_bit_vector.set(__DEPTH_ISSET_ID, value); - } - - public int getNextSpanId() { - return this.nextSpanId; - } - - public void setNextSpanId(int nextSpanId) { - this.nextSpanId = nextSpanId; - setNextSpanIdIsSet(true); - } - - public void unsetNextSpanId() { - __isset_bit_vector.clear(__NEXTSPANID_ISSET_ID); - } - - /** Returns true if field nextSpanId is set (has been assigned a value) and false otherwise */ - public boolean isSetNextSpanId() { - return __isset_bit_vector.get(__NEXTSPANID_ISSET_ID); - } - - public void setNextSpanIdIsSet(boolean value) { - __isset_bit_vector.set(__NEXTSPANID_ISSET_ID, value); - } - - public String getDestinationId() { - return this.destinationId; - } - - public void setDestinationId(String destinationId) { - this.destinationId = destinationId; - } - - public void unsetDestinationId() { - this.destinationId = null; - } - - /** Returns true if field destinationId is set (has been assigned a value) and false otherwise */ - public boolean isSetDestinationId() { - return this.destinationId != null; - } - - public void setDestinationIdIsSet(boolean value) { - if (!value) { - this.destinationId = null; - } - } - - public int getDestinationAddressSize() { - return (this.destinationAddress == null) ? 0 : this.destinationAddress.size(); - } - - public java.util.Iterator getDestinationAddressIterator() { - return (this.destinationAddress == null) ? null : this.destinationAddress.iterator(); - } - - public void addToDestinationAddress(String elem) { - if (this.destinationAddress == null) { - this.destinationAddress = new ArrayList(); - } - this.destinationAddress.add(elem); - } - - public List getDestinationAddress() { - return this.destinationAddress; - } - - public void setDestinationAddress(List destinationAddress) { - this.destinationAddress = destinationAddress; - } - - public void unsetDestinationAddress() { - this.destinationAddress = null; - } - - /** Returns true if field destinationAddress is set (has been assigned a value) and false otherwise */ - public boolean isSetDestinationAddress() { - return this.destinationAddress != null; - } - - public void setDestinationAddressIsSet(boolean value) { - if (!value) { - this.destinationAddress = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case APPLICATION_ID: - if (value == null) { - unsetApplicationId(); - } else { - setApplicationId((String)value); - } - break; - - case AGENT_IDENTIFIER: - if (value == null) { - unsetAgentIdentifier(); - } else { - setAgentIdentifier((Short)value); - } - break; - - case MOST_TRACE_ID: - if (value == null) { - unsetMostTraceId(); - } else { - setMostTraceId((Long)value); - } - break; - - case LEAST_TRACE_ID: - if (value == null) { - unsetLeastTraceId(); - } else { - setLeastTraceId((Long)value); - } - break; - - case SPAN_ID: - if (value == null) { - unsetSpanId(); - } else { - setSpanId((Integer)value); - } - break; - - case SEQUENCE: - if (value == null) { - unsetSequence(); - } else { - setSequence((Short)value); - } - break; - - case START_ELAPSED: - if (value == null) { - unsetStartElapsed(); - } else { - setStartElapsed((Integer)value); - } - break; - - case END_ELAPSED: - if (value == null) { - unsetEndElapsed(); - } else { - setEndElapsed((Integer)value); - } - break; - - case RPC: - if (value == null) { - unsetRpc(); - } else { - setRpc((String)value); - } - break; - - case SERVICE_TYPE: - if (value == null) { - unsetServiceType(); - } else { - setServiceType((Short)value); - } - break; - - case END_POINT: - if (value == null) { - unsetEndPoint(); - } else { - setEndPoint((String)value); - } - break; - - case ANNOTATIONS: - if (value == null) { - unsetAnnotations(); - } else { - setAnnotations((List)value); - } - break; - - case DEPTH: - if (value == null) { - unsetDepth(); - } else { - setDepth((Integer)value); - } - break; - - case NEXT_SPAN_ID: - if (value == null) { - unsetNextSpanId(); - } else { - setNextSpanId((Integer)value); - } - break; - - case DESTINATION_ID: - if (value == null) { - unsetDestinationId(); - } else { - setDestinationId((String)value); - } - break; - - case DESTINATION_ADDRESS: - if (value == null) { - unsetDestinationAddress(); - } else { - setDestinationAddress((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case APPLICATION_ID: - return getApplicationId(); - - case AGENT_IDENTIFIER: - return Short.valueOf(getAgentIdentifier()); - - case MOST_TRACE_ID: - return Long.valueOf(getMostTraceId()); - - case LEAST_TRACE_ID: - return Long.valueOf(getLeastTraceId()); - - case SPAN_ID: - return Integer.valueOf(getSpanId()); - - case SEQUENCE: - return Short.valueOf(getSequence()); - - case START_ELAPSED: - return Integer.valueOf(getStartElapsed()); - - case END_ELAPSED: - return Integer.valueOf(getEndElapsed()); - - case RPC: - return getRpc(); - - case SERVICE_TYPE: - return Short.valueOf(getServiceType()); - - case END_POINT: - return getEndPoint(); - - case ANNOTATIONS: - return getAnnotations(); - - case DEPTH: - return Integer.valueOf(getDepth()); - - case NEXT_SPAN_ID: - return Integer.valueOf(getNextSpanId()); - - case DESTINATION_ID: - return getDestinationId(); - - case DESTINATION_ADDRESS: - return getDestinationAddress(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case APPLICATION_ID: - return isSetApplicationId(); - case AGENT_IDENTIFIER: - return isSetAgentIdentifier(); - case MOST_TRACE_ID: - return isSetMostTraceId(); - case LEAST_TRACE_ID: - return isSetLeastTraceId(); - case SPAN_ID: - return isSetSpanId(); - case SEQUENCE: - return isSetSequence(); - case START_ELAPSED: - return isSetStartElapsed(); - case END_ELAPSED: - return isSetEndElapsed(); - case RPC: - return isSetRpc(); - case SERVICE_TYPE: - return isSetServiceType(); - case END_POINT: - return isSetEndPoint(); - case ANNOTATIONS: - return isSetAnnotations(); - case DEPTH: - return isSetDepth(); - case NEXT_SPAN_ID: - return isSetNextSpanId(); - case DESTINATION_ID: - return isSetDestinationId(); - case DESTINATION_ADDRESS: - return isSetDestinationAddress(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SpanEvent) - return this.equals((SpanEvent)that); - return false; - } - - public boolean equals(SpanEvent that) { - if (that == null) - return false; - - 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_applicationId = true && this.isSetApplicationId(); - boolean that_present_applicationId = true && that.isSetApplicationId(); - if (this_present_applicationId || that_present_applicationId) { - if (!(this_present_applicationId && that_present_applicationId)) - return false; - if (!this.applicationId.equals(that.applicationId)) - return false; - } - - boolean this_present_agentIdentifier = true && this.isSetAgentIdentifier(); - boolean that_present_agentIdentifier = true && that.isSetAgentIdentifier(); - if (this_present_agentIdentifier || that_present_agentIdentifier) { - if (!(this_present_agentIdentifier && that_present_agentIdentifier)) - return false; - if (this.agentIdentifier != that.agentIdentifier) - return false; - } - - boolean this_present_mostTraceId = true && this.isSetMostTraceId(); - boolean that_present_mostTraceId = true && that.isSetMostTraceId(); - if (this_present_mostTraceId || that_present_mostTraceId) { - if (!(this_present_mostTraceId && that_present_mostTraceId)) - return false; - if (this.mostTraceId != that.mostTraceId) - return false; - } - - boolean this_present_leastTraceId = true && this.isSetLeastTraceId(); - boolean that_present_leastTraceId = true && that.isSetLeastTraceId(); - if (this_present_leastTraceId || that_present_leastTraceId) { - if (!(this_present_leastTraceId && that_present_leastTraceId)) - return false; - if (this.leastTraceId != that.leastTraceId) - return false; - } - - boolean this_present_spanId = true && this.isSetSpanId(); - boolean that_present_spanId = true && that.isSetSpanId(); - if (this_present_spanId || that_present_spanId) { - if (!(this_present_spanId && that_present_spanId)) - return false; - if (this.spanId != that.spanId) - return false; - } - - boolean this_present_sequence = true; - boolean that_present_sequence = true; - if (this_present_sequence || that_present_sequence) { - if (!(this_present_sequence && that_present_sequence)) - return false; - if (this.sequence != that.sequence) - return false; - } - - boolean this_present_startElapsed = true; - boolean that_present_startElapsed = true; - if (this_present_startElapsed || that_present_startElapsed) { - if (!(this_present_startElapsed && that_present_startElapsed)) - return false; - if (this.startElapsed != that.startElapsed) - return false; - } - - boolean this_present_endElapsed = true; - boolean that_present_endElapsed = true; - if (this_present_endElapsed || that_present_endElapsed) { - if (!(this_present_endElapsed && that_present_endElapsed)) - return false; - if (this.endElapsed != that.endElapsed) - return false; - } - - boolean this_present_rpc = true && this.isSetRpc(); - boolean that_present_rpc = true && that.isSetRpc(); - if (this_present_rpc || that_present_rpc) { - if (!(this_present_rpc && that_present_rpc)) - return false; - if (!this.rpc.equals(that.rpc)) - return false; - } - - boolean this_present_serviceType = true; - boolean that_present_serviceType = true; - if (this_present_serviceType || that_present_serviceType) { - if (!(this_present_serviceType && that_present_serviceType)) - return false; - if (this.serviceType != that.serviceType) - return false; - } - - boolean this_present_endPoint = true && this.isSetEndPoint(); - boolean that_present_endPoint = true && that.isSetEndPoint(); - if (this_present_endPoint || that_present_endPoint) { - if (!(this_present_endPoint && that_present_endPoint)) - return false; - if (!this.endPoint.equals(that.endPoint)) - return false; - } - - boolean this_present_annotations = true && this.isSetAnnotations(); - boolean that_present_annotations = true && that.isSetAnnotations(); - if (this_present_annotations || that_present_annotations) { - if (!(this_present_annotations && that_present_annotations)) - return false; - if (!this.annotations.equals(that.annotations)) - return false; - } - - boolean this_present_depth = true && this.isSetDepth(); - boolean that_present_depth = true && that.isSetDepth(); - if (this_present_depth || that_present_depth) { - if (!(this_present_depth && that_present_depth)) - return false; - if (this.depth != that.depth) - return false; - } - - boolean this_present_nextSpanId = true && this.isSetNextSpanId(); - boolean that_present_nextSpanId = true && that.isSetNextSpanId(); - if (this_present_nextSpanId || that_present_nextSpanId) { - if (!(this_present_nextSpanId && that_present_nextSpanId)) - return false; - if (this.nextSpanId != that.nextSpanId) - return false; - } - - boolean this_present_destinationId = true && this.isSetDestinationId(); - boolean that_present_destinationId = true && that.isSetDestinationId(); - if (this_present_destinationId || that_present_destinationId) { - if (!(this_present_destinationId && that_present_destinationId)) - return false; - if (!this.destinationId.equals(that.destinationId)) - return false; - } - - boolean this_present_destinationAddress = true && this.isSetDestinationAddress(); - boolean that_present_destinationAddress = true && that.isSetDestinationAddress(); - if (this_present_destinationAddress || that_present_destinationAddress) { - if (!(this_present_destinationAddress && that_present_destinationAddress)) - return false; - if (!this.destinationAddress.equals(that.destinationAddress)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(SpanEvent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - SpanEvent typedOther = (SpanEvent)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(typedOther.isSetApplicationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApplicationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, typedOther.applicationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentIdentifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMostTraceId()).compareTo(typedOther.isSetMostTraceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMostTraceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mostTraceId, typedOther.mostTraceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLeastTraceId()).compareTo(typedOther.isSetLeastTraceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLeastTraceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leastTraceId, typedOther.leastTraceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(typedOther.isSetSpanId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpanId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, typedOther.spanId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSequence()).compareTo(typedOther.isSetSequence()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSequence()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequence, typedOther.sequence); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStartElapsed()).compareTo(typedOther.isSetStartElapsed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartElapsed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startElapsed, typedOther.startElapsed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEndElapsed()).compareTo(typedOther.isSetEndElapsed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndElapsed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endElapsed, typedOther.endElapsed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRpc()).compareTo(typedOther.isSetRpc()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRpc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rpc, typedOther.rpc); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServiceType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEndPoint()).compareTo(typedOther.isSetEndPoint()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndPoint()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endPoint, typedOther.endPoint); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAnnotations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDepth()).compareTo(typedOther.isSetDepth()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDepth()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.depth, typedOther.depth); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNextSpanId()).compareTo(typedOther.isSetNextSpanId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNextSpanId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nextSpanId, typedOther.nextSpanId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDestinationId()).compareTo(typedOther.isSetDestinationId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDestinationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destinationId, typedOther.destinationId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDestinationAddress()).compareTo(typedOther.isSetDestinationAddress()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDestinationAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destinationAddress, typedOther.destinationAddress); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("SpanEvent("); - boolean first = true; - - if (isSetAgentId()) { - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - } - if (isSetApplicationId()) { - if (!first) sb.append(", "); - sb.append("applicationId:"); - if (this.applicationId == null) { - sb.append("null"); - } else { - sb.append(this.applicationId); - } - first = false; - } - if (isSetAgentIdentifier()) { - if (!first) sb.append(", "); - sb.append("agentIdentifier:"); - sb.append(this.agentIdentifier); - first = false; - } - if (isSetMostTraceId()) { - if (!first) sb.append(", "); - sb.append("mostTraceId:"); - sb.append(this.mostTraceId); - first = false; - } - if (isSetLeastTraceId()) { - if (!first) sb.append(", "); - sb.append("leastTraceId:"); - sb.append(this.leastTraceId); - first = false; - } - if (isSetSpanId()) { - if (!first) sb.append(", "); - sb.append("spanId:"); - sb.append(this.spanId); - first = false; - } - if (!first) sb.append(", "); - sb.append("sequence:"); - sb.append(this.sequence); - first = false; - if (!first) sb.append(", "); - sb.append("startElapsed:"); - sb.append(this.startElapsed); - first = false; - if (!first) sb.append(", "); - sb.append("endElapsed:"); - sb.append(this.endElapsed); - first = false; - if (isSetRpc()) { - if (!first) sb.append(", "); - sb.append("rpc:"); - if (this.rpc == null) { - sb.append("null"); - } else { - sb.append(this.rpc); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("serviceType:"); - sb.append(this.serviceType); - first = false; - if (isSetEndPoint()) { - if (!first) sb.append(", "); - sb.append("endPoint:"); - if (this.endPoint == null) { - sb.append("null"); - } else { - sb.append(this.endPoint); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("annotations:"); - if (this.annotations == null) { - sb.append("null"); - } else { - sb.append(this.annotations); - } - first = false; - if (isSetDepth()) { - if (!first) sb.append(", "); - sb.append("depth:"); - sb.append(this.depth); - first = false; - } - if (isSetNextSpanId()) { - if (!first) sb.append(", "); - sb.append("nextSpanId:"); - sb.append(this.nextSpanId); - first = false; - } - if (isSetDestinationId()) { - if (!first) sb.append(", "); - sb.append("destinationId:"); - if (this.destinationId == null) { - sb.append("null"); - } else { - sb.append(this.destinationId); - } - first = false; - } - if (isSetDestinationAddress()) { - if (!first) sb.append(", "); - sb.append("destinationAddress:"); - if (this.destinationAddress == null) { - sb.append("null"); - } else { - sb.append(this.destinationAddress); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 SpanEventStandardSchemeFactory implements SchemeFactory { - public SpanEventStandardScheme getScheme() { - return new SpanEventStandardScheme(); - } - } - - private static class SpanEventStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SpanEvent 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: // APPLICATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.applicationId = iprot.readString(); - struct.setApplicationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // AGENT_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MOST_TRACE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.mostTraceId = iprot.readI64(); - struct.setMostTraceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LEAST_TRACE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.leastTraceId = iprot.readI64(); - struct.setLeastTraceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // SPAN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.spanId = iprot.readI32(); - struct.setSpanIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // SEQUENCE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.sequence = iprot.readI16(); - struct.setSequenceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // START_ELAPSED - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.startElapsed = iprot.readI32(); - struct.setStartElapsedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // END_ELAPSED - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.endElapsed = iprot.readI32(); - struct.setEndElapsedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // RPC - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.rpc = iprot.readString(); - struct.setRpcIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // SERVICE_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.serviceType = iprot.readI16(); - struct.setServiceTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // END_POINT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.endPoint = iprot.readString(); - struct.setEndPointIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 14: // ANNOTATIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.annotations = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - Annotation _elem2; // required - _elem2 = new Annotation(); - _elem2.read(iprot); - struct.annotations.add(_elem2); - } - iprot.readListEnd(); - } - struct.setAnnotationsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // DEPTH - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.depth = iprot.readI32(); - struct.setDepthIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 16: // NEXT_SPAN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.nextSpanId = iprot.readI32(); - struct.setNextSpanIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 20: // DESTINATION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.destinationId = iprot.readString(); - struct.setDestinationIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 21: // DESTINATION_ADDRESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); - struct.destinationAddress = new ArrayList(_list3.size); - for (int _i4 = 0; _i4 < _list3.size; ++_i4) - { - String _elem5; // required - _elem5 = iprot.readString(); - struct.destinationAddress.add(_elem5); - } - iprot.readListEnd(); - } - struct.setDestinationAddressIsSet(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, SpanEvent 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.applicationId != null) { - if (struct.isSetApplicationId()) { - oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); - oprot.writeString(struct.applicationId); - oprot.writeFieldEnd(); - } - } - if (struct.isSetAgentIdentifier()) { - oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); - oprot.writeI16(struct.agentIdentifier); - oprot.writeFieldEnd(); - } - if (struct.isSetMostTraceId()) { - oprot.writeFieldBegin(MOST_TRACE_ID_FIELD_DESC); - oprot.writeI64(struct.mostTraceId); - oprot.writeFieldEnd(); - } - if (struct.isSetLeastTraceId()) { - oprot.writeFieldBegin(LEAST_TRACE_ID_FIELD_DESC); - oprot.writeI64(struct.leastTraceId); - oprot.writeFieldEnd(); - } - if (struct.isSetSpanId()) { - oprot.writeFieldBegin(SPAN_ID_FIELD_DESC); - oprot.writeI32(struct.spanId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(SEQUENCE_FIELD_DESC); - oprot.writeI16(struct.sequence); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(START_ELAPSED_FIELD_DESC); - oprot.writeI32(struct.startElapsed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(END_ELAPSED_FIELD_DESC); - oprot.writeI32(struct.endElapsed); - oprot.writeFieldEnd(); - if (struct.rpc != null) { - if (struct.isSetRpc()) { - oprot.writeFieldBegin(RPC_FIELD_DESC); - oprot.writeString(struct.rpc); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); - oprot.writeI16(struct.serviceType); - oprot.writeFieldEnd(); - if (struct.endPoint != null) { - if (struct.isSetEndPoint()) { - oprot.writeFieldBegin(END_POINT_FIELD_DESC); - oprot.writeString(struct.endPoint); - oprot.writeFieldEnd(); - } - } - if (struct.annotations != null) { - oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.annotations.size())); - for (Annotation _iter6 : struct.annotations) - { - _iter6.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetDepth()) { - oprot.writeFieldBegin(DEPTH_FIELD_DESC); - oprot.writeI32(struct.depth); - oprot.writeFieldEnd(); - } - if (struct.isSetNextSpanId()) { - oprot.writeFieldBegin(NEXT_SPAN_ID_FIELD_DESC); - oprot.writeI32(struct.nextSpanId); - oprot.writeFieldEnd(); - } - if (struct.destinationId != null) { - if (struct.isSetDestinationId()) { - oprot.writeFieldBegin(DESTINATION_ID_FIELD_DESC); - oprot.writeString(struct.destinationId); - oprot.writeFieldEnd(); - } - } - if (struct.destinationAddress != null) { - if (struct.isSetDestinationAddress()) { - oprot.writeFieldBegin(DESTINATION_ADDRESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.destinationAddress.size())); - for (String _iter7 : struct.destinationAddress) - { - oprot.writeString(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SpanEventTupleSchemeFactory implements SchemeFactory { - public SpanEventTupleScheme getScheme() { - return new SpanEventTupleScheme(); - } - } - - private static class SpanEventTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SpanEvent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetApplicationId()) { - optionals.set(1); - } - if (struct.isSetAgentIdentifier()) { - optionals.set(2); - } - if (struct.isSetMostTraceId()) { - optionals.set(3); - } - if (struct.isSetLeastTraceId()) { - optionals.set(4); - } - if (struct.isSetSpanId()) { - optionals.set(5); - } - if (struct.isSetSequence()) { - optionals.set(6); - } - if (struct.isSetStartElapsed()) { - optionals.set(7); - } - if (struct.isSetEndElapsed()) { - optionals.set(8); - } - if (struct.isSetRpc()) { - optionals.set(9); - } - if (struct.isSetServiceType()) { - optionals.set(10); - } - if (struct.isSetEndPoint()) { - optionals.set(11); - } - if (struct.isSetAnnotations()) { - optionals.set(12); - } - if (struct.isSetDepth()) { - optionals.set(13); - } - if (struct.isSetNextSpanId()) { - optionals.set(14); - } - if (struct.isSetDestinationId()) { - optionals.set(15); - } - if (struct.isSetDestinationAddress()) { - optionals.set(16); - } - oprot.writeBitSet(optionals, 17); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetApplicationId()) { - oprot.writeString(struct.applicationId); - } - if (struct.isSetAgentIdentifier()) { - oprot.writeI16(struct.agentIdentifier); - } - if (struct.isSetMostTraceId()) { - oprot.writeI64(struct.mostTraceId); - } - if (struct.isSetLeastTraceId()) { - oprot.writeI64(struct.leastTraceId); - } - if (struct.isSetSpanId()) { - oprot.writeI32(struct.spanId); - } - if (struct.isSetSequence()) { - oprot.writeI16(struct.sequence); - } - if (struct.isSetStartElapsed()) { - oprot.writeI32(struct.startElapsed); - } - if (struct.isSetEndElapsed()) { - oprot.writeI32(struct.endElapsed); - } - if (struct.isSetRpc()) { - oprot.writeString(struct.rpc); - } - if (struct.isSetServiceType()) { - oprot.writeI16(struct.serviceType); - } - if (struct.isSetEndPoint()) { - oprot.writeString(struct.endPoint); - } - if (struct.isSetAnnotations()) { - { - oprot.writeI32(struct.annotations.size()); - for (Annotation _iter8 : struct.annotations) - { - _iter8.write(oprot); - } - } - } - if (struct.isSetDepth()) { - oprot.writeI32(struct.depth); - } - if (struct.isSetNextSpanId()) { - oprot.writeI32(struct.nextSpanId); - } - if (struct.isSetDestinationId()) { - oprot.writeString(struct.destinationId); - } - if (struct.isSetDestinationAddress()) { - { - oprot.writeI32(struct.destinationAddress.size()); - for (String _iter9 : struct.destinationAddress) - { - oprot.writeString(_iter9); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SpanEvent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(17); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.applicationId = iprot.readString(); - struct.setApplicationIdIsSet(true); - } - if (incoming.get(2)) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } - if (incoming.get(3)) { - struct.mostTraceId = iprot.readI64(); - struct.setMostTraceIdIsSet(true); - } - if (incoming.get(4)) { - struct.leastTraceId = iprot.readI64(); - struct.setLeastTraceIdIsSet(true); - } - if (incoming.get(5)) { - struct.spanId = iprot.readI32(); - struct.setSpanIdIsSet(true); - } - if (incoming.get(6)) { - struct.sequence = iprot.readI16(); - struct.setSequenceIsSet(true); - } - if (incoming.get(7)) { - struct.startElapsed = iprot.readI32(); - struct.setStartElapsedIsSet(true); - } - if (incoming.get(8)) { - struct.endElapsed = iprot.readI32(); - struct.setEndElapsedIsSet(true); - } - if (incoming.get(9)) { - struct.rpc = iprot.readString(); - struct.setRpcIsSet(true); - } - if (incoming.get(10)) { - struct.serviceType = iprot.readI16(); - struct.setServiceTypeIsSet(true); - } - if (incoming.get(11)) { - struct.endPoint = iprot.readString(); - struct.setEndPointIsSet(true); - } - if (incoming.get(12)) { - { - org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.annotations = new ArrayList(_list10.size); - for (int _i11 = 0; _i11 < _list10.size; ++_i11) - { - Annotation _elem12; // required - _elem12 = new Annotation(); - _elem12.read(iprot); - struct.annotations.add(_elem12); - } - } - struct.setAnnotationsIsSet(true); - } - if (incoming.get(13)) { - struct.depth = iprot.readI32(); - struct.setDepthIsSet(true); - } - if (incoming.get(14)) { - struct.nextSpanId = iprot.readI32(); - struct.setNextSpanIdIsSet(true); - } - if (incoming.get(15)) { - struct.destinationId = iprot.readString(); - struct.setDestinationIdIsSet(true); - } - if (incoming.get(16)) { - { - org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.destinationAddress = new ArrayList(_list13.size); - for (int _i14 = 0; _i14 < _list13.size; ++_i14) - { - String _elem15; // required - _elem15 = iprot.readString(); - struct.destinationAddress.add(_elem15); - } - } - struct.setDestinationAddressIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SpanEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpanEvent"); + + 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 APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)3); + private static final org.apache.thrift.protocol.TField MOST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mostTraceId", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField LEAST_TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("leastTraceId", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField SEQUENCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sequence", org.apache.thrift.protocol.TType.I16, (short)7); + private static final org.apache.thrift.protocol.TField START_ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("startElapsed", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField END_ELAPSED_FIELD_DESC = new org.apache.thrift.protocol.TField("endElapsed", org.apache.thrift.protocol.TType.I32, (short)9); + private static final org.apache.thrift.protocol.TField RPC_FIELD_DESC = new org.apache.thrift.protocol.TField("rpc", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I16, (short)12); + private static final org.apache.thrift.protocol.TField END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("endPoint", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)14); + private static final org.apache.thrift.protocol.TField DEPTH_FIELD_DESC = new org.apache.thrift.protocol.TField("depth", org.apache.thrift.protocol.TType.I32, (short)15); + private static final org.apache.thrift.protocol.TField NEXT_SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nextSpanId", org.apache.thrift.protocol.TType.I32, (short)16); + private static final org.apache.thrift.protocol.TField DESTINATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("destinationId", org.apache.thrift.protocol.TType.STRING, (short)20); + private static final org.apache.thrift.protocol.TField DESTINATION_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("destinationAddress", org.apache.thrift.protocol.TType.LIST, (short)21); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SpanEventStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SpanEventTupleSchemeFactory()); + } + + private String agentId; // optional + private String applicationId; // optional + private short agentIdentifier; // optional + private long mostTraceId; // optional + private long leastTraceId; // optional + private int spanId; // optional + private short sequence; // required + private int startElapsed; // required + private int endElapsed; // required + private String rpc; // optional + private short serviceType; // required + private String endPoint; // optional + private List annotations; // required + private int depth; // optional + private int nextSpanId; // optional + private String destinationId; // optional + private List destinationAddress; // 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"), + APPLICATION_ID((short)2, "applicationId"), + AGENT_IDENTIFIER((short)3, "agentIdentifier"), + MOST_TRACE_ID((short)4, "mostTraceId"), + LEAST_TRACE_ID((short)5, "leastTraceId"), + SPAN_ID((short)6, "spanId"), + SEQUENCE((short)7, "sequence"), + START_ELAPSED((short)8, "startElapsed"), + END_ELAPSED((short)9, "endElapsed"), + RPC((short)10, "rpc"), + SERVICE_TYPE((short)12, "serviceType"), + END_POINT((short)13, "endPoint"), + ANNOTATIONS((short)14, "annotations"), + DEPTH((short)15, "depth"), + NEXT_SPAN_ID((short)16, "nextSpanId"), + DESTINATION_ID((short)20, "destinationId"), + DESTINATION_ADDRESS((short)21, "destinationAddress"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // APPLICATION_ID + return APPLICATION_ID; + case 3: // AGENT_IDENTIFIER + return AGENT_IDENTIFIER; + case 4: // MOST_TRACE_ID + return MOST_TRACE_ID; + case 5: // LEAST_TRACE_ID + return LEAST_TRACE_ID; + case 6: // SPAN_ID + return SPAN_ID; + case 7: // SEQUENCE + return SEQUENCE; + case 8: // START_ELAPSED + return START_ELAPSED; + case 9: // END_ELAPSED + return END_ELAPSED; + case 10: // RPC + return RPC; + case 12: // SERVICE_TYPE + return SERVICE_TYPE; + case 13: // END_POINT + return END_POINT; + case 14: // ANNOTATIONS + return ANNOTATIONS; + case 15: // DEPTH + return DEPTH; + case 16: // NEXT_SPAN_ID + return NEXT_SPAN_ID; + case 20: // DESTINATION_ID + return DESTINATION_ID; + case 21: // DESTINATION_ADDRESS + return DESTINATION_ADDRESS; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __AGENTIDENTIFIER_ISSET_ID = 0; + private static final int __MOSTTRACEID_ISSET_ID = 1; + private static final int __LEASTTRACEID_ISSET_ID = 2; + private static final int __SPANID_ISSET_ID = 3; + private static final int __SEQUENCE_ISSET_ID = 4; + private static final int __STARTELAPSED_ISSET_ID = 5; + private static final int __ENDELAPSED_ISSET_ID = 6; + private static final int __SERVICETYPE_ISSET_ID = 7; + private static final int __DEPTH_ISSET_ID = 8; + private static final int __NEXTSPANID_ISSET_ID = 9; + private short __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.AGENT_ID,_Fields.APPLICATION_ID,_Fields.AGENT_IDENTIFIER,_Fields.MOST_TRACE_ID,_Fields.LEAST_TRACE_ID,_Fields.SPAN_ID,_Fields.RPC,_Fields.END_POINT,_Fields.DEPTH,_Fields.NEXT_SPAN_ID,_Fields.DESTINATION_ID,_Fields.DESTINATION_ADDRESS}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.MOST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("mostTraceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEAST_TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("leastTraceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQUENCE, new org.apache.thrift.meta_data.FieldMetaData("sequence", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.START_ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("startElapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.END_ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("endElapsed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RPC, new org.apache.thrift.meta_data.FieldMetaData("rpc", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.END_POINT, new org.apache.thrift.meta_data.FieldMetaData("endPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", 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, Annotation.class)))); + tmpMap.put(_Fields.DEPTH, new org.apache.thrift.meta_data.FieldMetaData("depth", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.NEXT_SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("nextSpanId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DESTINATION_ID, new org.apache.thrift.meta_data.FieldMetaData("destinationId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESTINATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("destinationAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL, + 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 = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpanEvent.class, metaDataMap); + } + + public SpanEvent() { + } + + public SpanEvent( + short sequence, + int startElapsed, + int endElapsed, + short serviceType, + List annotations) + { + this(); + this.sequence = sequence; + setSequenceIsSet(true); + this.startElapsed = startElapsed; + setStartElapsedIsSet(true); + this.endElapsed = endElapsed; + setEndElapsedIsSet(true); + this.serviceType = serviceType; + setServiceTypeIsSet(true); + this.annotations = annotations; + } + + /** + * Performs a deep copy on other. + */ + public SpanEvent(SpanEvent other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + if (other.isSetApplicationId()) { + this.applicationId = other.applicationId; + } + this.agentIdentifier = other.agentIdentifier; + this.mostTraceId = other.mostTraceId; + this.leastTraceId = other.leastTraceId; + this.spanId = other.spanId; + this.sequence = other.sequence; + this.startElapsed = other.startElapsed; + this.endElapsed = other.endElapsed; + if (other.isSetRpc()) { + this.rpc = other.rpc; + } + this.serviceType = other.serviceType; + if (other.isSetEndPoint()) { + this.endPoint = other.endPoint; + } + if (other.isSetAnnotations()) { + List __this__annotations = new ArrayList(); + for (Annotation other_element : other.annotations) { + __this__annotations.add(new Annotation(other_element)); + } + this.annotations = __this__annotations; + } + this.depth = other.depth; + this.nextSpanId = other.nextSpanId; + if (other.isSetDestinationId()) { + this.destinationId = other.destinationId; + } + if (other.isSetDestinationAddress()) { + List __this__destinationAddress = new ArrayList(); + for (String other_element : other.destinationAddress) { + __this__destinationAddress.add(other_element); + } + this.destinationAddress = __this__destinationAddress; + } + } + + public SpanEvent deepCopy() { + return new SpanEvent(this); + } + + @Override + public void clear() { + this.agentId = null; + this.applicationId = null; + setAgentIdentifierIsSet(false); + this.agentIdentifier = 0; + setMostTraceIdIsSet(false); + this.mostTraceId = 0; + setLeastTraceIdIsSet(false); + this.leastTraceId = 0; + setSpanIdIsSet(false); + this.spanId = 0; + setSequenceIsSet(false); + this.sequence = 0; + setStartElapsedIsSet(false); + this.startElapsed = 0; + setEndElapsedIsSet(false); + this.endElapsed = 0; + this.rpc = null; + setServiceTypeIsSet(false); + this.serviceType = 0; + this.endPoint = null; + this.annotations = null; + setDepthIsSet(false); + this.depth = 0; + setNextSpanIdIsSet(false); + this.nextSpanId = 0; + this.destinationId = null; + this.destinationAddress = null; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public void unsetApplicationId() { + this.applicationId = null; + } + + /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ + public boolean isSetApplicationId() { + return this.applicationId != null; + } + + public void setApplicationIdIsSet(boolean value) { + if (!value) { + this.applicationId = null; + } + } + + public short getAgentIdentifier() { + return this.agentIdentifier; + } + + public void setAgentIdentifier(short agentIdentifier) { + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + } + + public void unsetAgentIdentifier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentIdentifier() { + return EncodingUtils.testBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + public void setAgentIdentifierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID, value); + } + + public long getMostTraceId() { + return this.mostTraceId; + } + + public void setMostTraceId(long mostTraceId) { + this.mostTraceId = mostTraceId; + setMostTraceIdIsSet(true); + } + + public void unsetMostTraceId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID); + } + + /** Returns true if field mostTraceId is set (has been assigned a value) and false otherwise */ + public boolean isSetMostTraceId() { + return EncodingUtils.testBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID); + } + + public void setMostTraceIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOSTTRACEID_ISSET_ID, value); + } + + public long getLeastTraceId() { + return this.leastTraceId; + } + + public void setLeastTraceId(long leastTraceId) { + this.leastTraceId = leastTraceId; + setLeastTraceIdIsSet(true); + } + + public void unsetLeastTraceId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID); + } + + /** Returns true if field leastTraceId is set (has been assigned a value) and false otherwise */ + public boolean isSetLeastTraceId() { + return EncodingUtils.testBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID); + } + + public void setLeastTraceIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LEASTTRACEID_ISSET_ID, value); + } + + public int getSpanId() { + return this.spanId; + } + + public void setSpanId(int spanId) { + this.spanId = spanId; + setSpanIdIsSet(true); + } + + public void unsetSpanId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID); + } + + /** Returns true if field spanId is set (has been assigned a value) and false otherwise */ + public boolean isSetSpanId() { + return EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID); + } + + public void setSpanIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value); + } + + public short getSequence() { + return this.sequence; + } + + public void setSequence(short sequence) { + this.sequence = sequence; + setSequenceIsSet(true); + } + + public void unsetSequence() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEQUENCE_ISSET_ID); + } + + /** Returns true if field sequence is set (has been assigned a value) and false otherwise */ + public boolean isSetSequence() { + return EncodingUtils.testBit(__isset_bitfield, __SEQUENCE_ISSET_ID); + } + + public void setSequenceIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEQUENCE_ISSET_ID, value); + } + + public int getStartElapsed() { + return this.startElapsed; + } + + public void setStartElapsed(int startElapsed) { + this.startElapsed = startElapsed; + setStartElapsedIsSet(true); + } + + public void unsetStartElapsed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTELAPSED_ISSET_ID); + } + + /** Returns true if field startElapsed is set (has been assigned a value) and false otherwise */ + public boolean isSetStartElapsed() { + return EncodingUtils.testBit(__isset_bitfield, __STARTELAPSED_ISSET_ID); + } + + public void setStartElapsedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTELAPSED_ISSET_ID, value); + } + + public int getEndElapsed() { + return this.endElapsed; + } + + public void setEndElapsed(int endElapsed) { + this.endElapsed = endElapsed; + setEndElapsedIsSet(true); + } + + public void unsetEndElapsed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDELAPSED_ISSET_ID); + } + + /** Returns true if field endElapsed is set (has been assigned a value) and false otherwise */ + public boolean isSetEndElapsed() { + return EncodingUtils.testBit(__isset_bitfield, __ENDELAPSED_ISSET_ID); + } + + public void setEndElapsedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDELAPSED_ISSET_ID, value); + } + + public String getRpc() { + return this.rpc; + } + + public void setRpc(String rpc) { + this.rpc = rpc; + } + + public void unsetRpc() { + this.rpc = null; + } + + /** Returns true if field rpc is set (has been assigned a value) and false otherwise */ + public boolean isSetRpc() { + return this.rpc != null; + } + + public void setRpcIsSet(boolean value) { + if (!value) { + this.rpc = null; + } + } + + public short getServiceType() { + return this.serviceType; + } + + public void setServiceType(short serviceType) { + this.serviceType = serviceType; + setServiceTypeIsSet(true); + } + + public void unsetServiceType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ + public boolean isSetServiceType() { + return EncodingUtils.testBit(__isset_bitfield, __SERVICETYPE_ISSET_ID); + } + + public void setServiceTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVICETYPE_ISSET_ID, value); + } + + public String getEndPoint() { + return this.endPoint; + } + + public void setEndPoint(String endPoint) { + this.endPoint = endPoint; + } + + public void unsetEndPoint() { + this.endPoint = null; + } + + /** Returns true if field endPoint is set (has been assigned a value) and false otherwise */ + public boolean isSetEndPoint() { + return this.endPoint != null; + } + + public void setEndPointIsSet(boolean value) { + if (!value) { + this.endPoint = null; + } + } + + public int getAnnotationsSize() { + return (this.annotations == null) ? 0 : this.annotations.size(); + } + + public java.util.Iterator getAnnotationsIterator() { + return (this.annotations == null) ? null : this.annotations.iterator(); + } + + public void addToAnnotations(Annotation elem) { + if (this.annotations == null) { + this.annotations = new ArrayList(); + } + this.annotations.add(elem); + } + + public List getAnnotations() { + return this.annotations; + } + + public void setAnnotations(List annotations) { + this.annotations = annotations; + } + + public void unsetAnnotations() { + this.annotations = null; + } + + /** Returns true if field annotations is set (has been assigned a value) and false otherwise */ + public boolean isSetAnnotations() { + return this.annotations != null; + } + + public void setAnnotationsIsSet(boolean value) { + if (!value) { + this.annotations = null; + } + } + + public int getDepth() { + return this.depth; + } + + public void setDepth(int depth) { + this.depth = depth; + setDepthIsSet(true); + } + + public void unsetDepth() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEPTH_ISSET_ID); + } + + /** Returns true if field depth is set (has been assigned a value) and false otherwise */ + public boolean isSetDepth() { + return EncodingUtils.testBit(__isset_bitfield, __DEPTH_ISSET_ID); + } + + public void setDepthIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEPTH_ISSET_ID, value); + } + + public int getNextSpanId() { + return this.nextSpanId; + } + + public void setNextSpanId(int nextSpanId) { + this.nextSpanId = nextSpanId; + setNextSpanIdIsSet(true); + } + + public void unsetNextSpanId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEXTSPANID_ISSET_ID); + } + + /** Returns true if field nextSpanId is set (has been assigned a value) and false otherwise */ + public boolean isSetNextSpanId() { + return EncodingUtils.testBit(__isset_bitfield, __NEXTSPANID_ISSET_ID); + } + + public void setNextSpanIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEXTSPANID_ISSET_ID, value); + } + + public String getDestinationId() { + return this.destinationId; + } + + public void setDestinationId(String destinationId) { + this.destinationId = destinationId; + } + + public void unsetDestinationId() { + this.destinationId = null; + } + + /** Returns true if field destinationId is set (has been assigned a value) and false otherwise */ + public boolean isSetDestinationId() { + return this.destinationId != null; + } + + public void setDestinationIdIsSet(boolean value) { + if (!value) { + this.destinationId = null; + } + } + + public int getDestinationAddressSize() { + return (this.destinationAddress == null) ? 0 : this.destinationAddress.size(); + } + + public java.util.Iterator getDestinationAddressIterator() { + return (this.destinationAddress == null) ? null : this.destinationAddress.iterator(); + } + + public void addToDestinationAddress(String elem) { + if (this.destinationAddress == null) { + this.destinationAddress = new ArrayList(); + } + this.destinationAddress.add(elem); + } + + public List getDestinationAddress() { + return this.destinationAddress; + } + + public void setDestinationAddress(List destinationAddress) { + this.destinationAddress = destinationAddress; + } + + public void unsetDestinationAddress() { + this.destinationAddress = null; + } + + /** Returns true if field destinationAddress is set (has been assigned a value) and false otherwise */ + public boolean isSetDestinationAddress() { + return this.destinationAddress != null; + } + + public void setDestinationAddressIsSet(boolean value) { + if (!value) { + this.destinationAddress = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case APPLICATION_ID: + if (value == null) { + unsetApplicationId(); + } else { + setApplicationId((String)value); + } + break; + + case AGENT_IDENTIFIER: + if (value == null) { + unsetAgentIdentifier(); + } else { + setAgentIdentifier((Short)value); + } + break; + + case MOST_TRACE_ID: + if (value == null) { + unsetMostTraceId(); + } else { + setMostTraceId((Long)value); + } + break; + + case LEAST_TRACE_ID: + if (value == null) { + unsetLeastTraceId(); + } else { + setLeastTraceId((Long)value); + } + break; + + case SPAN_ID: + if (value == null) { + unsetSpanId(); + } else { + setSpanId((Integer)value); + } + break; + + case SEQUENCE: + if (value == null) { + unsetSequence(); + } else { + setSequence((Short)value); + } + break; + + case START_ELAPSED: + if (value == null) { + unsetStartElapsed(); + } else { + setStartElapsed((Integer)value); + } + break; + + case END_ELAPSED: + if (value == null) { + unsetEndElapsed(); + } else { + setEndElapsed((Integer)value); + } + break; + + case RPC: + if (value == null) { + unsetRpc(); + } else { + setRpc((String)value); + } + break; + + case SERVICE_TYPE: + if (value == null) { + unsetServiceType(); + } else { + setServiceType((Short)value); + } + break; + + case END_POINT: + if (value == null) { + unsetEndPoint(); + } else { + setEndPoint((String)value); + } + break; + + case ANNOTATIONS: + if (value == null) { + unsetAnnotations(); + } else { + setAnnotations((List)value); + } + break; + + case DEPTH: + if (value == null) { + unsetDepth(); + } else { + setDepth((Integer)value); + } + break; + + case NEXT_SPAN_ID: + if (value == null) { + unsetNextSpanId(); + } else { + setNextSpanId((Integer)value); + } + break; + + case DESTINATION_ID: + if (value == null) { + unsetDestinationId(); + } else { + setDestinationId((String)value); + } + break; + + case DESTINATION_ADDRESS: + if (value == null) { + unsetDestinationAddress(); + } else { + setDestinationAddress((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case APPLICATION_ID: + return getApplicationId(); + + case AGENT_IDENTIFIER: + return Short.valueOf(getAgentIdentifier()); + + case MOST_TRACE_ID: + return Long.valueOf(getMostTraceId()); + + case LEAST_TRACE_ID: + return Long.valueOf(getLeastTraceId()); + + case SPAN_ID: + return Integer.valueOf(getSpanId()); + + case SEQUENCE: + return Short.valueOf(getSequence()); + + case START_ELAPSED: + return Integer.valueOf(getStartElapsed()); + + case END_ELAPSED: + return Integer.valueOf(getEndElapsed()); + + case RPC: + return getRpc(); + + case SERVICE_TYPE: + return Short.valueOf(getServiceType()); + + case END_POINT: + return getEndPoint(); + + case ANNOTATIONS: + return getAnnotations(); + + case DEPTH: + return Integer.valueOf(getDepth()); + + case NEXT_SPAN_ID: + return Integer.valueOf(getNextSpanId()); + + case DESTINATION_ID: + return getDestinationId(); + + case DESTINATION_ADDRESS: + return getDestinationAddress(); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case APPLICATION_ID: + return isSetApplicationId(); + case AGENT_IDENTIFIER: + return isSetAgentIdentifier(); + case MOST_TRACE_ID: + return isSetMostTraceId(); + case LEAST_TRACE_ID: + return isSetLeastTraceId(); + case SPAN_ID: + return isSetSpanId(); + case SEQUENCE: + return isSetSequence(); + case START_ELAPSED: + return isSetStartElapsed(); + case END_ELAPSED: + return isSetEndElapsed(); + case RPC: + return isSetRpc(); + case SERVICE_TYPE: + return isSetServiceType(); + case END_POINT: + return isSetEndPoint(); + case ANNOTATIONS: + return isSetAnnotations(); + case DEPTH: + return isSetDepth(); + case NEXT_SPAN_ID: + return isSetNextSpanId(); + case DESTINATION_ID: + return isSetDestinationId(); + case DESTINATION_ADDRESS: + return isSetDestinationAddress(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SpanEvent) + return this.equals((SpanEvent)that); + return false; + } + + public boolean equals(SpanEvent that) { + if (that == null) + return false; + + 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_applicationId = true && this.isSetApplicationId(); + boolean that_present_applicationId = true && that.isSetApplicationId(); + if (this_present_applicationId || that_present_applicationId) { + if (!(this_present_applicationId && that_present_applicationId)) + return false; + if (!this.applicationId.equals(that.applicationId)) + return false; + } + + boolean this_present_agentIdentifier = true && this.isSetAgentIdentifier(); + boolean that_present_agentIdentifier = true && that.isSetAgentIdentifier(); + if (this_present_agentIdentifier || that_present_agentIdentifier) { + if (!(this_present_agentIdentifier && that_present_agentIdentifier)) + return false; + if (this.agentIdentifier != that.agentIdentifier) + return false; + } + + boolean this_present_mostTraceId = true && this.isSetMostTraceId(); + boolean that_present_mostTraceId = true && that.isSetMostTraceId(); + if (this_present_mostTraceId || that_present_mostTraceId) { + if (!(this_present_mostTraceId && that_present_mostTraceId)) + return false; + if (this.mostTraceId != that.mostTraceId) + return false; + } + + boolean this_present_leastTraceId = true && this.isSetLeastTraceId(); + boolean that_present_leastTraceId = true && that.isSetLeastTraceId(); + if (this_present_leastTraceId || that_present_leastTraceId) { + if (!(this_present_leastTraceId && that_present_leastTraceId)) + return false; + if (this.leastTraceId != that.leastTraceId) + return false; + } + + boolean this_present_spanId = true && this.isSetSpanId(); + boolean that_present_spanId = true && that.isSetSpanId(); + if (this_present_spanId || that_present_spanId) { + if (!(this_present_spanId && that_present_spanId)) + return false; + if (this.spanId != that.spanId) + return false; + } + + boolean this_present_sequence = true; + boolean that_present_sequence = true; + if (this_present_sequence || that_present_sequence) { + if (!(this_present_sequence && that_present_sequence)) + return false; + if (this.sequence != that.sequence) + return false; + } + + boolean this_present_startElapsed = true; + boolean that_present_startElapsed = true; + if (this_present_startElapsed || that_present_startElapsed) { + if (!(this_present_startElapsed && that_present_startElapsed)) + return false; + if (this.startElapsed != that.startElapsed) + return false; + } + + boolean this_present_endElapsed = true; + boolean that_present_endElapsed = true; + if (this_present_endElapsed || that_present_endElapsed) { + if (!(this_present_endElapsed && that_present_endElapsed)) + return false; + if (this.endElapsed != that.endElapsed) + return false; + } + + boolean this_present_rpc = true && this.isSetRpc(); + boolean that_present_rpc = true && that.isSetRpc(); + if (this_present_rpc || that_present_rpc) { + if (!(this_present_rpc && that_present_rpc)) + return false; + if (!this.rpc.equals(that.rpc)) + return false; + } + + boolean this_present_serviceType = true; + boolean that_present_serviceType = true; + if (this_present_serviceType || that_present_serviceType) { + if (!(this_present_serviceType && that_present_serviceType)) + return false; + if (this.serviceType != that.serviceType) + return false; + } + + boolean this_present_endPoint = true && this.isSetEndPoint(); + boolean that_present_endPoint = true && that.isSetEndPoint(); + if (this_present_endPoint || that_present_endPoint) { + if (!(this_present_endPoint && that_present_endPoint)) + return false; + if (!this.endPoint.equals(that.endPoint)) + return false; + } + + boolean this_present_annotations = true && this.isSetAnnotations(); + boolean that_present_annotations = true && that.isSetAnnotations(); + if (this_present_annotations || that_present_annotations) { + if (!(this_present_annotations && that_present_annotations)) + return false; + if (!this.annotations.equals(that.annotations)) + return false; + } + + boolean this_present_depth = true && this.isSetDepth(); + boolean that_present_depth = true && that.isSetDepth(); + if (this_present_depth || that_present_depth) { + if (!(this_present_depth && that_present_depth)) + return false; + if (this.depth != that.depth) + return false; + } + + boolean this_present_nextSpanId = true && this.isSetNextSpanId(); + boolean that_present_nextSpanId = true && that.isSetNextSpanId(); + if (this_present_nextSpanId || that_present_nextSpanId) { + if (!(this_present_nextSpanId && that_present_nextSpanId)) + return false; + if (this.nextSpanId != that.nextSpanId) + return false; + } + + boolean this_present_destinationId = true && this.isSetDestinationId(); + boolean that_present_destinationId = true && that.isSetDestinationId(); + if (this_present_destinationId || that_present_destinationId) { + if (!(this_present_destinationId && that_present_destinationId)) + return false; + if (!this.destinationId.equals(that.destinationId)) + return false; + } + + boolean this_present_destinationAddress = true && this.isSetDestinationAddress(); + boolean that_present_destinationAddress = true && that.isSetDestinationAddress(); + if (this_present_destinationAddress || that_present_destinationAddress) { + if (!(this_present_destinationAddress && that_present_destinationAddress)) + return false; + if (!this.destinationAddress.equals(that.destinationAddress)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SpanEvent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SpanEvent typedOther = (SpanEvent)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(typedOther.isSetApplicationId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetApplicationId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, typedOther.applicationId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentIdentifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMostTraceId()).compareTo(typedOther.isSetMostTraceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMostTraceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mostTraceId, typedOther.mostTraceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLeastTraceId()).compareTo(typedOther.isSetLeastTraceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLeastTraceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leastTraceId, typedOther.leastTraceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(typedOther.isSetSpanId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSpanId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, typedOther.spanId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSequence()).compareTo(typedOther.isSetSequence()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSequence()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequence, typedOther.sequence); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartElapsed()).compareTo(typedOther.isSetStartElapsed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartElapsed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startElapsed, typedOther.startElapsed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndElapsed()).compareTo(typedOther.isSetEndElapsed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndElapsed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endElapsed, typedOther.endElapsed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRpc()).compareTo(typedOther.isSetRpc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRpc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rpc, typedOther.rpc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(typedOther.isSetServiceType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServiceType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, typedOther.serviceType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndPoint()).compareTo(typedOther.isSetEndPoint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndPoint()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endPoint, typedOther.endPoint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAnnotations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDepth()).compareTo(typedOther.isSetDepth()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDepth()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.depth, typedOther.depth); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNextSpanId()).compareTo(typedOther.isSetNextSpanId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNextSpanId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nextSpanId, typedOther.nextSpanId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDestinationId()).compareTo(typedOther.isSetDestinationId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDestinationId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destinationId, typedOther.destinationId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDestinationAddress()).compareTo(typedOther.isSetDestinationAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDestinationAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destinationAddress, typedOther.destinationAddress); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SpanEvent("); + boolean first = true; + + if (isSetAgentId()) { + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + } + if (isSetApplicationId()) { + if (!first) sb.append(", "); + sb.append("applicationId:"); + if (this.applicationId == null) { + sb.append("null"); + } else { + sb.append(this.applicationId); + } + first = false; + } + if (isSetAgentIdentifier()) { + if (!first) sb.append(", "); + sb.append("agentIdentifier:"); + sb.append(this.agentIdentifier); + first = false; + } + if (isSetMostTraceId()) { + if (!first) sb.append(", "); + sb.append("mostTraceId:"); + sb.append(this.mostTraceId); + first = false; + } + if (isSetLeastTraceId()) { + if (!first) sb.append(", "); + sb.append("leastTraceId:"); + sb.append(this.leastTraceId); + first = false; + } + if (isSetSpanId()) { + if (!first) sb.append(", "); + sb.append("spanId:"); + sb.append(this.spanId); + first = false; + } + if (!first) sb.append(", "); + sb.append("sequence:"); + sb.append(this.sequence); + first = false; + if (!first) sb.append(", "); + sb.append("startElapsed:"); + sb.append(this.startElapsed); + first = false; + if (!first) sb.append(", "); + sb.append("endElapsed:"); + sb.append(this.endElapsed); + first = false; + if (isSetRpc()) { + if (!first) sb.append(", "); + sb.append("rpc:"); + if (this.rpc == null) { + sb.append("null"); + } else { + sb.append(this.rpc); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("serviceType:"); + sb.append(this.serviceType); + first = false; + if (isSetEndPoint()) { + if (!first) sb.append(", "); + sb.append("endPoint:"); + if (this.endPoint == null) { + sb.append("null"); + } else { + sb.append(this.endPoint); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("annotations:"); + if (this.annotations == null) { + sb.append("null"); + } else { + sb.append(this.annotations); + } + first = false; + if (isSetDepth()) { + if (!first) sb.append(", "); + sb.append("depth:"); + sb.append(this.depth); + first = false; + } + if (isSetNextSpanId()) { + if (!first) sb.append(", "); + sb.append("nextSpanId:"); + sb.append(this.nextSpanId); + first = false; + } + if (isSetDestinationId()) { + if (!first) sb.append(", "); + sb.append("destinationId:"); + if (this.destinationId == null) { + sb.append("null"); + } else { + sb.append(this.destinationId); + } + first = false; + } + if (isSetDestinationAddress()) { + if (!first) sb.append(", "); + sb.append("destinationAddress:"); + if (this.destinationAddress == null) { + sb.append("null"); + } else { + sb.append(this.destinationAddress); + } + 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, 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 SpanEventStandardSchemeFactory implements SchemeFactory { + public SpanEventStandardScheme getScheme() { + return new SpanEventStandardScheme(); + } + } + + private static class SpanEventStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SpanEvent 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: // APPLICATION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // AGENT_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MOST_TRACE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.mostTraceId = iprot.readI64(); + struct.setMostTraceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LEAST_TRACE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.leastTraceId = iprot.readI64(); + struct.setLeastTraceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SPAN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.spanId = iprot.readI32(); + struct.setSpanIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SEQUENCE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.sequence = iprot.readI16(); + struct.setSequenceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // START_ELAPSED + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.startElapsed = iprot.readI32(); + struct.setStartElapsedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // END_ELAPSED + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.endElapsed = iprot.readI32(); + struct.setEndElapsedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // RPC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.rpc = iprot.readString(); + struct.setRpcIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // SERVICE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // END_POINT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endPoint = iprot.readString(); + struct.setEndPointIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // ANNOTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.annotations = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + Annotation _elem2; // required + _elem2 = new Annotation(); + _elem2.read(iprot); + struct.annotations.add(_elem2); + } + iprot.readListEnd(); + } + struct.setAnnotationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // DEPTH + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.depth = iprot.readI32(); + struct.setDepthIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // NEXT_SPAN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.nextSpanId = iprot.readI32(); + struct.setNextSpanIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 20: // DESTINATION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.destinationId = iprot.readString(); + struct.setDestinationIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 21: // DESTINATION_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); + struct.destinationAddress = new ArrayList(_list3.size); + for (int _i4 = 0; _i4 < _list3.size; ++_i4) + { + String _elem5; // required + _elem5 = iprot.readString(); + struct.destinationAddress.add(_elem5); + } + iprot.readListEnd(); + } + struct.setDestinationAddressIsSet(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, SpanEvent 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.applicationId != null) { + if (struct.isSetApplicationId()) { + oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); + oprot.writeString(struct.applicationId); + oprot.writeFieldEnd(); + } + } + if (struct.isSetAgentIdentifier()) { + oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); + oprot.writeI16(struct.agentIdentifier); + oprot.writeFieldEnd(); + } + if (struct.isSetMostTraceId()) { + oprot.writeFieldBegin(MOST_TRACE_ID_FIELD_DESC); + oprot.writeI64(struct.mostTraceId); + oprot.writeFieldEnd(); + } + if (struct.isSetLeastTraceId()) { + oprot.writeFieldBegin(LEAST_TRACE_ID_FIELD_DESC); + oprot.writeI64(struct.leastTraceId); + oprot.writeFieldEnd(); + } + if (struct.isSetSpanId()) { + oprot.writeFieldBegin(SPAN_ID_FIELD_DESC); + oprot.writeI32(struct.spanId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SEQUENCE_FIELD_DESC); + oprot.writeI16(struct.sequence); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(START_ELAPSED_FIELD_DESC); + oprot.writeI32(struct.startElapsed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(END_ELAPSED_FIELD_DESC); + oprot.writeI32(struct.endElapsed); + oprot.writeFieldEnd(); + if (struct.rpc != null) { + if (struct.isSetRpc()) { + oprot.writeFieldBegin(RPC_FIELD_DESC); + oprot.writeString(struct.rpc); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); + oprot.writeI16(struct.serviceType); + oprot.writeFieldEnd(); + if (struct.endPoint != null) { + if (struct.isSetEndPoint()) { + oprot.writeFieldBegin(END_POINT_FIELD_DESC); + oprot.writeString(struct.endPoint); + oprot.writeFieldEnd(); + } + } + if (struct.annotations != null) { + oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.annotations.size())); + for (Annotation _iter6 : struct.annotations) + { + _iter6.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetDepth()) { + oprot.writeFieldBegin(DEPTH_FIELD_DESC); + oprot.writeI32(struct.depth); + oprot.writeFieldEnd(); + } + if (struct.isSetNextSpanId()) { + oprot.writeFieldBegin(NEXT_SPAN_ID_FIELD_DESC); + oprot.writeI32(struct.nextSpanId); + oprot.writeFieldEnd(); + } + if (struct.destinationId != null) { + if (struct.isSetDestinationId()) { + oprot.writeFieldBegin(DESTINATION_ID_FIELD_DESC); + oprot.writeString(struct.destinationId); + oprot.writeFieldEnd(); + } + } + if (struct.destinationAddress != null) { + if (struct.isSetDestinationAddress()) { + oprot.writeFieldBegin(DESTINATION_ADDRESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.destinationAddress.size())); + for (String _iter7 : struct.destinationAddress) + { + oprot.writeString(_iter7); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SpanEventTupleSchemeFactory implements SchemeFactory { + public SpanEventTupleScheme getScheme() { + return new SpanEventTupleScheme(); + } + } + + private static class SpanEventTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SpanEvent struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetApplicationId()) { + optionals.set(1); + } + if (struct.isSetAgentIdentifier()) { + optionals.set(2); + } + if (struct.isSetMostTraceId()) { + optionals.set(3); + } + if (struct.isSetLeastTraceId()) { + optionals.set(4); + } + if (struct.isSetSpanId()) { + optionals.set(5); + } + if (struct.isSetSequence()) { + optionals.set(6); + } + if (struct.isSetStartElapsed()) { + optionals.set(7); + } + if (struct.isSetEndElapsed()) { + optionals.set(8); + } + if (struct.isSetRpc()) { + optionals.set(9); + } + if (struct.isSetServiceType()) { + optionals.set(10); + } + if (struct.isSetEndPoint()) { + optionals.set(11); + } + if (struct.isSetAnnotations()) { + optionals.set(12); + } + if (struct.isSetDepth()) { + optionals.set(13); + } + if (struct.isSetNextSpanId()) { + optionals.set(14); + } + if (struct.isSetDestinationId()) { + optionals.set(15); + } + if (struct.isSetDestinationAddress()) { + optionals.set(16); + } + oprot.writeBitSet(optionals, 17); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetApplicationId()) { + oprot.writeString(struct.applicationId); + } + if (struct.isSetAgentIdentifier()) { + oprot.writeI16(struct.agentIdentifier); + } + if (struct.isSetMostTraceId()) { + oprot.writeI64(struct.mostTraceId); + } + if (struct.isSetLeastTraceId()) { + oprot.writeI64(struct.leastTraceId); + } + if (struct.isSetSpanId()) { + oprot.writeI32(struct.spanId); + } + if (struct.isSetSequence()) { + oprot.writeI16(struct.sequence); + } + if (struct.isSetStartElapsed()) { + oprot.writeI32(struct.startElapsed); + } + if (struct.isSetEndElapsed()) { + oprot.writeI32(struct.endElapsed); + } + if (struct.isSetRpc()) { + oprot.writeString(struct.rpc); + } + if (struct.isSetServiceType()) { + oprot.writeI16(struct.serviceType); + } + if (struct.isSetEndPoint()) { + oprot.writeString(struct.endPoint); + } + if (struct.isSetAnnotations()) { + { + oprot.writeI32(struct.annotations.size()); + for (Annotation _iter8 : struct.annotations) + { + _iter8.write(oprot); + } + } + } + if (struct.isSetDepth()) { + oprot.writeI32(struct.depth); + } + if (struct.isSetNextSpanId()) { + oprot.writeI32(struct.nextSpanId); + } + if (struct.isSetDestinationId()) { + oprot.writeString(struct.destinationId); + } + if (struct.isSetDestinationAddress()) { + { + oprot.writeI32(struct.destinationAddress.size()); + for (String _iter9 : struct.destinationAddress) + { + oprot.writeString(_iter9); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SpanEvent struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(17); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); + } + if (incoming.get(2)) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } + if (incoming.get(3)) { + struct.mostTraceId = iprot.readI64(); + struct.setMostTraceIdIsSet(true); + } + if (incoming.get(4)) { + struct.leastTraceId = iprot.readI64(); + struct.setLeastTraceIdIsSet(true); + } + if (incoming.get(5)) { + struct.spanId = iprot.readI32(); + struct.setSpanIdIsSet(true); + } + if (incoming.get(6)) { + struct.sequence = iprot.readI16(); + struct.setSequenceIsSet(true); + } + if (incoming.get(7)) { + struct.startElapsed = iprot.readI32(); + struct.setStartElapsedIsSet(true); + } + if (incoming.get(8)) { + struct.endElapsed = iprot.readI32(); + struct.setEndElapsedIsSet(true); + } + if (incoming.get(9)) { + struct.rpc = iprot.readString(); + struct.setRpcIsSet(true); + } + if (incoming.get(10)) { + struct.serviceType = iprot.readI16(); + struct.setServiceTypeIsSet(true); + } + if (incoming.get(11)) { + struct.endPoint = iprot.readString(); + struct.setEndPointIsSet(true); + } + if (incoming.get(12)) { + { + org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.annotations = new ArrayList(_list10.size); + for (int _i11 = 0; _i11 < _list10.size; ++_i11) + { + Annotation _elem12; // required + _elem12 = new Annotation(); + _elem12.read(iprot); + struct.annotations.add(_elem12); + } + } + struct.setAnnotationsIsSet(true); + } + if (incoming.get(13)) { + struct.depth = iprot.readI32(); + struct.setDepthIsSet(true); + } + if (incoming.get(14)) { + struct.nextSpanId = iprot.readI32(); + struct.setNextSpanIdIsSet(true); + } + if (incoming.get(15)) { + struct.destinationId = iprot.readString(); + struct.setDestinationIdIsSet(true); + } + if (incoming.get(16)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.destinationAddress = new ArrayList(_list13.size); + for (int _i14 = 0; _i14 < _list13.size; ++_i14) + { + String _elem15; // required + _elem15 = iprot.readString(); + struct.destinationAddress.add(_elem15); + } + } + struct.setDestinationAddressIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/common/dto/thrift/SqlMetaData.java b/src/main/java/com/profiler/common/dto/thrift/SqlMetaData.java index 7780fee07..e318b997f 100644 --- a/src/main/java/com/profiler/common/dto/thrift/SqlMetaData.java +++ b/src/main/java/com/profiler/common/dto/thrift/SqlMetaData.java @@ -1,762 +1,765 @@ -/** - * Autogenerated by Thrift Compiler (0.8.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.profiler.common.dto.thrift; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SqlMetaData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SqlMetaData"); - - 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 AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)2); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hashCode", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField SQL_FIELD_DESC = new org.apache.thrift.protocol.TField("sql", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SqlMetaDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SqlMetaDataTupleSchemeFactory()); - } - - private String agentId; // required - private short agentIdentifier; // required - private long startTime; // required - private int hashCode; // required - private String sql; // 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 { - AGENT_ID((short)1, "agentId"), - AGENT_IDENTIFIER((short)2, "agentIdentifier"), - START_TIME((short)3, "startTime"), - HASH_CODE((short)4, "hashCode"), - SQL((short)5, "sql"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : 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: // AGENT_IDENTIFIER - return AGENT_IDENTIFIER; - case 3: // START_TIME - return START_TIME; - case 4: // HASH_CODE - return HASH_CODE; - case 5: // SQL - return SQL; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __AGENTIDENTIFIER_ISSET_ID = 0; - private static final int __STARTTIME_ISSET_ID = 1; - private static final int __HASHCODE_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hashCode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SQL, new org.apache.thrift.meta_data.FieldMetaData("sql", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SqlMetaData.class, metaDataMap); - } - - public SqlMetaData() { - } - - public SqlMetaData( - String agentId, - short agentIdentifier, - long startTime, - int hashCode, - String sql) - { - this(); - this.agentId = agentId; - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - this.startTime = startTime; - setStartTimeIsSet(true); - this.hashCode = hashCode; - setHashCodeIsSet(true); - this.sql = sql; - } - - /** - * Performs a deep copy on other. - */ - public SqlMetaData(SqlMetaData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetAgentId()) { - this.agentId = other.agentId; - } - this.agentIdentifier = other.agentIdentifier; - this.startTime = other.startTime; - this.hashCode = other.hashCode; - if (other.isSetSql()) { - this.sql = other.sql; - } - } - - public SqlMetaData deepCopy() { - return new SqlMetaData(this); - } - - @Override - public void clear() { - this.agentId = null; - setAgentIdentifierIsSet(false); - this.agentIdentifier = 0; - setStartTimeIsSet(false); - this.startTime = 0; - setHashCodeIsSet(false); - this.hashCode = 0; - this.sql = null; - } - - public String getAgentId() { - return this.agentId; - } - - public void setAgentId(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 short getAgentIdentifier() { - return this.agentIdentifier; - } - - public void setAgentIdentifier(short agentIdentifier) { - this.agentIdentifier = agentIdentifier; - setAgentIdentifierIsSet(true); - } - - public void unsetAgentIdentifier() { - __isset_bit_vector.clear(__AGENTIDENTIFIER_ISSET_ID); - } - - /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentIdentifier() { - return __isset_bit_vector.get(__AGENTIDENTIFIER_ISSET_ID); - } - - public void setAgentIdentifierIsSet(boolean value) { - __isset_bit_vector.set(__AGENTIDENTIFIER_ISSET_ID, value); - } - - public long getStartTime() { - return this.startTime; - } - - public void setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - } - - public void unsetStartTime() { - __isset_bit_vector.clear(__STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return __isset_bit_vector.get(__STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bit_vector.set(__STARTTIME_ISSET_ID, value); - } - - public int getHashCode() { - return this.hashCode; - } - - public void setHashCode(int hashCode) { - this.hashCode = hashCode; - setHashCodeIsSet(true); - } - - public void unsetHashCode() { - __isset_bit_vector.clear(__HASHCODE_ISSET_ID); - } - - /** Returns true if field hashCode is set (has been assigned a value) and false otherwise */ - public boolean isSetHashCode() { - return __isset_bit_vector.get(__HASHCODE_ISSET_ID); - } - - public void setHashCodeIsSet(boolean value) { - __isset_bit_vector.set(__HASHCODE_ISSET_ID, value); - } - - public String getSql() { - return this.sql; - } - - public void setSql(String sql) { - this.sql = sql; - } - - public void unsetSql() { - this.sql = null; - } - - /** Returns true if field sql is set (has been assigned a value) and false otherwise */ - public boolean isSetSql() { - return this.sql != null; - } - - public void setSqlIsSet(boolean value) { - if (!value) { - this.sql = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AGENT_ID: - if (value == null) { - unsetAgentId(); - } else { - setAgentId((String)value); - } - break; - - case AGENT_IDENTIFIER: - if (value == null) { - unsetAgentIdentifier(); - } else { - setAgentIdentifier((Short)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((Long)value); - } - break; - - case HASH_CODE: - if (value == null) { - unsetHashCode(); - } else { - setHashCode((Integer)value); - } - break; - - case SQL: - if (value == null) { - unsetSql(); - } else { - setSql((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AGENT_ID: - return getAgentId(); - - case AGENT_IDENTIFIER: - return Short.valueOf(getAgentIdentifier()); - - case START_TIME: - return Long.valueOf(getStartTime()); - - case HASH_CODE: - return Integer.valueOf(getHashCode()); - - case SQL: - return getSql(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case AGENT_ID: - return isSetAgentId(); - case AGENT_IDENTIFIER: - return isSetAgentIdentifier(); - case START_TIME: - return isSetStartTime(); - case HASH_CODE: - return isSetHashCode(); - case SQL: - return isSetSql(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SqlMetaData) - return this.equals((SqlMetaData)that); - return false; - } - - public boolean equals(SqlMetaData that) { - if (that == null) - return false; - - 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_agentIdentifier = true; - boolean that_present_agentIdentifier = true; - if (this_present_agentIdentifier || that_present_agentIdentifier) { - if (!(this_present_agentIdentifier && that_present_agentIdentifier)) - return false; - if (this.agentIdentifier != that.agentIdentifier) - return false; - } - - boolean this_present_startTime = true; - boolean that_present_startTime = true; - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_hashCode = true; - boolean that_present_hashCode = true; - if (this_present_hashCode || that_present_hashCode) { - if (!(this_present_hashCode && that_present_hashCode)) - return false; - if (this.hashCode != that.hashCode) - return false; - } - - boolean this_present_sql = true && this.isSetSql(); - boolean that_present_sql = true && that.isSetSql(); - if (this_present_sql || that_present_sql) { - if (!(this_present_sql && that_present_sql)) - return false; - if (!this.sql.equals(that.sql)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(SqlMetaData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - SqlMetaData typedOther = (SqlMetaData)other; - - lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentIdentifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHashCode()).compareTo(typedOther.isSetHashCode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHashCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hashCode, typedOther.hashCode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSql()).compareTo(typedOther.isSetSql()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSql()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sql, typedOther.sql); - 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 { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("SqlMetaData("); - boolean first = true; - - sb.append("agentId:"); - if (this.agentId == null) { - sb.append("null"); - } else { - sb.append(this.agentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("agentIdentifier:"); - sb.append(this.agentIdentifier); - first = false; - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - if (!first) sb.append(", "); - sb.append("hashCode:"); - sb.append(this.hashCode); - first = false; - if (!first) sb.append(", "); - sb.append("sql:"); - if (this.sql == null) { - sb.append("null"); - } else { - sb.append(this.sql); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - } - - 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, 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_bit_vector = new BitSet(1); - 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 SqlMetaDataStandardSchemeFactory implements SchemeFactory { - public SqlMetaDataStandardScheme getScheme() { - return new SqlMetaDataStandardScheme(); - } - } - - private static class SqlMetaDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SqlMetaData 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: // AGENT_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // HASH_CODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.hashCode = iprot.readI32(); - struct.setHashCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // SQL - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.sql = iprot.readString(); - struct.setSqlIsSet(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, SqlMetaData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.agentId != null) { - oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); - oprot.writeString(struct.agentId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); - oprot.writeI16(struct.agentIdentifier); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(HASH_CODE_FIELD_DESC); - oprot.writeI32(struct.hashCode); - oprot.writeFieldEnd(); - if (struct.sql != null) { - oprot.writeFieldBegin(SQL_FIELD_DESC); - oprot.writeString(struct.sql); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SqlMetaDataTupleSchemeFactory implements SchemeFactory { - public SqlMetaDataTupleScheme getScheme() { - return new SqlMetaDataTupleScheme(); - } - } - - private static class SqlMetaDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SqlMetaData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetAgentId()) { - optionals.set(0); - } - if (struct.isSetAgentIdentifier()) { - optionals.set(1); - } - if (struct.isSetStartTime()) { - optionals.set(2); - } - if (struct.isSetHashCode()) { - optionals.set(3); - } - if (struct.isSetSql()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetAgentId()) { - oprot.writeString(struct.agentId); - } - if (struct.isSetAgentIdentifier()) { - oprot.writeI16(struct.agentIdentifier); - } - if (struct.isSetStartTime()) { - oprot.writeI64(struct.startTime); - } - if (struct.isSetHashCode()) { - oprot.writeI32(struct.hashCode); - } - if (struct.isSetSql()) { - oprot.writeString(struct.sql); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SqlMetaData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.agentId = iprot.readString(); - struct.setAgentIdIsSet(true); - } - if (incoming.get(1)) { - struct.agentIdentifier = iprot.readI16(); - struct.setAgentIdentifierIsSet(true); - } - if (incoming.get(2)) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } - if (incoming.get(3)) { - struct.hashCode = iprot.readI32(); - struct.setHashCodeIsSet(true); - } - if (incoming.get(4)) { - struct.sql = iprot.readString(); - struct.setSqlIsSet(true); - } - } - } - -} - +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.profiler.common.dto.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SqlMetaData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SqlMetaData"); + + 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 AGENT_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("agentIdentifier", org.apache.thrift.protocol.TType.I16, (short)2); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hashCode", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField SQL_FIELD_DESC = new org.apache.thrift.protocol.TField("sql", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SqlMetaDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SqlMetaDataTupleSchemeFactory()); + } + + private String agentId; // required + private short agentIdentifier; // required + private long startTime; // required + private int hashCode; // required + private String sql; // 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 { + AGENT_ID((short)1, "agentId"), + AGENT_IDENTIFIER((short)2, "agentIdentifier"), + START_TIME((short)3, "startTime"), + HASH_CODE((short)4, "hashCode"), + SQL((short)5, "sql"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : 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: // AGENT_IDENTIFIER + return AGENT_IDENTIFIER; + case 3: // START_TIME + return START_TIME; + case 4: // HASH_CODE + return HASH_CODE; + case 5: // SQL + return SQL; + 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 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(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __AGENTIDENTIFIER_ISSET_ID = 0; + private static final int __STARTTIME_ISSET_ID = 1; + private static final int __HASHCODE_ISSET_ID = 2; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("agentIdentifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hashCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SQL, new org.apache.thrift.meta_data.FieldMetaData("sql", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SqlMetaData.class, metaDataMap); + } + + public SqlMetaData() { + } + + public SqlMetaData( + String agentId, + short agentIdentifier, + long startTime, + int hashCode, + String sql) + { + this(); + this.agentId = agentId; + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + this.startTime = startTime; + setStartTimeIsSet(true); + this.hashCode = hashCode; + setHashCodeIsSet(true); + this.sql = sql; + } + + /** + * Performs a deep copy on other. + */ + public SqlMetaData(SqlMetaData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetAgentId()) { + this.agentId = other.agentId; + } + this.agentIdentifier = other.agentIdentifier; + this.startTime = other.startTime; + this.hashCode = other.hashCode; + if (other.isSetSql()) { + this.sql = other.sql; + } + } + + public SqlMetaData deepCopy() { + return new SqlMetaData(this); + } + + @Override + public void clear() { + this.agentId = null; + setAgentIdentifierIsSet(false); + this.agentIdentifier = 0; + setStartTimeIsSet(false); + this.startTime = 0; + setHashCodeIsSet(false); + this.hashCode = 0; + this.sql = null; + } + + public String getAgentId() { + return this.agentId; + } + + public void setAgentId(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 short getAgentIdentifier() { + return this.agentIdentifier; + } + + public void setAgentIdentifier(short agentIdentifier) { + this.agentIdentifier = agentIdentifier; + setAgentIdentifierIsSet(true); + } + + public void unsetAgentIdentifier() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + /** Returns true if field agentIdentifier is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentIdentifier() { + return EncodingUtils.testBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID); + } + + public void setAgentIdentifierIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGENTIDENTIFIER_ISSET_ID, value); + } + + public long getStartTime() { + return this.startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + } + + public void unsetStartTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public int getHashCode() { + return this.hashCode; + } + + public void setHashCode(int hashCode) { + this.hashCode = hashCode; + setHashCodeIsSet(true); + } + + public void unsetHashCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASHCODE_ISSET_ID); + } + + /** Returns true if field hashCode is set (has been assigned a value) and false otherwise */ + public boolean isSetHashCode() { + return EncodingUtils.testBit(__isset_bitfield, __HASHCODE_ISSET_ID); + } + + public void setHashCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASHCODE_ISSET_ID, value); + } + + public String getSql() { + return this.sql; + } + + public void setSql(String sql) { + this.sql = sql; + } + + public void unsetSql() { + this.sql = null; + } + + /** Returns true if field sql is set (has been assigned a value) and false otherwise */ + public boolean isSetSql() { + return this.sql != null; + } + + public void setSqlIsSet(boolean value) { + if (!value) { + this.sql = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AGENT_ID: + if (value == null) { + unsetAgentId(); + } else { + setAgentId((String)value); + } + break; + + case AGENT_IDENTIFIER: + if (value == null) { + unsetAgentIdentifier(); + } else { + setAgentIdentifier((Short)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((Long)value); + } + break; + + case HASH_CODE: + if (value == null) { + unsetHashCode(); + } else { + setHashCode((Integer)value); + } + break; + + case SQL: + if (value == null) { + unsetSql(); + } else { + setSql((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AGENT_ID: + return getAgentId(); + + case AGENT_IDENTIFIER: + return Short.valueOf(getAgentIdentifier()); + + case START_TIME: + return Long.valueOf(getStartTime()); + + case HASH_CODE: + return Integer.valueOf(getHashCode()); + + case SQL: + return getSql(); + + } + throw new 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 IllegalArgumentException(); + } + + switch (field) { + case AGENT_ID: + return isSetAgentId(); + case AGENT_IDENTIFIER: + return isSetAgentIdentifier(); + case START_TIME: + return isSetStartTime(); + case HASH_CODE: + return isSetHashCode(); + case SQL: + return isSetSql(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SqlMetaData) + return this.equals((SqlMetaData)that); + return false; + } + + public boolean equals(SqlMetaData that) { + if (that == null) + return false; + + 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_agentIdentifier = true; + boolean that_present_agentIdentifier = true; + if (this_present_agentIdentifier || that_present_agentIdentifier) { + if (!(this_present_agentIdentifier && that_present_agentIdentifier)) + return false; + if (this.agentIdentifier != that.agentIdentifier) + return false; + } + + boolean this_present_startTime = true; + boolean that_present_startTime = true; + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_hashCode = true; + boolean that_present_hashCode = true; + if (this_present_hashCode || that_present_hashCode) { + if (!(this_present_hashCode && that_present_hashCode)) + return false; + if (this.hashCode != that.hashCode) + return false; + } + + boolean this_present_sql = true && this.isSetSql(); + boolean that_present_sql = true && that.isSetSql(); + if (this_present_sql || that_present_sql) { + if (!(this_present_sql && that_present_sql)) + return false; + if (!this.sql.equals(that.sql)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SqlMetaData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SqlMetaData typedOther = (SqlMetaData)other; + + lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentIdentifier()).compareTo(typedOther.isSetAgentIdentifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentIdentifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentIdentifier, typedOther.agentIdentifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHashCode()).compareTo(typedOther.isSetHashCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHashCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hashCode, typedOther.hashCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSql()).compareTo(typedOther.isSetSql()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSql()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sql, typedOther.sql); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SqlMetaData("); + boolean first = true; + + sb.append("agentId:"); + if (this.agentId == null) { + sb.append("null"); + } else { + sb.append(this.agentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("agentIdentifier:"); + sb.append(this.agentIdentifier); + first = false; + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + if (!first) sb.append(", "); + sb.append("hashCode:"); + sb.append(this.hashCode); + first = false; + if (!first) sb.append(", "); + sb.append("sql:"); + if (this.sql == null) { + sb.append("null"); + } else { + sb.append(this.sql); + } + 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, 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 SqlMetaDataStandardSchemeFactory implements SchemeFactory { + public SqlMetaDataStandardScheme getScheme() { + return new SqlMetaDataStandardScheme(); + } + } + + private static class SqlMetaDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SqlMetaData 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: // AGENT_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // HASH_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.hashCode = iprot.readI32(); + struct.setHashCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // SQL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.sql = iprot.readString(); + struct.setSqlIsSet(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, SqlMetaData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.agentId != null) { + oprot.writeFieldBegin(AGENT_ID_FIELD_DESC); + oprot.writeString(struct.agentId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(AGENT_IDENTIFIER_FIELD_DESC); + oprot.writeI16(struct.agentIdentifier); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HASH_CODE_FIELD_DESC); + oprot.writeI32(struct.hashCode); + oprot.writeFieldEnd(); + if (struct.sql != null) { + oprot.writeFieldBegin(SQL_FIELD_DESC); + oprot.writeString(struct.sql); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SqlMetaDataTupleSchemeFactory implements SchemeFactory { + public SqlMetaDataTupleScheme getScheme() { + return new SqlMetaDataTupleScheme(); + } + } + + private static class SqlMetaDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SqlMetaData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAgentId()) { + optionals.set(0); + } + if (struct.isSetAgentIdentifier()) { + optionals.set(1); + } + if (struct.isSetStartTime()) { + optionals.set(2); + } + if (struct.isSetHashCode()) { + optionals.set(3); + } + if (struct.isSetSql()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetAgentId()) { + oprot.writeString(struct.agentId); + } + if (struct.isSetAgentIdentifier()) { + oprot.writeI16(struct.agentIdentifier); + } + if (struct.isSetStartTime()) { + oprot.writeI64(struct.startTime); + } + if (struct.isSetHashCode()) { + oprot.writeI32(struct.hashCode); + } + if (struct.isSetSql()) { + oprot.writeString(struct.sql); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SqlMetaData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.agentId = iprot.readString(); + struct.setAgentIdIsSet(true); + } + if (incoming.get(1)) { + struct.agentIdentifier = iprot.readI16(); + struct.setAgentIdentifierIsSet(true); + } + if (incoming.get(2)) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } + if (incoming.get(3)) { + struct.hashCode = iprot.readI32(); + struct.setHashCodeIsSet(true); + } + if (incoming.get(4)) { + struct.sql = iprot.readString(); + struct.setSqlIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/profiler/context/SpanChunk.java b/src/main/java/com/profiler/context/SpanChunk.java index b42da98e0..112a8caa1 100644 --- a/src/main/java/com/profiler/context/SpanChunk.java +++ b/src/main/java/com/profiler/context/SpanChunk.java @@ -1,13 +1,14 @@ package com.profiler.context; -import com.profiler.DefaultAgent; -import com.profiler.common.dto.thrift.Annotation; -import org.apache.thrift.TBase; - import java.util.ArrayList; import java.util.List; import java.util.UUID; +import org.apache.thrift.TBase; + +import com.profiler.DefaultAgent; +import com.profiler.common.dto.thrift.Annotation; + /** * */ @@ -28,13 +29,16 @@ public class SpanChunk implements Thriftable { tSpanChunk.setAgentId(DefaultAgent.getInstance().getAgentId()); tSpanChunk.setApplicationId(DefaultAgent.getInstance().getApplicationName()); + tSpanChunk.setServiceType(parentSpan.getServiceType().getCode()); tSpanChunk.setAgentIdentifier(DefaultAgent.getInstance().getIdentifier()); UUID id = parentSpan.getTraceID().getId(); tSpanChunk.setMostTraceId(id.getMostSignificantBits()); tSpanChunk.setLeastTraceId(id.getLeastSignificantBits()); tSpanChunk.setSpanId(parentSpan.getTraceID().getSpanId()); - + + tSpanChunk.setEndPoint(parentSpan.getEndPoint()); + List tSpanEvent = createSpanEvent(spanEventList); tSpanChunk.setSpanEventList(tSpanEvent); diff --git a/src/main/thrift/Trace.thrift b/src/main/thrift/Trace.thrift index cf9d81bf8..9c750b739 100644 --- a/src/main/thrift/Trace.thrift +++ b/src/main/thrift/Trace.thrift @@ -78,14 +78,17 @@ struct Span { struct SpanChunk { 1: string agentId 2: string applicationId - 3: i16 agentIdentifier + 3: i16 serviceType + 4: i16 agentIdentifier - 4: i64 mostTraceId - 5: i64 leastTraceId + 5: i64 mostTraceId + 6: i64 leastTraceId - 6: i32 spanId + 7: i32 spanId + + 8: optional string endPoint - 7: list spanEventList + 9: list spanEventList } struct SqlMetaData {