public SpanRef deepCopy() { return new SpanRef(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof SpanRef) return this.equals((SpanRef)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case REF_TYPE: return getRefType(); case TRACE_ID_LOW: return Long.valueOf(getTraceIdLow()); case TRACE_ID_HIGH: return Long.valueOf(getTraceIdHigh()); case SPAN_ID: return Long.valueOf(getSpanId()); } 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 REF_TYPE: return isSetRefType(); case TRACE_ID_LOW: return isSetTraceIdLow(); case TRACE_ID_HIGH: return isSetTraceIdHigh(); case SPAN_ID: return isSetSpanId(); } throw new IllegalStateException(); }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.refType = com.uber.jaeger.thriftjava.SpanRefType.findByValue(iprot.readI32()); struct.setRefTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.traceIdLow = iprot.readI64(); struct.setTraceIdLowIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.traceIdHigh = iprot.readI64(); struct.setTraceIdHighIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.spanId = iprot.readI64(); struct.setSpanIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetTraceIdLow()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'traceIdLow' was not found in serialized data! Struct: " + toString()); if (!struct.isSetTraceIdHigh()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'traceIdHigh' was not found in serialized data! Struct: " + toString());
/** * Performs a deep copy on <i>other</i>. */ public SpanRef(SpanRef other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRefType()) { this.refType = other.refType; } this.traceIdLow = other.traceIdLow; this.traceIdHigh = other.traceIdHigh; this.spanId = other.spanId; }
lastComparison = Boolean.valueOf(isSetRefType()).compareTo(other.isSetRefType()); if (lastComparison != 0) { return lastComparison; if (isSetRefType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.refType, other.refType); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetTraceIdLow()).compareTo(other.isSetTraceIdLow()); if (lastComparison != 0) { return lastComparison; if (isSetTraceIdLow()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.traceIdLow, other.traceIdLow); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetTraceIdHigh()).compareTo(other.isSetTraceIdHigh()); if (lastComparison != 0) { return lastComparison; if (isSetTraceIdHigh()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.traceIdHigh, other.traceIdHigh); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(other.isSetSpanId()); if (lastComparison != 0) { return lastComparison; if (isSetSpanId()) {
return false; boolean this_present_refType = true && this.isSetRefType(); boolean that_present_refType = true && that.isSetRefType(); if (this_present_refType || that_present_refType) { if (!(this_present_refType && that_present_refType))
List<SpanRef> __this__references = new ArrayList<SpanRef>(other.references.size()); for (SpanRef other_element : other.references) { __this__references.add(new SpanRef(other_element));
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_refType = true && (isSetRefType()); list.add(present_refType); if (present_refType) list.add(refType.getValue()); boolean present_traceIdLow = true; list.add(present_traceIdLow); if (present_traceIdLow) list.add(traceIdLow); boolean present_traceIdHigh = true; list.add(present_traceIdHigh); if (present_traceIdHigh) list.add(traceIdHigh); boolean present_spanId = true; list.add(present_spanId); if (present_spanId) list.add(spanId); return list.hashCode(); }
private List<SpanRef> linksToReferences(final List<Link> links) { final List<SpanRef> spanRefs = Lists.newArrayListWithExpectedSize(links.size()); for (final Link link : links) { copyToBuffer(link.getTraceId()); spanRefs.add( new SpanRef( linkTypeToRefType(link.getType()), traceIdLow(), traceIdHigh(), spanIdToLong(link.getSpanId()))); } return spanRefs; }