diff --git a/.classpath b/.classpath
index 291ee5d8d..26fae19f2 100644
--- a/.classpath
+++ b/.classpath
@@ -17,5 +17,6 @@
+
\ No newline at end of file
diff --git a/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Annotation.java b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Annotation.java
new file mode 100644
index 000000000..9430fa830
--- /dev/null
+++ b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Annotation.java
@@ -0,0 +1,675 @@
+/**
+ * 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.context.gen;
+
+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 TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField DURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("duration", org.apache.thrift.protocol.TType.I32, (short)4);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AnnotationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AnnotationTupleSchemeFactory());
+ }
+
+ private long timestamp; // required
+ private String value; // required
+ private Endpoint host; // optional
+ private int duration; // 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 {
+ TIMESTAMP((short)1, "timestamp"),
+ VALUE((short)2, "value"),
+ HOST((short)3, "host"),
+ DURATION((short)4, "duration");
+
+ 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: // TIMESTAMP
+ return TIMESTAMP;
+ case 2: // VALUE
+ return VALUE;
+ case 3: // HOST
+ return HOST;
+ case 4: // DURATION
+ return DURATION;
+ 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 __TIMESTAMP_ISSET_ID = 0;
+ private static final int __DURATION_ISSET_ID = 1;
+ private BitSet __isset_bit_vector = new BitSet(2);
+ private _Fields optionals[] = {_Fields.HOST,_Fields.DURATION};
+ 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.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.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Endpoint.class)));
+ tmpMap.put(_Fields.DURATION, new org.apache.thrift.meta_data.FieldMetaData("duration", 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(Annotation.class, metaDataMap);
+ }
+
+ public Annotation() {
+ }
+
+ public Annotation(
+ long timestamp,
+ String value)
+ {
+ this();
+ this.timestamp = timestamp;
+ setTimestampIsSet(true);
+ this.value = value;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public Annotation(Annotation other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.timestamp = other.timestamp;
+ if (other.isSetValue()) {
+ this.value = other.value;
+ }
+ if (other.isSetHost()) {
+ this.host = new Endpoint(other.host);
+ }
+ this.duration = other.duration;
+ }
+
+ public Annotation deepCopy() {
+ return new Annotation(this);
+ }
+
+ @Override
+ public void clear() {
+ setTimestampIsSet(false);
+ this.timestamp = 0;
+ this.value = null;
+ this.host = null;
+ setDurationIsSet(false);
+ this.duration = 0;
+ }
+
+ 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 String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public Endpoint getHost() {
+ return this.host;
+ }
+
+ public void setHost(Endpoint host) {
+ this.host = host;
+ }
+
+ public void unsetHost() {
+ this.host = null;
+ }
+
+ /** Returns true if field host is set (has been assigned a value) and false otherwise */
+ public boolean isSetHost() {
+ return this.host != null;
+ }
+
+ public void setHostIsSet(boolean value) {
+ if (!value) {
+ this.host = null;
+ }
+ }
+
+ public int getDuration() {
+ return this.duration;
+ }
+
+ public void setDuration(int duration) {
+ this.duration = duration;
+ setDurationIsSet(true);
+ }
+
+ public void unsetDuration() {
+ __isset_bit_vector.clear(__DURATION_ISSET_ID);
+ }
+
+ /** Returns true if field duration is set (has been assigned a value) and false otherwise */
+ public boolean isSetDuration() {
+ return __isset_bit_vector.get(__DURATION_ISSET_ID);
+ }
+
+ public void setDurationIsSet(boolean value) {
+ __isset_bit_vector.set(__DURATION_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TIMESTAMP:
+ if (value == null) {
+ unsetTimestamp();
+ } else {
+ setTimestamp((Long)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((String)value);
+ }
+ break;
+
+ case HOST:
+ if (value == null) {
+ unsetHost();
+ } else {
+ setHost((Endpoint)value);
+ }
+ break;
+
+ case DURATION:
+ if (value == null) {
+ unsetDuration();
+ } else {
+ setDuration((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TIMESTAMP:
+ return Long.valueOf(getTimestamp());
+
+ case VALUE:
+ return getValue();
+
+ case HOST:
+ return getHost();
+
+ case DURATION:
+ return Integer.valueOf(getDuration());
+
+ }
+ 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 TIMESTAMP:
+ return isSetTimestamp();
+ case VALUE:
+ return isSetValue();
+ case HOST:
+ return isSetHost();
+ case DURATION:
+ return isSetDuration();
+ }
+ 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_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_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_host = true && this.isSetHost();
+ boolean that_present_host = true && that.isSetHost();
+ if (this_present_host || that_present_host) {
+ if (!(this_present_host && that_present_host))
+ return false;
+ if (!this.host.equals(that.host))
+ return false;
+ }
+
+ boolean this_present_duration = true && this.isSetDuration();
+ boolean that_present_duration = true && that.isSetDuration();
+ if (this_present_duration || that_present_duration) {
+ if (!(this_present_duration && that_present_duration))
+ return false;
+ if (this.duration != that.duration)
+ 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(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(isSetValue()).compareTo(typedOther.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHost()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDuration()).compareTo(typedOther.isSetDuration());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDuration()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.duration, typedOther.duration);
+ 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("timestamp:");
+ sb.append(this.timestamp);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.value);
+ }
+ first = false;
+ if (isSetHost()) {
+ if (!first) sb.append(", ");
+ sb.append("host:");
+ if (this.host == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.host);
+ }
+ first = false;
+ }
+ if (isSetDuration()) {
+ if (!first) sb.append(", ");
+ sb.append("duration:");
+ sb.append(this.duration);
+ 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: // 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 2: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // HOST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DURATION
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.duration = iprot.readI32();
+ struct.setDurationIsSet(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(TIMESTAMP_FIELD_DESC);
+ oprot.writeI64(struct.timestamp);
+ oprot.writeFieldEnd();
+ if (struct.value != null) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeString(struct.value);
+ oprot.writeFieldEnd();
+ }
+ if (struct.host != null) {
+ if (struct.isSetHost()) {
+ oprot.writeFieldBegin(HOST_FIELD_DESC);
+ struct.host.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetDuration()) {
+ oprot.writeFieldBegin(DURATION_FIELD_DESC);
+ oprot.writeI32(struct.duration);
+ 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.isSetTimestamp()) {
+ optionals.set(0);
+ }
+ if (struct.isSetValue()) {
+ optionals.set(1);
+ }
+ if (struct.isSetHost()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDuration()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetTimestamp()) {
+ oprot.writeI64(struct.timestamp);
+ }
+ if (struct.isSetValue()) {
+ oprot.writeString(struct.value);
+ }
+ if (struct.isSetHost()) {
+ struct.host.write(oprot);
+ }
+ if (struct.isSetDuration()) {
+ oprot.writeI32(struct.duration);
+ }
+ }
+
+ @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(4);
+ if (incoming.get(0)) {
+ struct.timestamp = iprot.readI64();
+ struct.setTimestampIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.duration = iprot.readI32();
+ struct.setDurationIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/generated-sources/thrift/gen-javabean/com/profiler/context/gen/BinaryAnnotation.java b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/BinaryAnnotation.java
new file mode 100644
index 000000000..1d77854ba
--- /dev/null
+++ b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/BinaryAnnotation.java
@@ -0,0 +1,789 @@
+/**
+ * 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.context.gen;
+
+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 BinaryAnnotation 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("BinaryAnnotation");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField ANNOTATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("annotationType", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BinaryAnnotationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BinaryAnnotationTupleSchemeFactory());
+ }
+
+ private long timestamp; // required
+ private String key; // required
+ private ByteBuffer value; // required
+ private String annotationType; // required
+ private Endpoint host; // 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 {
+ TIMESTAMP((short)1, "timestamp"),
+ KEY((short)2, "key"),
+ VALUE((short)3, "value"),
+ ANNOTATION_TYPE((short)4, "annotationType"),
+ HOST((short)5, "host");
+
+ 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: // TIMESTAMP
+ return TIMESTAMP;
+ case 2: // KEY
+ return KEY;
+ case 3: // VALUE
+ return VALUE;
+ case 4: // ANNOTATION_TYPE
+ return ANNOTATION_TYPE;
+ case 5: // HOST
+ return 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 __TIMESTAMP_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+ private _Fields optionals[] = {_Fields.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.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.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.STRING)));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ tmpMap.put(_Fields.ANNOTATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("annotationType", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Endpoint.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BinaryAnnotation.class, metaDataMap);
+ }
+
+ public BinaryAnnotation() {
+ }
+
+ public BinaryAnnotation(
+ long timestamp,
+ String key,
+ ByteBuffer value,
+ String annotationType)
+ {
+ this();
+ this.timestamp = timestamp;
+ setTimestampIsSet(true);
+ this.key = key;
+ this.value = value;
+ this.annotationType = annotationType;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public BinaryAnnotation(BinaryAnnotation other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.timestamp = other.timestamp;
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ if (other.isSetValue()) {
+ this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
+;
+ }
+ if (other.isSetAnnotationType()) {
+ this.annotationType = other.annotationType;
+ }
+ if (other.isSetHost()) {
+ this.host = new Endpoint(other.host);
+ }
+ }
+
+ public BinaryAnnotation deepCopy() {
+ return new BinaryAnnotation(this);
+ }
+
+ @Override
+ public void clear() {
+ setTimestampIsSet(false);
+ this.timestamp = 0;
+ this.key = null;
+ this.value = null;
+ this.annotationType = null;
+ this.host = null;
+ }
+
+ 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 String getKey() {
+ return this.key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ /** Returns true if field key is set (has been assigned a value) and false otherwise */
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public byte[] getValue() {
+ setValue(org.apache.thrift.TBaseHelper.rightSize(value));
+ return value == null ? null : value.array();
+ }
+
+ public ByteBuffer bufferForValue() {
+ return value;
+ }
+
+ public void setValue(byte[] value) {
+ setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
+ }
+
+ public void setValue(ByteBuffer value) {
+ this.value = value;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public String getAnnotationType() {
+ return this.annotationType;
+ }
+
+ public void setAnnotationType(String annotationType) {
+ this.annotationType = annotationType;
+ }
+
+ public void unsetAnnotationType() {
+ this.annotationType = null;
+ }
+
+ /** Returns true if field annotationType is set (has been assigned a value) and false otherwise */
+ public boolean isSetAnnotationType() {
+ return this.annotationType != null;
+ }
+
+ public void setAnnotationTypeIsSet(boolean value) {
+ if (!value) {
+ this.annotationType = null;
+ }
+ }
+
+ public Endpoint getHost() {
+ return this.host;
+ }
+
+ public void setHost(Endpoint host) {
+ this.host = host;
+ }
+
+ public void unsetHost() {
+ this.host = null;
+ }
+
+ /** Returns true if field host is set (has been assigned a value) and false otherwise */
+ public boolean isSetHost() {
+ return this.host != null;
+ }
+
+ public void setHostIsSet(boolean value) {
+ if (!value) {
+ this.host = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TIMESTAMP:
+ if (value == null) {
+ unsetTimestamp();
+ } else {
+ setTimestamp((Long)value);
+ }
+ break;
+
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((ByteBuffer)value);
+ }
+ break;
+
+ case ANNOTATION_TYPE:
+ if (value == null) {
+ unsetAnnotationType();
+ } else {
+ setAnnotationType((String)value);
+ }
+ break;
+
+ case HOST:
+ if (value == null) {
+ unsetHost();
+ } else {
+ setHost((Endpoint)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TIMESTAMP:
+ return Long.valueOf(getTimestamp());
+
+ case KEY:
+ return getKey();
+
+ case VALUE:
+ return getValue();
+
+ case ANNOTATION_TYPE:
+ return getAnnotationType();
+
+ case HOST:
+ return getHost();
+
+ }
+ 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 TIMESTAMP:
+ return isSetTimestamp();
+ case KEY:
+ return isSetKey();
+ case VALUE:
+ return isSetValue();
+ case ANNOTATION_TYPE:
+ return isSetAnnotationType();
+ case HOST:
+ return isSetHost();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof BinaryAnnotation)
+ return this.equals((BinaryAnnotation)that);
+ return false;
+ }
+
+ public boolean equals(BinaryAnnotation that) {
+ if (that == null)
+ 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_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_annotationType = true && this.isSetAnnotationType();
+ boolean that_present_annotationType = true && that.isSetAnnotationType();
+ if (this_present_annotationType || that_present_annotationType) {
+ if (!(this_present_annotationType && that_present_annotationType))
+ return false;
+ if (!this.annotationType.equals(that.annotationType))
+ return false;
+ }
+
+ boolean this_present_host = true && this.isSetHost();
+ boolean that_present_host = true && that.isSetHost();
+ if (this_present_host || that_present_host) {
+ if (!(this_present_host && that_present_host))
+ return false;
+ if (!this.host.equals(that.host))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(BinaryAnnotation other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ BinaryAnnotation typedOther = (BinaryAnnotation)other;
+
+ 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(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(isSetValue()).compareTo(typedOther.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAnnotationType()).compareTo(typedOther.isSetAnnotationType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAnnotationType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotationType, typedOther.annotationType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHost()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);
+ 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("BinaryAnnotation(");
+ boolean first = true;
+
+ sb.append("timestamp:");
+ sb.append(this.timestamp);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.value, sb);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("annotationType:");
+ if (this.annotationType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.annotationType);
+ }
+ first = false;
+ if (isSetHost()) {
+ if (!first) sb.append(", ");
+ sb.append("host:");
+ if (this.host == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.host);
+ }
+ 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 BinaryAnnotationStandardSchemeFactory implements SchemeFactory {
+ public BinaryAnnotationStandardScheme getScheme() {
+ return new BinaryAnnotationStandardScheme();
+ }
+ }
+
+ private static class BinaryAnnotationStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BinaryAnnotation 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: // 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 2: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readBinary();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ANNOTATION_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.annotationType = iprot.readString();
+ struct.setAnnotationTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // HOST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(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, BinaryAnnotation struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+ oprot.writeI64(struct.timestamp);
+ oprot.writeFieldEnd();
+ if (struct.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ if (struct.value != null) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeBinary(struct.value);
+ oprot.writeFieldEnd();
+ }
+ if (struct.annotationType != null) {
+ oprot.writeFieldBegin(ANNOTATION_TYPE_FIELD_DESC);
+ oprot.writeString(struct.annotationType);
+ oprot.writeFieldEnd();
+ }
+ if (struct.host != null) {
+ if (struct.isSetHost()) {
+ oprot.writeFieldBegin(HOST_FIELD_DESC);
+ struct.host.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BinaryAnnotationTupleSchemeFactory implements SchemeFactory {
+ public BinaryAnnotationTupleScheme getScheme() {
+ return new BinaryAnnotationTupleScheme();
+ }
+ }
+
+ private static class BinaryAnnotationTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimestamp()) {
+ optionals.set(0);
+ }
+ if (struct.isSetKey()) {
+ optionals.set(1);
+ }
+ if (struct.isSetValue()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAnnotationType()) {
+ optionals.set(3);
+ }
+ if (struct.isSetHost()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetTimestamp()) {
+ oprot.writeI64(struct.timestamp);
+ }
+ if (struct.isSetKey()) {
+ oprot.writeString(struct.key);
+ }
+ if (struct.isSetValue()) {
+ oprot.writeBinary(struct.value);
+ }
+ if (struct.isSetAnnotationType()) {
+ oprot.writeString(struct.annotationType);
+ }
+ if (struct.isSetHost()) {
+ struct.host.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.timestamp = iprot.readI64();
+ struct.setTimestampIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.value = iprot.readBinary();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.annotationType = iprot.readString();
+ struct.setAnnotationTypeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Constants.java b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Constants.java
new file mode 100644
index 000000000..8e676b0fa
--- /dev/null
+++ b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Constants.java
@@ -0,0 +1,40 @@
+/**
+ * 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.context.gen;
+
+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 Constants {
+
+ public static final String CLIENT_SEND = "CS";
+
+ public static final String CLIENT_RECV = "CR";
+
+ public static final String SERVER_SEND = "SS";
+
+ public static final String SERVER_RECV = "SR";
+
+}
diff --git a/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Endpoint.java b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Endpoint.java
new file mode 100644
index 000000000..4b4437072
--- /dev/null
+++ b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Endpoint.java
@@ -0,0 +1,576 @@
+/**
+ * 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.context.gen;
+
+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 Endpoint 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("Endpoint");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I16, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EndpointStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EndpointTupleSchemeFactory());
+ }
+
+ private String ip; // required
+ private short port; // required
+ private String name; // 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 {
+ IP((short)1, "ip"),
+ PORT((short)2, "port"),
+ NAME((short)3, "name");
+
+ 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: // IP
+ return IP;
+ case 2: // PORT
+ return PORT;
+ case 3: // NAME
+ return NAME;
+ 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 __PORT_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.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.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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(Endpoint.class, metaDataMap);
+ }
+
+ public Endpoint() {
+ }
+
+ public Endpoint(
+ String ip,
+ short port,
+ String name)
+ {
+ this();
+ this.ip = ip;
+ this.port = port;
+ setPortIsSet(true);
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public Endpoint(Endpoint other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetIp()) {
+ this.ip = other.ip;
+ }
+ this.port = other.port;
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ }
+
+ public Endpoint deepCopy() {
+ return new Endpoint(this);
+ }
+
+ @Override
+ public void clear() {
+ this.ip = null;
+ setPortIsSet(false);
+ this.port = 0;
+ this.name = 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 short getPort() {
+ return this.port;
+ }
+
+ public void setPort(short port) {
+ this.port = port;
+ setPortIsSet(true);
+ }
+
+ public void unsetPort() {
+ __isset_bit_vector.clear(__PORT_ISSET_ID);
+ }
+
+ /** Returns true if field port is set (has been assigned a value) and false otherwise */
+ public boolean isSetPort() {
+ return __isset_bit_vector.get(__PORT_ISSET_ID);
+ }
+
+ public void setPortIsSet(boolean value) {
+ __isset_bit_vector.set(__PORT_ISSET_ID, value);
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IP:
+ if (value == null) {
+ unsetIp();
+ } else {
+ setIp((String)value);
+ }
+ break;
+
+ case PORT:
+ if (value == null) {
+ unsetPort();
+ } else {
+ setPort((Short)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IP:
+ return getIp();
+
+ case PORT:
+ return Short.valueOf(getPort());
+
+ case NAME:
+ return getName();
+
+ }
+ 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 IP:
+ return isSetIp();
+ case PORT:
+ return isSetPort();
+ case NAME:
+ return isSetName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Endpoint)
+ return this.equals((Endpoint)that);
+ return false;
+ }
+
+ public boolean equals(Endpoint that) {
+ if (that == null)
+ 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_port = true;
+ boolean that_present_port = true;
+ if (this_present_port || that_present_port) {
+ if (!(this_present_port && that_present_port))
+ return false;
+ if (this.port != that.port)
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Endpoint other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Endpoint typedOther = (Endpoint)other;
+
+ 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(isSetPort()).compareTo(typedOther.isSetPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ 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("Endpoint(");
+ boolean first = true;
+
+ sb.append("ip:");
+ if (this.ip == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ip);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("port:");
+ sb.append(this.port);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ 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 EndpointStandardSchemeFactory implements SchemeFactory {
+ public EndpointStandardScheme getScheme() {
+ return new EndpointStandardScheme();
+ }
+ }
+
+ private static class EndpointStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Endpoint 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: // 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 2: // PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
+ struct.port = iprot.readI16();
+ struct.setPortIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(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, Endpoint struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.ip != null) {
+ oprot.writeFieldBegin(IP_FIELD_DESC);
+ oprot.writeString(struct.ip);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PORT_FIELD_DESC);
+ oprot.writeI16(struct.port);
+ oprot.writeFieldEnd();
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EndpointTupleSchemeFactory implements SchemeFactory {
+ public EndpointTupleScheme getScheme() {
+ return new EndpointTupleScheme();
+ }
+ }
+
+ private static class EndpointTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIp()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPort()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetIp()) {
+ oprot.writeString(struct.ip);
+ }
+ if (struct.isSetPort()) {
+ oprot.writeI16(struct.port);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.ip = iprot.readString();
+ struct.setIpIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.port = iprot.readI16();
+ struct.setPortIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Span.java b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Span.java
new file mode 100644
index 000000000..fb7875ff2
--- /dev/null
+++ b/generated-sources/thrift/gen-javabean/com/profiler/context/gen/Span.java
@@ -0,0 +1,1086 @@
+/**
+ * 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.context.gen;
+
+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 TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("traceID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanID", org.apache.thrift.protocol.TType.STRING, (short)3);
+ 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.STRING, (short)4);
+ 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)5);
+ private static final org.apache.thrift.protocol.TField BINARY_ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryAnnotations", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField DEBUG_FIELD_DESC = new org.apache.thrift.protocol.TField("debug", org.apache.thrift.protocol.TType.BOOL, (short)7);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SpanStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SpanTupleSchemeFactory());
+ }
+
+ private String traceID; // required
+ private String name; // required
+ private String spanID; // required
+ private String parentSpanId; // optional
+ private List annotations; // required
+ private List binaryAnnotations; // required
+ private boolean debug; // 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 {
+ TRACE_ID((short)1, "traceID"),
+ NAME((short)2, "name"),
+ SPAN_ID((short)3, "spanID"),
+ PARENT_SPAN_ID((short)4, "parentSpanId"),
+ ANNOTATIONS((short)5, "annotations"),
+ BINARY_ANNOTATIONS((short)6, "binaryAnnotations"),
+ DEBUG((short)7, "debug");
+
+ 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: // TRACE_ID
+ return TRACE_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // SPAN_ID
+ return SPAN_ID;
+ case 4: // PARENT_SPAN_ID
+ return PARENT_SPAN_ID;
+ case 5: // ANNOTATIONS
+ return ANNOTATIONS;
+ case 6: // BINARY_ANNOTATIONS
+ return BINARY_ANNOTATIONS;
+ case 7: // DEBUG
+ return DEBUG;
+ 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 __DEBUG_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+ private _Fields optionals[] = {_Fields.PARENT_SPAN_ID,_Fields.DEBUG};
+ 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.TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("traceID", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ 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.STRING)));
+ 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.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.BINARY_ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("binaryAnnotations", 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, BinaryAnnotation.class))));
+ tmpMap.put(_Fields.DEBUG, new org.apache.thrift.meta_data.FieldMetaData("debug", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Span.class, metaDataMap);
+ }
+
+ public Span() {
+ this.debug = false;
+
+ }
+
+ public Span(
+ String traceID,
+ String name,
+ String spanID,
+ List annotations,
+ List binaryAnnotations)
+ {
+ this();
+ this.traceID = traceID;
+ this.name = name;
+ this.spanID = spanID;
+ this.annotations = annotations;
+ this.binaryAnnotations = binaryAnnotations;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public Span(Span other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetTraceID()) {
+ this.traceID = other.traceID;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetSpanID()) {
+ this.spanID = other.spanID;
+ }
+ if (other.isSetParentSpanId()) {
+ this.parentSpanId = other.parentSpanId;
+ }
+ 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;
+ }
+ if (other.isSetBinaryAnnotations()) {
+ List __this__binaryAnnotations = new ArrayList();
+ for (BinaryAnnotation other_element : other.binaryAnnotations) {
+ __this__binaryAnnotations.add(new BinaryAnnotation(other_element));
+ }
+ this.binaryAnnotations = __this__binaryAnnotations;
+ }
+ this.debug = other.debug;
+ }
+
+ public Span deepCopy() {
+ return new Span(this);
+ }
+
+ @Override
+ public void clear() {
+ this.traceID = null;
+ this.name = null;
+ this.spanID = null;
+ this.parentSpanId = null;
+ this.annotations = null;
+ this.binaryAnnotations = null;
+ this.debug = false;
+
+ }
+
+ public String getTraceID() {
+ return this.traceID;
+ }
+
+ public void setTraceID(String traceID) {
+ this.traceID = traceID;
+ }
+
+ public void unsetTraceID() {
+ this.traceID = null;
+ }
+
+ /** Returns true if field traceID is set (has been assigned a value) and false otherwise */
+ public boolean isSetTraceID() {
+ return this.traceID != null;
+ }
+
+ public void setTraceIDIsSet(boolean value) {
+ if (!value) {
+ this.traceID = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getSpanID() {
+ return this.spanID;
+ }
+
+ public void setSpanID(String spanID) {
+ this.spanID = spanID;
+ }
+
+ public void unsetSpanID() {
+ this.spanID = null;
+ }
+
+ /** Returns true if field spanID is set (has been assigned a value) and false otherwise */
+ public boolean isSetSpanID() {
+ return this.spanID != null;
+ }
+
+ public void setSpanIDIsSet(boolean value) {
+ if (!value) {
+ this.spanID = null;
+ }
+ }
+
+ public String getParentSpanId() {
+ return this.parentSpanId;
+ }
+
+ public void setParentSpanId(String parentSpanId) {
+ this.parentSpanId = parentSpanId;
+ }
+
+ public void unsetParentSpanId() {
+ this.parentSpanId = null;
+ }
+
+ /** Returns true if field parentSpanId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentSpanId() {
+ return this.parentSpanId != null;
+ }
+
+ public void setParentSpanIdIsSet(boolean value) {
+ if (!value) {
+ this.parentSpanId = 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 getBinaryAnnotationsSize() {
+ return (this.binaryAnnotations == null) ? 0 : this.binaryAnnotations.size();
+ }
+
+ public java.util.Iterator getBinaryAnnotationsIterator() {
+ return (this.binaryAnnotations == null) ? null : this.binaryAnnotations.iterator();
+ }
+
+ public void addToBinaryAnnotations(BinaryAnnotation elem) {
+ if (this.binaryAnnotations == null) {
+ this.binaryAnnotations = new ArrayList();
+ }
+ this.binaryAnnotations.add(elem);
+ }
+
+ public List getBinaryAnnotations() {
+ return this.binaryAnnotations;
+ }
+
+ public void setBinaryAnnotations(List binaryAnnotations) {
+ this.binaryAnnotations = binaryAnnotations;
+ }
+
+ public void unsetBinaryAnnotations() {
+ this.binaryAnnotations = null;
+ }
+
+ /** Returns true if field binaryAnnotations is set (has been assigned a value) and false otherwise */
+ public boolean isSetBinaryAnnotations() {
+ return this.binaryAnnotations != null;
+ }
+
+ public void setBinaryAnnotationsIsSet(boolean value) {
+ if (!value) {
+ this.binaryAnnotations = null;
+ }
+ }
+
+ public boolean isDebug() {
+ return this.debug;
+ }
+
+ public void setDebug(boolean debug) {
+ this.debug = debug;
+ setDebugIsSet(true);
+ }
+
+ public void unsetDebug() {
+ __isset_bit_vector.clear(__DEBUG_ISSET_ID);
+ }
+
+ /** Returns true if field debug is set (has been assigned a value) and false otherwise */
+ public boolean isSetDebug() {
+ return __isset_bit_vector.get(__DEBUG_ISSET_ID);
+ }
+
+ public void setDebugIsSet(boolean value) {
+ __isset_bit_vector.set(__DEBUG_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TRACE_ID:
+ if (value == null) {
+ unsetTraceID();
+ } else {
+ setTraceID((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case SPAN_ID:
+ if (value == null) {
+ unsetSpanID();
+ } else {
+ setSpanID((String)value);
+ }
+ break;
+
+ case PARENT_SPAN_ID:
+ if (value == null) {
+ unsetParentSpanId();
+ } else {
+ setParentSpanId((String)value);
+ }
+ break;
+
+ case ANNOTATIONS:
+ if (value == null) {
+ unsetAnnotations();
+ } else {
+ setAnnotations((List)value);
+ }
+ break;
+
+ case BINARY_ANNOTATIONS:
+ if (value == null) {
+ unsetBinaryAnnotations();
+ } else {
+ setBinaryAnnotations((List)value);
+ }
+ break;
+
+ case DEBUG:
+ if (value == null) {
+ unsetDebug();
+ } else {
+ setDebug((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TRACE_ID:
+ return getTraceID();
+
+ case NAME:
+ return getName();
+
+ case SPAN_ID:
+ return getSpanID();
+
+ case PARENT_SPAN_ID:
+ return getParentSpanId();
+
+ case ANNOTATIONS:
+ return getAnnotations();
+
+ case BINARY_ANNOTATIONS:
+ return getBinaryAnnotations();
+
+ case DEBUG:
+ return Boolean.valueOf(isDebug());
+
+ }
+ 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 TRACE_ID:
+ return isSetTraceID();
+ case NAME:
+ return isSetName();
+ case SPAN_ID:
+ return isSetSpanID();
+ case PARENT_SPAN_ID:
+ return isSetParentSpanId();
+ case ANNOTATIONS:
+ return isSetAnnotations();
+ case BINARY_ANNOTATIONS:
+ return isSetBinaryAnnotations();
+ case DEBUG:
+ return isSetDebug();
+ }
+ 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_traceID = true && this.isSetTraceID();
+ boolean that_present_traceID = true && that.isSetTraceID();
+ if (this_present_traceID || that_present_traceID) {
+ if (!(this_present_traceID && that_present_traceID))
+ return false;
+ if (!this.traceID.equals(that.traceID))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ 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.equals(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.equals(that.parentSpanId))
+ 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_binaryAnnotations = true && this.isSetBinaryAnnotations();
+ boolean that_present_binaryAnnotations = true && that.isSetBinaryAnnotations();
+ if (this_present_binaryAnnotations || that_present_binaryAnnotations) {
+ if (!(this_present_binaryAnnotations && that_present_binaryAnnotations))
+ return false;
+ if (!this.binaryAnnotations.equals(that.binaryAnnotations))
+ return false;
+ }
+
+ boolean this_present_debug = true && this.isSetDebug();
+ boolean that_present_debug = true && that.isSetDebug();
+ if (this_present_debug || that_present_debug) {
+ if (!(this_present_debug && that_present_debug))
+ return false;
+ if (this.debug != that.debug)
+ 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(isSetTraceID()).compareTo(typedOther.isSetTraceID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTraceID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.traceID, typedOther.traceID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ 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(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(isSetBinaryAnnotations()).compareTo(typedOther.isSetBinaryAnnotations());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBinaryAnnotations()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryAnnotations, typedOther.binaryAnnotations);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDebug()).compareTo(typedOther.isSetDebug());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDebug()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.debug, typedOther.debug);
+ 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("traceID:");
+ if (this.traceID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.traceID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("spanID:");
+ if (this.spanID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.spanID);
+ }
+ first = false;
+ if (isSetParentSpanId()) {
+ if (!first) sb.append(", ");
+ sb.append("parentSpanId:");
+ if (this.parentSpanId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentSpanId);
+ }
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("annotations:");
+ if (this.annotations == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.annotations);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("binaryAnnotations:");
+ if (this.binaryAnnotations == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.binaryAnnotations);
+ }
+ first = false;
+ if (isSetDebug()) {
+ if (!first) sb.append(", ");
+ sb.append("debug:");
+ sb.append(this.debug);
+ 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: // TRACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.traceID = iprot.readString();
+ struct.setTraceIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SPAN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.spanID = iprot.readString();
+ struct.setSpanIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PARENT_SPAN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentSpanId = iprot.readString();
+ struct.setParentSpanIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // 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 6: // BINARY_ANNOTATIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
+ struct.binaryAnnotations = new ArrayList(_list3.size);
+ for (int _i4 = 0; _i4 < _list3.size; ++_i4)
+ {
+ BinaryAnnotation _elem5; // required
+ _elem5 = new BinaryAnnotation();
+ _elem5.read(iprot);
+ struct.binaryAnnotations.add(_elem5);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBinaryAnnotationsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // DEBUG
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.debug = iprot.readBool();
+ struct.setDebugIsSet(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.traceID != null) {
+ oprot.writeFieldBegin(TRACE_ID_FIELD_DESC);
+ oprot.writeString(struct.traceID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.spanID != null) {
+ oprot.writeFieldBegin(SPAN_ID_FIELD_DESC);
+ oprot.writeString(struct.spanID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.parentSpanId != null) {
+ if (struct.isSetParentSpanId()) {
+ oprot.writeFieldBegin(PARENT_SPAN_ID_FIELD_DESC);
+ oprot.writeString(struct.parentSpanId);
+ 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.binaryAnnotations != null) {
+ oprot.writeFieldBegin(BINARY_ANNOTATIONS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.binaryAnnotations.size()));
+ for (BinaryAnnotation _iter7 : struct.binaryAnnotations)
+ {
+ _iter7.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetDebug()) {
+ oprot.writeFieldBegin(DEBUG_FIELD_DESC);
+ oprot.writeBool(struct.debug);
+ 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.isSetTraceID()) {
+ optionals.set(0);
+ }
+ if (struct.isSetName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSpanID()) {
+ optionals.set(2);
+ }
+ if (struct.isSetParentSpanId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetAnnotations()) {
+ optionals.set(4);
+ }
+ if (struct.isSetBinaryAnnotations()) {
+ optionals.set(5);
+ }
+ if (struct.isSetDebug()) {
+ optionals.set(6);
+ }
+ oprot.writeBitSet(optionals, 7);
+ if (struct.isSetTraceID()) {
+ oprot.writeString(struct.traceID);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetSpanID()) {
+ oprot.writeString(struct.spanID);
+ }
+ if (struct.isSetParentSpanId()) {
+ oprot.writeString(struct.parentSpanId);
+ }
+ if (struct.isSetAnnotations()) {
+ {
+ oprot.writeI32(struct.annotations.size());
+ for (Annotation _iter8 : struct.annotations)
+ {
+ _iter8.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetBinaryAnnotations()) {
+ {
+ oprot.writeI32(struct.binaryAnnotations.size());
+ for (BinaryAnnotation _iter9 : struct.binaryAnnotations)
+ {
+ _iter9.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetDebug()) {
+ oprot.writeBool(struct.debug);
+ }
+ }
+
+ @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(7);
+ if (incoming.get(0)) {
+ struct.traceID = iprot.readString();
+ struct.setTraceIDIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.spanID = iprot.readString();
+ struct.setSpanIDIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.parentSpanId = iprot.readString();
+ struct.setParentSpanIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ 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(5)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.binaryAnnotations = new ArrayList(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ BinaryAnnotation _elem15; // required
+ _elem15 = new BinaryAnnotation();
+ _elem15.read(iprot);
+ struct.binaryAnnotations.add(_elem15);
+ }
+ }
+ struct.setBinaryAnnotationsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.debug = iprot.readBool();
+ struct.setDebugIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/pom.xml b/pom.xml
index 9abbced8f..3a7c6b744 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,6 @@
jar
-
${thrift.executable.property}
@@ -185,7 +184,6 @@
org.codehaus.mojo
properties-maven-plugin
-
initialize
@@ -218,7 +216,7 @@
- -->
+
@@ -242,6 +240,13 @@
+
+
+
+
+
+
+
diff --git a/src/main/java/com/profiler/context/Annotation.java b/src/main/java/com/profiler/context/Annotation.java
deleted file mode 100644
index 6f1d8f6a0..000000000
--- a/src/main/java/com/profiler/context/Annotation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.profiler.context;
-
-public class Annotation {
-
- protected final long timestamp;
- protected final String value;
- protected final EndPoint endPoint;
-
- protected long processStart;
- protected long processEnd;
-
- /**
- * @param timestamp
- * when was this annotation created? microseconds from epoch
- * @param value
- * description of what happened at the timestamp could for
- * example be "cache miss for key: x"
- * @param endPoint
- * host this annotation was created on
- */
- public Annotation(long timestamp, String value, EndPoint endPoint) {
- this.timestamp = timestamp;
- this.value = value;
- this.endPoint = endPoint;
- }
-
- public long getTimestamp() {
- return timestamp;
- }
-
- public void processStart() {
- processStart = System.nanoTime();
- }
-
- public void processEnd() {
- processEnd = System.nanoTime();
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder();
-
- sb.append("Annotation={");
- sb.append("Timestamp=").append(timestamp);
- sb.append(", Value=").append(value);
- sb.append(", EndPoint=").append(endPoint);
- sb.append(", ProcessStart=").append(processStart);
- sb.append(", ProcessEnd=").append(processEnd);
- sb.append("}");
-
- return sb.toString();
- }
-}
diff --git a/src/main/java/com/profiler/context/BinaryAnnotation.java b/src/main/java/com/profiler/context/BinaryAnnotation.java
deleted file mode 100644
index 20ee53397..000000000
--- a/src/main/java/com/profiler/context/BinaryAnnotation.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.profiler.context;
-
-public class BinaryAnnotation extends Annotation {
-
- protected final byte[] binaryValue;
-
- /**
- * @param timestamp
- * when was this annotation created? microseconds from epoch
- * @param value
- * detailed description of what happened at the timestamp
- * @param host
- * host this annotation was created on
- */
- public BinaryAnnotation(long timestamp, byte[] value, EndPoint host) {
- super(timestamp, null, host);
- this.binaryValue = value;
- }
-}
diff --git a/src/main/java/com/profiler/context/EndPoint.java b/src/main/java/com/profiler/context/EndPoint.java
deleted file mode 100644
index 920fce335..000000000
--- a/src/main/java/com/profiler/context/EndPoint.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.profiler.context;
-
-public class EndPoint {
-
- public static final EndPoint NONE = null;
-
- private final String protocol;
- private final String ip;
- private final int port;
- private final String name;
-
- public EndPoint(String protocol, String ip, int port, String name) {
- this.protocol = protocol;
- this.ip = ip;
- this.port = port;
- this.name = name;
- }
-
- public String toString() {
- return "EndPoint{Protocol=" + protocol + ", IP=" + ip + ", Port=" + port + ", Name=" + name + "]";
- }
-}
diff --git a/src/main/java/com/profiler/context/RequestContext.java b/src/main/java/com/profiler/context/RequestContext.java
index 96b80d32d..02ae9343d 100644
--- a/src/main/java/com/profiler/context/RequestContext.java
+++ b/src/main/java/com/profiler/context/RequestContext.java
@@ -4,21 +4,21 @@ import com.profiler.util.NamedThreadLocal;
public class RequestContext {
- private static final ThreadLocal span = new NamedThreadLocal("Span");
+ private static final ThreadLocal trace = new NamedThreadLocal("Trace");
- public static Span getSpan(String traceID, String parentSpanID, String name, boolean debug) {
- Span ctx = span.get();
- if (ctx == null) {
- ctx = new Span(traceID, parentSpanID, name, debug);
- span.set(ctx);
+ public static Trace getTrace(String traceID, String parentSpanID, String name, boolean debug) {
+ Trace t = trace.get();
+ if (t == null) {
+ t = new Trace(traceID, parentSpanID, name, debug);
+ trace.set(t);
}
- return ctx;
+ return t;
}
/**
* Calling from Span.flush()
*/
public static void removeCurrentContext() {
- span.remove();
+ trace.remove();
}
}
diff --git a/src/main/java/com/profiler/context/Span.java b/src/main/java/com/profiler/context/Span.java
deleted file mode 100644
index ff8123b28..000000000
--- a/src/main/java/com/profiler/context/Span.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.profiler.context;
-
-import java.util.Comparator;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-/**
- * A span represents one RPC request. A trace is made up of many spans.
- *
- * @author netspider
- *
- */
-public class Span {
-
- private static final int NO_PARENT_SPAN_ID = -1;
-
- private final String traceID;
- private final String spanID;
- private final String parentSpanID;
- private final String name;
- private final long createTime;
- private final boolean debug;
-
- private final SortedSet annotations = new TreeSet(new Comparator() {
- @Override
- public int compare(Annotation a1, Annotation a2) {
- return (int) (a1.getTimestamp() - a2.getTimestamp());
- }
- });
-
- /**
- *
- * @param traceID
- * @param parentSpanID
- * @param name
- * @param debug
- * if this is set we will make sure this span is stored, no
- * matter what the samplers want
- */
- public Span(String traceID, String parentSpanID, String name, boolean debug) {
- this.traceID = (traceID == null) ? TraceID.newTraceID() : traceID;
- this.spanID = SpanID.newSpanID();
- this.parentSpanID = parentSpanID;
- this.name = name;
- this.createTime = System.nanoTime();
- this.debug = debug;
- }
-
- public boolean addAnnotation(Annotation annotation) {
- return annotations.add(annotation);
- }
-
- private void flush() {
- System.out.println("TODO: flush collected data.");
- RequestContext.removeCurrentContext();
- }
-
- public String getTraceID() {
- return traceID;
- }
-
- public boolean isDebug() {
- return debug;
- }
-
- public int getAnnotationSize() {
- return annotations.size();
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder();
-
- sb.append("Span={");
- sb.append("TraceID=").append(traceID);
- sb.append(", SpanID=").append(spanID);
- sb.append(", ParentSpanID=").append(parentSpanID);
- sb.append(", CreateTime=").append(createTime);
- sb.append(", Name=").append(name);
- sb.append(", Annotations=").append(annotations);
- sb.append("}");
-
- return sb.toString();
- }
-}
diff --git a/src/main/java/com/profiler/context/Trace.java b/src/main/java/com/profiler/context/Trace.java
new file mode 100644
index 000000000..362b7bce2
--- /dev/null
+++ b/src/main/java/com/profiler/context/Trace.java
@@ -0,0 +1,38 @@
+package com.profiler.context;
+
+import com.profiler.context.gen.Annotation;
+import com.profiler.context.gen.BinaryAnnotation;
+import com.profiler.context.gen.Span;
+
+/**
+ *
+ * @author netspider
+ *
+ */
+public class Trace {
+
+ private static final int NO_PARENT_SPAN_ID = -1;
+
+ private final String traceID;
+
+ private final Span span;
+
+ Trace(String traceID, String parentSpanID, String name, boolean debug) {
+ this.traceID = (traceID == null) ? TraceID.newTraceID() : traceID;
+
+ this.span = new Span();
+ this.span.setTraceID(this.traceID);
+ this.span.setSpanID(SpanID.newSpanID());
+ this.span.setParentSpanId(parentSpanID);
+ this.span.setName(name);
+ this.span.setDebug(debug);
+ }
+
+ public void record(Annotation annotation) {
+ span.addToAnnotations(annotation);
+ }
+
+ public void recordBinary(BinaryAnnotation annotation) {
+ span.addToBinaryAnnotations(annotation);
+ }
+}
diff --git a/src/main/java/com/profiler/context/gen/Annotation.java b/src/main/java/com/profiler/context/gen/Annotation.java
new file mode 100644
index 000000000..9430fa830
--- /dev/null
+++ b/src/main/java/com/profiler/context/gen/Annotation.java
@@ -0,0 +1,675 @@
+/**
+ * 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.context.gen;
+
+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 TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField DURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("duration", org.apache.thrift.protocol.TType.I32, (short)4);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AnnotationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AnnotationTupleSchemeFactory());
+ }
+
+ private long timestamp; // required
+ private String value; // required
+ private Endpoint host; // optional
+ private int duration; // 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 {
+ TIMESTAMP((short)1, "timestamp"),
+ VALUE((short)2, "value"),
+ HOST((short)3, "host"),
+ DURATION((short)4, "duration");
+
+ 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: // TIMESTAMP
+ return TIMESTAMP;
+ case 2: // VALUE
+ return VALUE;
+ case 3: // HOST
+ return HOST;
+ case 4: // DURATION
+ return DURATION;
+ 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 __TIMESTAMP_ISSET_ID = 0;
+ private static final int __DURATION_ISSET_ID = 1;
+ private BitSet __isset_bit_vector = new BitSet(2);
+ private _Fields optionals[] = {_Fields.HOST,_Fields.DURATION};
+ 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.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.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Endpoint.class)));
+ tmpMap.put(_Fields.DURATION, new org.apache.thrift.meta_data.FieldMetaData("duration", 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(Annotation.class, metaDataMap);
+ }
+
+ public Annotation() {
+ }
+
+ public Annotation(
+ long timestamp,
+ String value)
+ {
+ this();
+ this.timestamp = timestamp;
+ setTimestampIsSet(true);
+ this.value = value;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public Annotation(Annotation other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.timestamp = other.timestamp;
+ if (other.isSetValue()) {
+ this.value = other.value;
+ }
+ if (other.isSetHost()) {
+ this.host = new Endpoint(other.host);
+ }
+ this.duration = other.duration;
+ }
+
+ public Annotation deepCopy() {
+ return new Annotation(this);
+ }
+
+ @Override
+ public void clear() {
+ setTimestampIsSet(false);
+ this.timestamp = 0;
+ this.value = null;
+ this.host = null;
+ setDurationIsSet(false);
+ this.duration = 0;
+ }
+
+ 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 String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public Endpoint getHost() {
+ return this.host;
+ }
+
+ public void setHost(Endpoint host) {
+ this.host = host;
+ }
+
+ public void unsetHost() {
+ this.host = null;
+ }
+
+ /** Returns true if field host is set (has been assigned a value) and false otherwise */
+ public boolean isSetHost() {
+ return this.host != null;
+ }
+
+ public void setHostIsSet(boolean value) {
+ if (!value) {
+ this.host = null;
+ }
+ }
+
+ public int getDuration() {
+ return this.duration;
+ }
+
+ public void setDuration(int duration) {
+ this.duration = duration;
+ setDurationIsSet(true);
+ }
+
+ public void unsetDuration() {
+ __isset_bit_vector.clear(__DURATION_ISSET_ID);
+ }
+
+ /** Returns true if field duration is set (has been assigned a value) and false otherwise */
+ public boolean isSetDuration() {
+ return __isset_bit_vector.get(__DURATION_ISSET_ID);
+ }
+
+ public void setDurationIsSet(boolean value) {
+ __isset_bit_vector.set(__DURATION_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TIMESTAMP:
+ if (value == null) {
+ unsetTimestamp();
+ } else {
+ setTimestamp((Long)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((String)value);
+ }
+ break;
+
+ case HOST:
+ if (value == null) {
+ unsetHost();
+ } else {
+ setHost((Endpoint)value);
+ }
+ break;
+
+ case DURATION:
+ if (value == null) {
+ unsetDuration();
+ } else {
+ setDuration((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TIMESTAMP:
+ return Long.valueOf(getTimestamp());
+
+ case VALUE:
+ return getValue();
+
+ case HOST:
+ return getHost();
+
+ case DURATION:
+ return Integer.valueOf(getDuration());
+
+ }
+ 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 TIMESTAMP:
+ return isSetTimestamp();
+ case VALUE:
+ return isSetValue();
+ case HOST:
+ return isSetHost();
+ case DURATION:
+ return isSetDuration();
+ }
+ 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_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_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_host = true && this.isSetHost();
+ boolean that_present_host = true && that.isSetHost();
+ if (this_present_host || that_present_host) {
+ if (!(this_present_host && that_present_host))
+ return false;
+ if (!this.host.equals(that.host))
+ return false;
+ }
+
+ boolean this_present_duration = true && this.isSetDuration();
+ boolean that_present_duration = true && that.isSetDuration();
+ if (this_present_duration || that_present_duration) {
+ if (!(this_present_duration && that_present_duration))
+ return false;
+ if (this.duration != that.duration)
+ 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(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(isSetValue()).compareTo(typedOther.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHost()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDuration()).compareTo(typedOther.isSetDuration());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDuration()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.duration, typedOther.duration);
+ 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("timestamp:");
+ sb.append(this.timestamp);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.value);
+ }
+ first = false;
+ if (isSetHost()) {
+ if (!first) sb.append(", ");
+ sb.append("host:");
+ if (this.host == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.host);
+ }
+ first = false;
+ }
+ if (isSetDuration()) {
+ if (!first) sb.append(", ");
+ sb.append("duration:");
+ sb.append(this.duration);
+ 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: // 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 2: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // HOST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DURATION
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.duration = iprot.readI32();
+ struct.setDurationIsSet(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(TIMESTAMP_FIELD_DESC);
+ oprot.writeI64(struct.timestamp);
+ oprot.writeFieldEnd();
+ if (struct.value != null) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeString(struct.value);
+ oprot.writeFieldEnd();
+ }
+ if (struct.host != null) {
+ if (struct.isSetHost()) {
+ oprot.writeFieldBegin(HOST_FIELD_DESC);
+ struct.host.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetDuration()) {
+ oprot.writeFieldBegin(DURATION_FIELD_DESC);
+ oprot.writeI32(struct.duration);
+ 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.isSetTimestamp()) {
+ optionals.set(0);
+ }
+ if (struct.isSetValue()) {
+ optionals.set(1);
+ }
+ if (struct.isSetHost()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDuration()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetTimestamp()) {
+ oprot.writeI64(struct.timestamp);
+ }
+ if (struct.isSetValue()) {
+ oprot.writeString(struct.value);
+ }
+ if (struct.isSetHost()) {
+ struct.host.write(oprot);
+ }
+ if (struct.isSetDuration()) {
+ oprot.writeI32(struct.duration);
+ }
+ }
+
+ @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(4);
+ if (incoming.get(0)) {
+ struct.timestamp = iprot.readI64();
+ struct.setTimestampIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.duration = iprot.readI32();
+ struct.setDurationIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/com/profiler/context/gen/BinaryAnnotation.java b/src/main/java/com/profiler/context/gen/BinaryAnnotation.java
new file mode 100644
index 000000000..1d77854ba
--- /dev/null
+++ b/src/main/java/com/profiler/context/gen/BinaryAnnotation.java
@@ -0,0 +1,789 @@
+/**
+ * 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.context.gen;
+
+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 BinaryAnnotation 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("BinaryAnnotation");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField ANNOTATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("annotationType", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BinaryAnnotationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BinaryAnnotationTupleSchemeFactory());
+ }
+
+ private long timestamp; // required
+ private String key; // required
+ private ByteBuffer value; // required
+ private String annotationType; // required
+ private Endpoint host; // 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 {
+ TIMESTAMP((short)1, "timestamp"),
+ KEY((short)2, "key"),
+ VALUE((short)3, "value"),
+ ANNOTATION_TYPE((short)4, "annotationType"),
+ HOST((short)5, "host");
+
+ 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: // TIMESTAMP
+ return TIMESTAMP;
+ case 2: // KEY
+ return KEY;
+ case 3: // VALUE
+ return VALUE;
+ case 4: // ANNOTATION_TYPE
+ return ANNOTATION_TYPE;
+ case 5: // HOST
+ return 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 __TIMESTAMP_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+ private _Fields optionals[] = {_Fields.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.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.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.STRING)));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ tmpMap.put(_Fields.ANNOTATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("annotationType", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Endpoint.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BinaryAnnotation.class, metaDataMap);
+ }
+
+ public BinaryAnnotation() {
+ }
+
+ public BinaryAnnotation(
+ long timestamp,
+ String key,
+ ByteBuffer value,
+ String annotationType)
+ {
+ this();
+ this.timestamp = timestamp;
+ setTimestampIsSet(true);
+ this.key = key;
+ this.value = value;
+ this.annotationType = annotationType;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public BinaryAnnotation(BinaryAnnotation other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.timestamp = other.timestamp;
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ if (other.isSetValue()) {
+ this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
+;
+ }
+ if (other.isSetAnnotationType()) {
+ this.annotationType = other.annotationType;
+ }
+ if (other.isSetHost()) {
+ this.host = new Endpoint(other.host);
+ }
+ }
+
+ public BinaryAnnotation deepCopy() {
+ return new BinaryAnnotation(this);
+ }
+
+ @Override
+ public void clear() {
+ setTimestampIsSet(false);
+ this.timestamp = 0;
+ this.key = null;
+ this.value = null;
+ this.annotationType = null;
+ this.host = null;
+ }
+
+ 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 String getKey() {
+ return this.key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ /** Returns true if field key is set (has been assigned a value) and false otherwise */
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public byte[] getValue() {
+ setValue(org.apache.thrift.TBaseHelper.rightSize(value));
+ return value == null ? null : value.array();
+ }
+
+ public ByteBuffer bufferForValue() {
+ return value;
+ }
+
+ public void setValue(byte[] value) {
+ setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
+ }
+
+ public void setValue(ByteBuffer value) {
+ this.value = value;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public String getAnnotationType() {
+ return this.annotationType;
+ }
+
+ public void setAnnotationType(String annotationType) {
+ this.annotationType = annotationType;
+ }
+
+ public void unsetAnnotationType() {
+ this.annotationType = null;
+ }
+
+ /** Returns true if field annotationType is set (has been assigned a value) and false otherwise */
+ public boolean isSetAnnotationType() {
+ return this.annotationType != null;
+ }
+
+ public void setAnnotationTypeIsSet(boolean value) {
+ if (!value) {
+ this.annotationType = null;
+ }
+ }
+
+ public Endpoint getHost() {
+ return this.host;
+ }
+
+ public void setHost(Endpoint host) {
+ this.host = host;
+ }
+
+ public void unsetHost() {
+ this.host = null;
+ }
+
+ /** Returns true if field host is set (has been assigned a value) and false otherwise */
+ public boolean isSetHost() {
+ return this.host != null;
+ }
+
+ public void setHostIsSet(boolean value) {
+ if (!value) {
+ this.host = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TIMESTAMP:
+ if (value == null) {
+ unsetTimestamp();
+ } else {
+ setTimestamp((Long)value);
+ }
+ break;
+
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((ByteBuffer)value);
+ }
+ break;
+
+ case ANNOTATION_TYPE:
+ if (value == null) {
+ unsetAnnotationType();
+ } else {
+ setAnnotationType((String)value);
+ }
+ break;
+
+ case HOST:
+ if (value == null) {
+ unsetHost();
+ } else {
+ setHost((Endpoint)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TIMESTAMP:
+ return Long.valueOf(getTimestamp());
+
+ case KEY:
+ return getKey();
+
+ case VALUE:
+ return getValue();
+
+ case ANNOTATION_TYPE:
+ return getAnnotationType();
+
+ case HOST:
+ return getHost();
+
+ }
+ 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 TIMESTAMP:
+ return isSetTimestamp();
+ case KEY:
+ return isSetKey();
+ case VALUE:
+ return isSetValue();
+ case ANNOTATION_TYPE:
+ return isSetAnnotationType();
+ case HOST:
+ return isSetHost();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof BinaryAnnotation)
+ return this.equals((BinaryAnnotation)that);
+ return false;
+ }
+
+ public boolean equals(BinaryAnnotation that) {
+ if (that == null)
+ 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_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_annotationType = true && this.isSetAnnotationType();
+ boolean that_present_annotationType = true && that.isSetAnnotationType();
+ if (this_present_annotationType || that_present_annotationType) {
+ if (!(this_present_annotationType && that_present_annotationType))
+ return false;
+ if (!this.annotationType.equals(that.annotationType))
+ return false;
+ }
+
+ boolean this_present_host = true && this.isSetHost();
+ boolean that_present_host = true && that.isSetHost();
+ if (this_present_host || that_present_host) {
+ if (!(this_present_host && that_present_host))
+ return false;
+ if (!this.host.equals(that.host))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(BinaryAnnotation other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ BinaryAnnotation typedOther = (BinaryAnnotation)other;
+
+ 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(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(isSetValue()).compareTo(typedOther.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAnnotationType()).compareTo(typedOther.isSetAnnotationType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAnnotationType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotationType, typedOther.annotationType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHost()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);
+ 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("BinaryAnnotation(");
+ boolean first = true;
+
+ sb.append("timestamp:");
+ sb.append(this.timestamp);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.value, sb);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("annotationType:");
+ if (this.annotationType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.annotationType);
+ }
+ first = false;
+ if (isSetHost()) {
+ if (!first) sb.append(", ");
+ sb.append("host:");
+ if (this.host == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.host);
+ }
+ 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 BinaryAnnotationStandardSchemeFactory implements SchemeFactory {
+ public BinaryAnnotationStandardScheme getScheme() {
+ return new BinaryAnnotationStandardScheme();
+ }
+ }
+
+ private static class BinaryAnnotationStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BinaryAnnotation 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: // 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 2: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readBinary();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ANNOTATION_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.annotationType = iprot.readString();
+ struct.setAnnotationTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // HOST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(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, BinaryAnnotation struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+ oprot.writeI64(struct.timestamp);
+ oprot.writeFieldEnd();
+ if (struct.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ if (struct.value != null) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeBinary(struct.value);
+ oprot.writeFieldEnd();
+ }
+ if (struct.annotationType != null) {
+ oprot.writeFieldBegin(ANNOTATION_TYPE_FIELD_DESC);
+ oprot.writeString(struct.annotationType);
+ oprot.writeFieldEnd();
+ }
+ if (struct.host != null) {
+ if (struct.isSetHost()) {
+ oprot.writeFieldBegin(HOST_FIELD_DESC);
+ struct.host.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BinaryAnnotationTupleSchemeFactory implements SchemeFactory {
+ public BinaryAnnotationTupleScheme getScheme() {
+ return new BinaryAnnotationTupleScheme();
+ }
+ }
+
+ private static class BinaryAnnotationTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimestamp()) {
+ optionals.set(0);
+ }
+ if (struct.isSetKey()) {
+ optionals.set(1);
+ }
+ if (struct.isSetValue()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAnnotationType()) {
+ optionals.set(3);
+ }
+ if (struct.isSetHost()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetTimestamp()) {
+ oprot.writeI64(struct.timestamp);
+ }
+ if (struct.isSetKey()) {
+ oprot.writeString(struct.key);
+ }
+ if (struct.isSetValue()) {
+ oprot.writeBinary(struct.value);
+ }
+ if (struct.isSetAnnotationType()) {
+ oprot.writeString(struct.annotationType);
+ }
+ if (struct.isSetHost()) {
+ struct.host.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.timestamp = iprot.readI64();
+ struct.setTimestampIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.value = iprot.readBinary();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.annotationType = iprot.readString();
+ struct.setAnnotationTypeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.host = new Endpoint();
+ struct.host.read(iprot);
+ struct.setHostIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/com/profiler/context/gen/Constants.java b/src/main/java/com/profiler/context/gen/Constants.java
new file mode 100644
index 000000000..8e676b0fa
--- /dev/null
+++ b/src/main/java/com/profiler/context/gen/Constants.java
@@ -0,0 +1,40 @@
+/**
+ * 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.context.gen;
+
+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 Constants {
+
+ public static final String CLIENT_SEND = "CS";
+
+ public static final String CLIENT_RECV = "CR";
+
+ public static final String SERVER_SEND = "SS";
+
+ public static final String SERVER_RECV = "SR";
+
+}
diff --git a/src/main/java/com/profiler/context/gen/Endpoint.java b/src/main/java/com/profiler/context/gen/Endpoint.java
new file mode 100644
index 000000000..4b4437072
--- /dev/null
+++ b/src/main/java/com/profiler/context/gen/Endpoint.java
@@ -0,0 +1,576 @@
+/**
+ * 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.context.gen;
+
+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 Endpoint 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("Endpoint");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I16, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EndpointStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EndpointTupleSchemeFactory());
+ }
+
+ private String ip; // required
+ private short port; // required
+ private String name; // 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 {
+ IP((short)1, "ip"),
+ PORT((short)2, "port"),
+ NAME((short)3, "name");
+
+ 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: // IP
+ return IP;
+ case 2: // PORT
+ return PORT;
+ case 3: // NAME
+ return NAME;
+ 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 __PORT_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.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.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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(Endpoint.class, metaDataMap);
+ }
+
+ public Endpoint() {
+ }
+
+ public Endpoint(
+ String ip,
+ short port,
+ String name)
+ {
+ this();
+ this.ip = ip;
+ this.port = port;
+ setPortIsSet(true);
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public Endpoint(Endpoint other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetIp()) {
+ this.ip = other.ip;
+ }
+ this.port = other.port;
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ }
+
+ public Endpoint deepCopy() {
+ return new Endpoint(this);
+ }
+
+ @Override
+ public void clear() {
+ this.ip = null;
+ setPortIsSet(false);
+ this.port = 0;
+ this.name = 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 short getPort() {
+ return this.port;
+ }
+
+ public void setPort(short port) {
+ this.port = port;
+ setPortIsSet(true);
+ }
+
+ public void unsetPort() {
+ __isset_bit_vector.clear(__PORT_ISSET_ID);
+ }
+
+ /** Returns true if field port is set (has been assigned a value) and false otherwise */
+ public boolean isSetPort() {
+ return __isset_bit_vector.get(__PORT_ISSET_ID);
+ }
+
+ public void setPortIsSet(boolean value) {
+ __isset_bit_vector.set(__PORT_ISSET_ID, value);
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IP:
+ if (value == null) {
+ unsetIp();
+ } else {
+ setIp((String)value);
+ }
+ break;
+
+ case PORT:
+ if (value == null) {
+ unsetPort();
+ } else {
+ setPort((Short)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IP:
+ return getIp();
+
+ case PORT:
+ return Short.valueOf(getPort());
+
+ case NAME:
+ return getName();
+
+ }
+ 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 IP:
+ return isSetIp();
+ case PORT:
+ return isSetPort();
+ case NAME:
+ return isSetName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Endpoint)
+ return this.equals((Endpoint)that);
+ return false;
+ }
+
+ public boolean equals(Endpoint that) {
+ if (that == null)
+ 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_port = true;
+ boolean that_present_port = true;
+ if (this_present_port || that_present_port) {
+ if (!(this_present_port && that_present_port))
+ return false;
+ if (this.port != that.port)
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Endpoint other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Endpoint typedOther = (Endpoint)other;
+
+ 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(isSetPort()).compareTo(typedOther.isSetPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ 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("Endpoint(");
+ boolean first = true;
+
+ sb.append("ip:");
+ if (this.ip == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ip);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("port:");
+ sb.append(this.port);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ 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 EndpointStandardSchemeFactory implements SchemeFactory {
+ public EndpointStandardScheme getScheme() {
+ return new EndpointStandardScheme();
+ }
+ }
+
+ private static class EndpointStandardScheme extends StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Endpoint 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: // 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 2: // PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
+ struct.port = iprot.readI16();
+ struct.setPortIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(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, Endpoint struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.ip != null) {
+ oprot.writeFieldBegin(IP_FIELD_DESC);
+ oprot.writeString(struct.ip);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PORT_FIELD_DESC);
+ oprot.writeI16(struct.port);
+ oprot.writeFieldEnd();
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EndpointTupleSchemeFactory implements SchemeFactory {
+ public EndpointTupleScheme getScheme() {
+ return new EndpointTupleScheme();
+ }
+ }
+
+ private static class EndpointTupleScheme extends TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIp()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPort()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetIp()) {
+ oprot.writeString(struct.ip);
+ }
+ if (struct.isSetPort()) {
+ oprot.writeI16(struct.port);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.ip = iprot.readString();
+ struct.setIpIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.port = iprot.readI16();
+ struct.setPortIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/com/profiler/context/gen/Span.java b/src/main/java/com/profiler/context/gen/Span.java
new file mode 100644
index 000000000..fb7875ff2
--- /dev/null
+++ b/src/main/java/com/profiler/context/gen/Span.java
@@ -0,0 +1,1086 @@
+/**
+ * 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.context.gen;
+
+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 TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("traceID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanID", org.apache.thrift.protocol.TType.STRING, (short)3);
+ 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.STRING, (short)4);
+ 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)5);
+ private static final org.apache.thrift.protocol.TField BINARY_ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryAnnotations", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField DEBUG_FIELD_DESC = new org.apache.thrift.protocol.TField("debug", org.apache.thrift.protocol.TType.BOOL, (short)7);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SpanStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SpanTupleSchemeFactory());
+ }
+
+ private String traceID; // required
+ private String name; // required
+ private String spanID; // required
+ private String parentSpanId; // optional
+ private List annotations; // required
+ private List binaryAnnotations; // required
+ private boolean debug; // 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 {
+ TRACE_ID((short)1, "traceID"),
+ NAME((short)2, "name"),
+ SPAN_ID((short)3, "spanID"),
+ PARENT_SPAN_ID((short)4, "parentSpanId"),
+ ANNOTATIONS((short)5, "annotations"),
+ BINARY_ANNOTATIONS((short)6, "binaryAnnotations"),
+ DEBUG((short)7, "debug");
+
+ 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: // TRACE_ID
+ return TRACE_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // SPAN_ID
+ return SPAN_ID;
+ case 4: // PARENT_SPAN_ID
+ return PARENT_SPAN_ID;
+ case 5: // ANNOTATIONS
+ return ANNOTATIONS;
+ case 6: // BINARY_ANNOTATIONS
+ return BINARY_ANNOTATIONS;
+ case 7: // DEBUG
+ return DEBUG;
+ 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 __DEBUG_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+ private _Fields optionals[] = {_Fields.PARENT_SPAN_ID,_Fields.DEBUG};
+ 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.TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("traceID", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ 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.STRING)));
+ 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.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.BINARY_ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("binaryAnnotations", 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, BinaryAnnotation.class))));
+ tmpMap.put(_Fields.DEBUG, new org.apache.thrift.meta_data.FieldMetaData("debug", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Span.class, metaDataMap);
+ }
+
+ public Span() {
+ this.debug = false;
+
+ }
+
+ public Span(
+ String traceID,
+ String name,
+ String spanID,
+ List annotations,
+ List binaryAnnotations)
+ {
+ this();
+ this.traceID = traceID;
+ this.name = name;
+ this.spanID = spanID;
+ this.annotations = annotations;
+ this.binaryAnnotations = binaryAnnotations;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public Span(Span other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetTraceID()) {
+ this.traceID = other.traceID;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetSpanID()) {
+ this.spanID = other.spanID;
+ }
+ if (other.isSetParentSpanId()) {
+ this.parentSpanId = other.parentSpanId;
+ }
+ 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;
+ }
+ if (other.isSetBinaryAnnotations()) {
+ List __this__binaryAnnotations = new ArrayList();
+ for (BinaryAnnotation other_element : other.binaryAnnotations) {
+ __this__binaryAnnotations.add(new BinaryAnnotation(other_element));
+ }
+ this.binaryAnnotations = __this__binaryAnnotations;
+ }
+ this.debug = other.debug;
+ }
+
+ public Span deepCopy() {
+ return new Span(this);
+ }
+
+ @Override
+ public void clear() {
+ this.traceID = null;
+ this.name = null;
+ this.spanID = null;
+ this.parentSpanId = null;
+ this.annotations = null;
+ this.binaryAnnotations = null;
+ this.debug = false;
+
+ }
+
+ public String getTraceID() {
+ return this.traceID;
+ }
+
+ public void setTraceID(String traceID) {
+ this.traceID = traceID;
+ }
+
+ public void unsetTraceID() {
+ this.traceID = null;
+ }
+
+ /** Returns true if field traceID is set (has been assigned a value) and false otherwise */
+ public boolean isSetTraceID() {
+ return this.traceID != null;
+ }
+
+ public void setTraceIDIsSet(boolean value) {
+ if (!value) {
+ this.traceID = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getSpanID() {
+ return this.spanID;
+ }
+
+ public void setSpanID(String spanID) {
+ this.spanID = spanID;
+ }
+
+ public void unsetSpanID() {
+ this.spanID = null;
+ }
+
+ /** Returns true if field spanID is set (has been assigned a value) and false otherwise */
+ public boolean isSetSpanID() {
+ return this.spanID != null;
+ }
+
+ public void setSpanIDIsSet(boolean value) {
+ if (!value) {
+ this.spanID = null;
+ }
+ }
+
+ public String getParentSpanId() {
+ return this.parentSpanId;
+ }
+
+ public void setParentSpanId(String parentSpanId) {
+ this.parentSpanId = parentSpanId;
+ }
+
+ public void unsetParentSpanId() {
+ this.parentSpanId = null;
+ }
+
+ /** Returns true if field parentSpanId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentSpanId() {
+ return this.parentSpanId != null;
+ }
+
+ public void setParentSpanIdIsSet(boolean value) {
+ if (!value) {
+ this.parentSpanId = 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 getBinaryAnnotationsSize() {
+ return (this.binaryAnnotations == null) ? 0 : this.binaryAnnotations.size();
+ }
+
+ public java.util.Iterator getBinaryAnnotationsIterator() {
+ return (this.binaryAnnotations == null) ? null : this.binaryAnnotations.iterator();
+ }
+
+ public void addToBinaryAnnotations(BinaryAnnotation elem) {
+ if (this.binaryAnnotations == null) {
+ this.binaryAnnotations = new ArrayList();
+ }
+ this.binaryAnnotations.add(elem);
+ }
+
+ public List getBinaryAnnotations() {
+ return this.binaryAnnotations;
+ }
+
+ public void setBinaryAnnotations(List binaryAnnotations) {
+ this.binaryAnnotations = binaryAnnotations;
+ }
+
+ public void unsetBinaryAnnotations() {
+ this.binaryAnnotations = null;
+ }
+
+ /** Returns true if field binaryAnnotations is set (has been assigned a value) and false otherwise */
+ public boolean isSetBinaryAnnotations() {
+ return this.binaryAnnotations != null;
+ }
+
+ public void setBinaryAnnotationsIsSet(boolean value) {
+ if (!value) {
+ this.binaryAnnotations = null;
+ }
+ }
+
+ public boolean isDebug() {
+ return this.debug;
+ }
+
+ public void setDebug(boolean debug) {
+ this.debug = debug;
+ setDebugIsSet(true);
+ }
+
+ public void unsetDebug() {
+ __isset_bit_vector.clear(__DEBUG_ISSET_ID);
+ }
+
+ /** Returns true if field debug is set (has been assigned a value) and false otherwise */
+ public boolean isSetDebug() {
+ return __isset_bit_vector.get(__DEBUG_ISSET_ID);
+ }
+
+ public void setDebugIsSet(boolean value) {
+ __isset_bit_vector.set(__DEBUG_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TRACE_ID:
+ if (value == null) {
+ unsetTraceID();
+ } else {
+ setTraceID((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case SPAN_ID:
+ if (value == null) {
+ unsetSpanID();
+ } else {
+ setSpanID((String)value);
+ }
+ break;
+
+ case PARENT_SPAN_ID:
+ if (value == null) {
+ unsetParentSpanId();
+ } else {
+ setParentSpanId((String)value);
+ }
+ break;
+
+ case ANNOTATIONS:
+ if (value == null) {
+ unsetAnnotations();
+ } else {
+ setAnnotations((List)value);
+ }
+ break;
+
+ case BINARY_ANNOTATIONS:
+ if (value == null) {
+ unsetBinaryAnnotations();
+ } else {
+ setBinaryAnnotations((List)value);
+ }
+ break;
+
+ case DEBUG:
+ if (value == null) {
+ unsetDebug();
+ } else {
+ setDebug((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TRACE_ID:
+ return getTraceID();
+
+ case NAME:
+ return getName();
+
+ case SPAN_ID:
+ return getSpanID();
+
+ case PARENT_SPAN_ID:
+ return getParentSpanId();
+
+ case ANNOTATIONS:
+ return getAnnotations();
+
+ case BINARY_ANNOTATIONS:
+ return getBinaryAnnotations();
+
+ case DEBUG:
+ return Boolean.valueOf(isDebug());
+
+ }
+ 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 TRACE_ID:
+ return isSetTraceID();
+ case NAME:
+ return isSetName();
+ case SPAN_ID:
+ return isSetSpanID();
+ case PARENT_SPAN_ID:
+ return isSetParentSpanId();
+ case ANNOTATIONS:
+ return isSetAnnotations();
+ case BINARY_ANNOTATIONS:
+ return isSetBinaryAnnotations();
+ case DEBUG:
+ return isSetDebug();
+ }
+ 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_traceID = true && this.isSetTraceID();
+ boolean that_present_traceID = true && that.isSetTraceID();
+ if (this_present_traceID || that_present_traceID) {
+ if (!(this_present_traceID && that_present_traceID))
+ return false;
+ if (!this.traceID.equals(that.traceID))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ 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.equals(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.equals(that.parentSpanId))
+ 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_binaryAnnotations = true && this.isSetBinaryAnnotations();
+ boolean that_present_binaryAnnotations = true && that.isSetBinaryAnnotations();
+ if (this_present_binaryAnnotations || that_present_binaryAnnotations) {
+ if (!(this_present_binaryAnnotations && that_present_binaryAnnotations))
+ return false;
+ if (!this.binaryAnnotations.equals(that.binaryAnnotations))
+ return false;
+ }
+
+ boolean this_present_debug = true && this.isSetDebug();
+ boolean that_present_debug = true && that.isSetDebug();
+ if (this_present_debug || that_present_debug) {
+ if (!(this_present_debug && that_present_debug))
+ return false;
+ if (this.debug != that.debug)
+ 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(isSetTraceID()).compareTo(typedOther.isSetTraceID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTraceID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.traceID, typedOther.traceID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ 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(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(isSetBinaryAnnotations()).compareTo(typedOther.isSetBinaryAnnotations());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBinaryAnnotations()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryAnnotations, typedOther.binaryAnnotations);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDebug()).compareTo(typedOther.isSetDebug());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDebug()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.debug, typedOther.debug);
+ 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("traceID:");
+ if (this.traceID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.traceID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("spanID:");
+ if (this.spanID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.spanID);
+ }
+ first = false;
+ if (isSetParentSpanId()) {
+ if (!first) sb.append(", ");
+ sb.append("parentSpanId:");
+ if (this.parentSpanId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentSpanId);
+ }
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("annotations:");
+ if (this.annotations == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.annotations);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("binaryAnnotations:");
+ if (this.binaryAnnotations == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.binaryAnnotations);
+ }
+ first = false;
+ if (isSetDebug()) {
+ if (!first) sb.append(", ");
+ sb.append("debug:");
+ sb.append(this.debug);
+ 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: // TRACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.traceID = iprot.readString();
+ struct.setTraceIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SPAN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.spanID = iprot.readString();
+ struct.setSpanIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PARENT_SPAN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentSpanId = iprot.readString();
+ struct.setParentSpanIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // 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 6: // BINARY_ANNOTATIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
+ struct.binaryAnnotations = new ArrayList(_list3.size);
+ for (int _i4 = 0; _i4 < _list3.size; ++_i4)
+ {
+ BinaryAnnotation _elem5; // required
+ _elem5 = new BinaryAnnotation();
+ _elem5.read(iprot);
+ struct.binaryAnnotations.add(_elem5);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBinaryAnnotationsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // DEBUG
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.debug = iprot.readBool();
+ struct.setDebugIsSet(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.traceID != null) {
+ oprot.writeFieldBegin(TRACE_ID_FIELD_DESC);
+ oprot.writeString(struct.traceID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.spanID != null) {
+ oprot.writeFieldBegin(SPAN_ID_FIELD_DESC);
+ oprot.writeString(struct.spanID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.parentSpanId != null) {
+ if (struct.isSetParentSpanId()) {
+ oprot.writeFieldBegin(PARENT_SPAN_ID_FIELD_DESC);
+ oprot.writeString(struct.parentSpanId);
+ 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.binaryAnnotations != null) {
+ oprot.writeFieldBegin(BINARY_ANNOTATIONS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.binaryAnnotations.size()));
+ for (BinaryAnnotation _iter7 : struct.binaryAnnotations)
+ {
+ _iter7.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetDebug()) {
+ oprot.writeFieldBegin(DEBUG_FIELD_DESC);
+ oprot.writeBool(struct.debug);
+ 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.isSetTraceID()) {
+ optionals.set(0);
+ }
+ if (struct.isSetName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSpanID()) {
+ optionals.set(2);
+ }
+ if (struct.isSetParentSpanId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetAnnotations()) {
+ optionals.set(4);
+ }
+ if (struct.isSetBinaryAnnotations()) {
+ optionals.set(5);
+ }
+ if (struct.isSetDebug()) {
+ optionals.set(6);
+ }
+ oprot.writeBitSet(optionals, 7);
+ if (struct.isSetTraceID()) {
+ oprot.writeString(struct.traceID);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetSpanID()) {
+ oprot.writeString(struct.spanID);
+ }
+ if (struct.isSetParentSpanId()) {
+ oprot.writeString(struct.parentSpanId);
+ }
+ if (struct.isSetAnnotations()) {
+ {
+ oprot.writeI32(struct.annotations.size());
+ for (Annotation _iter8 : struct.annotations)
+ {
+ _iter8.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetBinaryAnnotations()) {
+ {
+ oprot.writeI32(struct.binaryAnnotations.size());
+ for (BinaryAnnotation _iter9 : struct.binaryAnnotations)
+ {
+ _iter9.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetDebug()) {
+ oprot.writeBool(struct.debug);
+ }
+ }
+
+ @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(7);
+ if (incoming.get(0)) {
+ struct.traceID = iprot.readString();
+ struct.setTraceIDIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.spanID = iprot.readString();
+ struct.setSpanIDIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.parentSpanId = iprot.readString();
+ struct.setParentSpanIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ 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(5)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.binaryAnnotations = new ArrayList(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ BinaryAnnotation _elem15; // required
+ _elem15 = new BinaryAnnotation();
+ _elem15.read(iprot);
+ struct.binaryAnnotations.add(_elem15);
+ }
+ }
+ struct.setBinaryAnnotationsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.debug = iprot.readBool();
+ struct.setDebugIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/com/profiler/dto/JVMInfoThriftDTO.java b/src/main/java/com/profiler/dto/JVMInfoThriftDTO.java
index 77dc7aea7..3503adbf0 100644
--- a/src/main/java/com/profiler/dto/JVMInfoThriftDTO.java
+++ b/src/main/java/com/profiler/dto/JVMInfoThriftDTO.java
@@ -1,1407 +1,1407 @@
-/**
- * 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.dto;
-
-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_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("agentHashCode", 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 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 int agentHashCode; // 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_HASH_CODE((short)1, "agentHashCode"),
- 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_HASH_CODE
- return AGENT_HASH_CODE;
- 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 __AGENTHASHCODE_ISSET_ID = 0;
- private static final int __DATATIME_ISSET_ID = 1;
- private static final int __ACTIVETHREADCOUNT_ISSET_ID = 2;
- private static final int __GC1COUNT_ISSET_ID = 3;
- private static final int __GC1TIME_ISSET_ID = 4;
- private static final int __GC2COUNT_ISSET_ID = 5;
- private static final int __GC2TIME_ISSET_ID = 6;
- private static final int __HEAPUSED_ISSET_ID = 7;
- private static final int __HEAPCOMMITTED_ISSET_ID = 8;
- private static final int __NONHEAPUSED_ISSET_ID = 9;
- private static final int __NONHEAPCOMMITTED_ISSET_ID = 10;
- private static final int __PROCESSCPUTIME_ISSET_ID = 11;
- private BitSet __isset_bit_vector = new BitSet(12);
- 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_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("agentHashCode", 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.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(
- int agentHashCode,
- long dataTime,
- int activeThreadCount,
- long heapUsed,
- long heapCommitted,
- long nonHeapUsed,
- long nonHeapCommitted)
- {
- this();
- this.agentHashCode = agentHashCode;
- setAgentHashCodeIsSet(true);
- 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);
- this.agentHashCode = other.agentHashCode;
- 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() {
- setAgentHashCodeIsSet(false);
- this.agentHashCode = 0;
- 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 int getAgentHashCode() {
- return this.agentHashCode;
- }
-
- public void setAgentHashCode(int agentHashCode) {
- this.agentHashCode = agentHashCode;
- setAgentHashCodeIsSet(true);
- }
-
- public void unsetAgentHashCode() {
- __isset_bit_vector.clear(__AGENTHASHCODE_ISSET_ID);
- }
-
- /** Returns true if field agentHashCode is set (has been assigned a value) and false otherwise */
- public boolean isSetAgentHashCode() {
- return __isset_bit_vector.get(__AGENTHASHCODE_ISSET_ID);
- }
-
- public void setAgentHashCodeIsSet(boolean value) {
- __isset_bit_vector.set(__AGENTHASHCODE_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 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_HASH_CODE:
- if (value == null) {
- unsetAgentHashCode();
- } else {
- setAgentHashCode((Integer)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_HASH_CODE:
- return Integer.valueOf(getAgentHashCode());
-
- 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_HASH_CODE:
- return isSetAgentHashCode();
- 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_agentHashCode = true;
- boolean that_present_agentHashCode = true;
- if (this_present_agentHashCode || that_present_agentHashCode) {
- if (!(this_present_agentHashCode && that_present_agentHashCode))
- return false;
- if (this.agentHashCode != that.agentHashCode)
- 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(isSetAgentHashCode()).compareTo(typedOther.isSetAgentHashCode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAgentHashCode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentHashCode, typedOther.agentHashCode);
- 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("agentHashCode:");
- sb.append(this.agentHashCode);
- 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_HASH_CODE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.agentHashCode = iprot.readI32();
- struct.setAgentHashCodeIsSet(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);
- oprot.writeFieldBegin(AGENT_HASH_CODE_FIELD_DESC);
- oprot.writeI32(struct.agentHashCode);
- 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.isSetAgentHashCode()) {
- 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.isSetAgentHashCode()) {
- oprot.writeI32(struct.agentHashCode);
- }
- 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.agentHashCode = iprot.readI32();
- struct.setAgentHashCodeIsSet(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.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.profiler.dto;
+
+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_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("agentHashCode", 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 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 int agentHashCode; // 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_HASH_CODE((short)1, "agentHashCode"),
+ 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_HASH_CODE
+ return AGENT_HASH_CODE;
+ 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 __AGENTHASHCODE_ISSET_ID = 0;
+ private static final int __DATATIME_ISSET_ID = 1;
+ private static final int __ACTIVETHREADCOUNT_ISSET_ID = 2;
+ private static final int __GC1COUNT_ISSET_ID = 3;
+ private static final int __GC1TIME_ISSET_ID = 4;
+ private static final int __GC2COUNT_ISSET_ID = 5;
+ private static final int __GC2TIME_ISSET_ID = 6;
+ private static final int __HEAPUSED_ISSET_ID = 7;
+ private static final int __HEAPCOMMITTED_ISSET_ID = 8;
+ private static final int __NONHEAPUSED_ISSET_ID = 9;
+ private static final int __NONHEAPCOMMITTED_ISSET_ID = 10;
+ private static final int __PROCESSCPUTIME_ISSET_ID = 11;
+ private BitSet __isset_bit_vector = new BitSet(12);
+ 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_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("agentHashCode", 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.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(
+ int agentHashCode,
+ long dataTime,
+ int activeThreadCount,
+ long heapUsed,
+ long heapCommitted,
+ long nonHeapUsed,
+ long nonHeapCommitted)
+ {
+ this();
+ this.agentHashCode = agentHashCode;
+ setAgentHashCodeIsSet(true);
+ 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);
+ this.agentHashCode = other.agentHashCode;
+ 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() {
+ setAgentHashCodeIsSet(false);
+ this.agentHashCode = 0;
+ 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 int getAgentHashCode() {
+ return this.agentHashCode;
+ }
+
+ public void setAgentHashCode(int agentHashCode) {
+ this.agentHashCode = agentHashCode;
+ setAgentHashCodeIsSet(true);
+ }
+
+ public void unsetAgentHashCode() {
+ __isset_bit_vector.clear(__AGENTHASHCODE_ISSET_ID);
+ }
+
+ /** Returns true if field agentHashCode is set (has been assigned a value) and false otherwise */
+ public boolean isSetAgentHashCode() {
+ return __isset_bit_vector.get(__AGENTHASHCODE_ISSET_ID);
+ }
+
+ public void setAgentHashCodeIsSet(boolean value) {
+ __isset_bit_vector.set(__AGENTHASHCODE_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 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_HASH_CODE:
+ if (value == null) {
+ unsetAgentHashCode();
+ } else {
+ setAgentHashCode((Integer)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_HASH_CODE:
+ return Integer.valueOf(getAgentHashCode());
+
+ 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_HASH_CODE:
+ return isSetAgentHashCode();
+ 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_agentHashCode = true;
+ boolean that_present_agentHashCode = true;
+ if (this_present_agentHashCode || that_present_agentHashCode) {
+ if (!(this_present_agentHashCode && that_present_agentHashCode))
+ return false;
+ if (this.agentHashCode != that.agentHashCode)
+ 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(isSetAgentHashCode()).compareTo(typedOther.isSetAgentHashCode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAgentHashCode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentHashCode, typedOther.agentHashCode);
+ 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("agentHashCode:");
+ sb.append(this.agentHashCode);
+ 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_HASH_CODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.agentHashCode = iprot.readI32();
+ struct.setAgentHashCodeIsSet(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);
+ oprot.writeFieldBegin(AGENT_HASH_CODE_FIELD_DESC);
+ oprot.writeI32(struct.agentHashCode);
+ 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.isSetAgentHashCode()) {
+ 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.isSetAgentHashCode()) {
+ oprot.writeI32(struct.agentHashCode);
+ }
+ 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.agentHashCode = iprot.readI32();
+ struct.setAgentHashCodeIsSet(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/dto/RequestDataListThriftDTO.java b/src/main/java/com/profiler/dto/RequestDataListThriftDTO.java
index b5236c39a..33e767ddd 100644
--- a/src/main/java/com/profiler/dto/RequestDataListThriftDTO.java
+++ b/src/main/java/com/profiler/dto/RequestDataListThriftDTO.java
@@ -1,624 +1,624 @@
-/**
- * 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.dto;
-
-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 HOST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hostHashCode", org.apache.thrift.protocol.TType.I32, (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 int hostHashCode; // 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 {
- HOST_HASH_CODE((short)1, "hostHashCode"),
- 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: // HOST_HASH_CODE
- return HOST_HASH_CODE;
- 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 __HOSTHASHCODE_ISSET_ID = 0;
- private static final int __REQUESTHASHCODE_ISSET_ID = 1;
- private BitSet __isset_bit_vector = new BitSet(2);
- 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.HOST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hostHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- 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(
- int hostHashCode,
- int requestHashCode,
- List requestDataList)
- {
- this();
- this.hostHashCode = hostHashCode;
- setHostHashCodeIsSet(true);
- 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);
- this.hostHashCode = other.hostHashCode;
- 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() {
- setHostHashCodeIsSet(false);
- this.hostHashCode = 0;
- setRequestHashCodeIsSet(false);
- this.requestHashCode = 0;
- this.requestDataList = null;
- }
-
- public int getHostHashCode() {
- return this.hostHashCode;
- }
-
- public void setHostHashCode(int hostHashCode) {
- this.hostHashCode = hostHashCode;
- setHostHashCodeIsSet(true);
- }
-
- public void unsetHostHashCode() {
- __isset_bit_vector.clear(__HOSTHASHCODE_ISSET_ID);
- }
-
- /** Returns true if field hostHashCode is set (has been assigned a value) and false otherwise */
- public boolean isSetHostHashCode() {
- return __isset_bit_vector.get(__HOSTHASHCODE_ISSET_ID);
- }
-
- public void setHostHashCodeIsSet(boolean value) {
- __isset_bit_vector.set(__HOSTHASHCODE_ISSET_ID, value);
- }
-
- 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 HOST_HASH_CODE:
- if (value == null) {
- unsetHostHashCode();
- } else {
- setHostHashCode((Integer)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 HOST_HASH_CODE:
- return Integer.valueOf(getHostHashCode());
-
- 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 HOST_HASH_CODE:
- return isSetHostHashCode();
- 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_hostHashCode = true;
- boolean that_present_hostHashCode = true;
- if (this_present_hostHashCode || that_present_hostHashCode) {
- if (!(this_present_hostHashCode && that_present_hostHashCode))
- return false;
- if (this.hostHashCode != that.hostHashCode)
- 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(isSetHostHashCode()).compareTo(typedOther.isSetHostHashCode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHostHashCode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostHashCode, typedOther.hostHashCode);
- 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("hostHashCode:");
- sb.append(this.hostHashCode);
- 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: // HOST_HASH_CODE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.hostHashCode = iprot.readI32();
- struct.setHostHashCodeIsSet(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);
- oprot.writeFieldBegin(HOST_HASH_CODE_FIELD_DESC);
- oprot.writeI32(struct.hostHashCode);
- 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.isSetHostHashCode()) {
- optionals.set(0);
- }
- if (struct.isSetRequestHashCode()) {
- optionals.set(1);
- }
- if (struct.isSetRequestDataList()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetHostHashCode()) {
- oprot.writeI32(struct.hostHashCode);
- }
- 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.hostHashCode = iprot.readI32();
- struct.setHostHashCodeIsSet(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.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.profiler.dto;
+
+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 HOST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hostHashCode", org.apache.thrift.protocol.TType.I32, (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 int hostHashCode; // 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 {
+ HOST_HASH_CODE((short)1, "hostHashCode"),
+ 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: // HOST_HASH_CODE
+ return HOST_HASH_CODE;
+ 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 __HOSTHASHCODE_ISSET_ID = 0;
+ private static final int __REQUESTHASHCODE_ISSET_ID = 1;
+ private BitSet __isset_bit_vector = new BitSet(2);
+ 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.HOST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hostHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ 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(
+ int hostHashCode,
+ int requestHashCode,
+ List requestDataList)
+ {
+ this();
+ this.hostHashCode = hostHashCode;
+ setHostHashCodeIsSet(true);
+ 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);
+ this.hostHashCode = other.hostHashCode;
+ 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() {
+ setHostHashCodeIsSet(false);
+ this.hostHashCode = 0;
+ setRequestHashCodeIsSet(false);
+ this.requestHashCode = 0;
+ this.requestDataList = null;
+ }
+
+ public int getHostHashCode() {
+ return this.hostHashCode;
+ }
+
+ public void setHostHashCode(int hostHashCode) {
+ this.hostHashCode = hostHashCode;
+ setHostHashCodeIsSet(true);
+ }
+
+ public void unsetHostHashCode() {
+ __isset_bit_vector.clear(__HOSTHASHCODE_ISSET_ID);
+ }
+
+ /** Returns true if field hostHashCode is set (has been assigned a value) and false otherwise */
+ public boolean isSetHostHashCode() {
+ return __isset_bit_vector.get(__HOSTHASHCODE_ISSET_ID);
+ }
+
+ public void setHostHashCodeIsSet(boolean value) {
+ __isset_bit_vector.set(__HOSTHASHCODE_ISSET_ID, value);
+ }
+
+ 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 HOST_HASH_CODE:
+ if (value == null) {
+ unsetHostHashCode();
+ } else {
+ setHostHashCode((Integer)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 HOST_HASH_CODE:
+ return Integer.valueOf(getHostHashCode());
+
+ 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 HOST_HASH_CODE:
+ return isSetHostHashCode();
+ 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_hostHashCode = true;
+ boolean that_present_hostHashCode = true;
+ if (this_present_hostHashCode || that_present_hostHashCode) {
+ if (!(this_present_hostHashCode && that_present_hostHashCode))
+ return false;
+ if (this.hostHashCode != that.hostHashCode)
+ 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(isSetHostHashCode()).compareTo(typedOther.isSetHostHashCode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHostHashCode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostHashCode, typedOther.hostHashCode);
+ 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("hostHashCode:");
+ sb.append(this.hostHashCode);
+ 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: // HOST_HASH_CODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.hostHashCode = iprot.readI32();
+ struct.setHostHashCodeIsSet(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);
+ oprot.writeFieldBegin(HOST_HASH_CODE_FIELD_DESC);
+ oprot.writeI32(struct.hostHashCode);
+ 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.isSetHostHashCode()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRequestHashCode()) {
+ optionals.set(1);
+ }
+ if (struct.isSetRequestDataList()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetHostHashCode()) {
+ oprot.writeI32(struct.hostHashCode);
+ }
+ 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.hostHashCode = iprot.readI32();
+ struct.setHostHashCodeIsSet(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/dto/RequestDataThriftDTO.java b/src/main/java/com/profiler/dto/RequestDataThriftDTO.java
index de8b845ba..59855e804 100644
--- a/src/main/java/com/profiler/dto/RequestDataThriftDTO.java
+++ b/src/main/java/com/profiler/dto/RequestDataThriftDTO.java
@@ -1,1534 +1,1534 @@
-/**
- * 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.dto;
-
-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.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.profiler.dto;
+
+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);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/com/profiler/dto/RequestThriftDTO.java b/src/main/java/com/profiler/dto/RequestThriftDTO.java
index df4645ae1..6a9fcf539 100644
--- a/src/main/java/com/profiler/dto/RequestThriftDTO.java
+++ b/src/main/java/com/profiler/dto/RequestThriftDTO.java
@@ -1,2014 +1,2014 @@
-/**
- * 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.dto;
-
-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 HOST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hostHashCode", org.apache.thrift.protocol.TType.I32, (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 int hostHashCode; // 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 {
- HOST_HASH_CODE((short)1, "hostHashCode"),
- 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: // HOST_HASH_CODE
- return HOST_HASH_CODE;
- 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 __HOSTHASHCODE_ISSET_ID = 0;
- private static final int __REQUESTHASHCODE_ISSET_ID = 1;
- private static final int __DATATYPE_ISSET_ID = 2;
- private static final int __DATATIME_ISSET_ID = 3;
- private static final int __THREADCPUTIME_ISSET_ID = 4;
- private static final int __THREADUSERTIME_ISSET_ID = 5;
- private static final int __EXTRAINT1_ISSET_ID = 6;
- private static final int __EXTRAINT2_ISSET_ID = 7;
- private static final int __EXTRAINT3_ISSET_ID = 8;
- private static final int __EXTRALONG1_ISSET_ID = 9;
- private static final int __EXTRALONG2_ISSET_ID = 10;
- private static final int __EXTRALONG3_ISSET_ID = 11;
- private BitSet __isset_bit_vector = new BitSet(12);
- 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.HOST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hostHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- 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(
- int hostHashCode,
- int requestHashCode,
- int dataType,
- long dataTime,
- long threadCPUTime,
- long threadUserTime)
- {
- this();
- this.hostHashCode = hostHashCode;
- setHostHashCodeIsSet(true);
- 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);
- this.hostHashCode = other.hostHashCode;
- 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() {
- setHostHashCodeIsSet(false);
- this.hostHashCode = 0;
- 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 int getHostHashCode() {
- return this.hostHashCode;
- }
-
- public void setHostHashCode(int hostHashCode) {
- this.hostHashCode = hostHashCode;
- setHostHashCodeIsSet(true);
- }
-
- public void unsetHostHashCode() {
- __isset_bit_vector.clear(__HOSTHASHCODE_ISSET_ID);
- }
-
- /** Returns true if field hostHashCode is set (has been assigned a value) and false otherwise */
- public boolean isSetHostHashCode() {
- return __isset_bit_vector.get(__HOSTHASHCODE_ISSET_ID);
- }
-
- public void setHostHashCodeIsSet(boolean value) {
- __isset_bit_vector.set(__HOSTHASHCODE_ISSET_ID, value);
- }
-
- 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 HOST_HASH_CODE:
- if (value == null) {
- unsetHostHashCode();
- } else {
- setHostHashCode((Integer)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 HOST_HASH_CODE:
- return Integer.valueOf(getHostHashCode());
-
- 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 HOST_HASH_CODE:
- return isSetHostHashCode();
- 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_hostHashCode = true;
- boolean that_present_hostHashCode = true;
- if (this_present_hostHashCode || that_present_hostHashCode) {
- if (!(this_present_hostHashCode && that_present_hostHashCode))
- return false;
- if (this.hostHashCode != that.hostHashCode)
- 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(isSetHostHashCode()).compareTo(typedOther.isSetHostHashCode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHostHashCode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostHashCode, typedOther.hostHashCode);
- 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("hostHashCode:");
- sb.append(this.hostHashCode);
- 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: // HOST_HASH_CODE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.hostHashCode = iprot.readI32();
- struct.setHostHashCodeIsSet(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);
- oprot.writeFieldBegin(HOST_HASH_CODE_FIELD_DESC);
- oprot.writeI32(struct.hostHashCode);
- 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.isSetHostHashCode()) {
- 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.isSetHostHashCode()) {
- oprot.writeI32(struct.hostHashCode);
- }
- 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.hostHashCode = iprot.readI32();
- struct.setHostHashCodeIsSet(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.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.profiler.dto;
+
+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 HOST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hostHashCode", org.apache.thrift.protocol.TType.I32, (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 int hostHashCode; // 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 {
+ HOST_HASH_CODE((short)1, "hostHashCode"),
+ 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: // HOST_HASH_CODE
+ return HOST_HASH_CODE;
+ 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 __HOSTHASHCODE_ISSET_ID = 0;
+ private static final int __REQUESTHASHCODE_ISSET_ID = 1;
+ private static final int __DATATYPE_ISSET_ID = 2;
+ private static final int __DATATIME_ISSET_ID = 3;
+ private static final int __THREADCPUTIME_ISSET_ID = 4;
+ private static final int __THREADUSERTIME_ISSET_ID = 5;
+ private static final int __EXTRAINT1_ISSET_ID = 6;
+ private static final int __EXTRAINT2_ISSET_ID = 7;
+ private static final int __EXTRAINT3_ISSET_ID = 8;
+ private static final int __EXTRALONG1_ISSET_ID = 9;
+ private static final int __EXTRALONG2_ISSET_ID = 10;
+ private static final int __EXTRALONG3_ISSET_ID = 11;
+ private BitSet __isset_bit_vector = new BitSet(12);
+ 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.HOST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hostHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ 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(
+ int hostHashCode,
+ int requestHashCode,
+ int dataType,
+ long dataTime,
+ long threadCPUTime,
+ long threadUserTime)
+ {
+ this();
+ this.hostHashCode = hostHashCode;
+ setHostHashCodeIsSet(true);
+ 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);
+ this.hostHashCode = other.hostHashCode;
+ 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() {
+ setHostHashCodeIsSet(false);
+ this.hostHashCode = 0;
+ 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 int getHostHashCode() {
+ return this.hostHashCode;
+ }
+
+ public void setHostHashCode(int hostHashCode) {
+ this.hostHashCode = hostHashCode;
+ setHostHashCodeIsSet(true);
+ }
+
+ public void unsetHostHashCode() {
+ __isset_bit_vector.clear(__HOSTHASHCODE_ISSET_ID);
+ }
+
+ /** Returns true if field hostHashCode is set (has been assigned a value) and false otherwise */
+ public boolean isSetHostHashCode() {
+ return __isset_bit_vector.get(__HOSTHASHCODE_ISSET_ID);
+ }
+
+ public void setHostHashCodeIsSet(boolean value) {
+ __isset_bit_vector.set(__HOSTHASHCODE_ISSET_ID, value);
+ }
+
+ 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 HOST_HASH_CODE:
+ if (value == null) {
+ unsetHostHashCode();
+ } else {
+ setHostHashCode((Integer)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 HOST_HASH_CODE:
+ return Integer.valueOf(getHostHashCode());
+
+ 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 HOST_HASH_CODE:
+ return isSetHostHashCode();
+ 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_hostHashCode = true;
+ boolean that_present_hostHashCode = true;
+ if (this_present_hostHashCode || that_present_hostHashCode) {
+ if (!(this_present_hostHashCode && that_present_hostHashCode))
+ return false;
+ if (this.hostHashCode != that.hostHashCode)
+ 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(isSetHostHashCode()).compareTo(typedOther.isSetHostHashCode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHostHashCode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostHashCode, typedOther.hostHashCode);
+ 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("hostHashCode:");
+ sb.append(this.hostHashCode);
+ 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: // HOST_HASH_CODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.hostHashCode = iprot.readI32();
+ struct.setHostHashCodeIsSet(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);
+ oprot.writeFieldBegin(HOST_HASH_CODE_FIELD_DESC);
+ oprot.writeI32(struct.hostHashCode);
+ 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.isSetHostHashCode()) {
+ 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.isSetHostHashCode()) {
+ oprot.writeI32(struct.hostHashCode);
+ }
+ 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.hostHashCode = iprot.readI32();
+ struct.setHostHashCodeIsSet(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/test/java/com/profiler/context/SpanTest.java b/src/test/java/com/profiler/context/SpanTest.java
index ff0f66c60..459039ad3 100644
--- a/src/test/java/com/profiler/context/SpanTest.java
+++ b/src/test/java/com/profiler/context/SpanTest.java
@@ -2,29 +2,23 @@ package com.profiler.context;
import org.junit.Test;
+import com.profiler.context.gen.Annotation;
+import com.profiler.context.gen.BinaryAnnotation;
+
public class SpanTest {
@Test
public void span() {
- Span rootSpan = RequestContext.getSpan(TraceID.EMPTY, SpanID.ROOT_SPAN_ID, "UnitTest", true);
+ Trace tracer = RequestContext.getTrace(TraceID.EMPTY, SpanID.ROOT_SPAN_ID, "UnitTest", true);
- Annotation a1 = new Annotation(System.nanoTime(), "step1", EndPoint.NONE);
- Annotation a2 = new Annotation(System.nanoTime(), "step2", EndPoint.NONE);
- Annotation a3 = new Annotation(System.nanoTime(), "step2", new EndPoint("HTTP", "127.0.0.1", 1111, "localserver"));
+ Annotation a1 = new Annotation(System.nanoTime(), "step1");
+ Annotation a2 = new Annotation(System.nanoTime(), "step2");
+ BinaryAnnotation a3 = new BinaryAnnotation(System.nanoTime(), "", null, "");
- a1.processStart();
- a1.processEnd();
+ tracer.record(a1);
+ tracer.record(a2);
+ tracer.recordBinary(a3);
- a2.processStart();
- a2.processEnd();
-
- a3.processStart();
- a3.processEnd();
-
- rootSpan.addAnnotation(a1);
- rootSpan.addAnnotation(a2);
- rootSpan.addAnnotation(a3);
-
- System.out.println(rootSpan);
+ System.out.println(tracer);
}
}
diff --git a/thrift/Trace.thrift b/thrift/Trace.thrift
new file mode 100644
index 000000000..792af1c36
--- /dev/null
+++ b/thrift/Trace.thrift
@@ -0,0 +1,37 @@
+namespace java com.profiler.context.gen
+
+const string CLIENT_SEND = "CS"
+const string CLIENT_RECV = "CR"
+const string SERVER_SEND = "SS"
+const string SERVER_RECV = "SR"
+
+struct Endpoint {
+ 1: string ip,
+ 2: i16 port,
+ 3: string name,
+}
+
+struct Annotation {
+ 1: i64 timestamp,
+ 2: string value,
+ 3: optional Endpoint host,
+ 4: optional i32 duration,
+}
+
+struct BinaryAnnotation {
+ 1: i64 timestamp,
+ 2: string key,
+ 3: binary value,
+ 4: string annotationType,
+ 5: optional Endpoint host
+}
+
+struct Span {
+ 1: string traceID
+ 2: string name,
+ 3: string spanID,
+ 4: optional string parentSpanId,
+ 5: list annotations,
+ 6: list binaryAnnotations
+ 7: optional bool debug = 0
+}
\ No newline at end of file