public Process deepCopy() { return new Process(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Process) return this.equals((Process)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case SERVICE_NAME: return getServiceName(); case TAGS: return getTags(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SERVICE_NAME: if (value == null) { unsetServiceName(); } else { setServiceName((String)value); } break; case TAGS: if (value == null) { unsetTags(); } else { setTags((List<Tag>)value); } break; } }
/** 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 SERVICE_NAME: return isSetServiceName(); case TAGS: return isSetTags(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Batch struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.process = new Process(); struct.process.read(iprot); struct.setProcessIsSet(true); { org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.spans = new ArrayList<Span>(_list45.size); Span _elem46; for (int _i47 = 0; _i47 < _list45.size; ++_i47) { _elem46 = new Span(); _elem46.read(iprot); struct.spans.add(_elem46); } } struct.setSpansIsSet(true); } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.serviceName = iprot.readString(); struct.setServiceNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.setTagsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public void write(org.apache.thrift.protocol.TProtocol oprot, Process struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.serviceName != null) { oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC); oprot.writeString(struct.serviceName); oprot.writeFieldEnd(); } if (struct.tags != null) { if (struct.isSetTags()) { oprot.writeFieldBegin(TAGS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tags.size())); for (Tag _iter35 : struct.tags) { _iter35.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Process struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.serviceName = iprot.readString(); struct.setServiceNameIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.tags = new ArrayList<Tag>(_list37.size); Tag _elem38; for (int _i39 = 0; _i39 < _list37.size; ++_i39) { _elem38 = new Tag(); _elem38.read(iprot); struct.tags.add(_elem38); } } struct.setTagsIsSet(true); } } }
@Override public String toString() { StringBuilder sb = new StringBuilder("Process("); boolean first = true; sb.append("serviceName:"); if (this.serviceName == null) { sb.append("null"); } else { sb.append(this.serviceName); } first = false; if (isSetTags()) { if (!first) sb.append(", "); sb.append("tags:"); if (this.tags == null) { sb.append("null"); } else { sb.append(this.tags); } first = false; } sb.append(")"); return sb.toString(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public boolean equals(Process that) { if (that == null) return false; boolean this_present_serviceName = true && this.isSetServiceName(); boolean that_present_serviceName = true && that.isSetServiceName(); if (this_present_serviceName || that_present_serviceName) { if (!(this_present_serviceName && that_present_serviceName)) return false; if (!this.serviceName.equals(that.serviceName)) return false; } boolean this_present_tags = true && this.isSetTags(); boolean that_present_tags = true && that.isSetTags(); if (this_present_tags || that_present_tags) { if (!(this_present_tags && that_present_tags)) return false; if (!this.tags.equals(that.tags)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Process struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.serviceName); BitSet optionals = new BitSet(); if (struct.isSetTags()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetTags()) { { oprot.writeI32(struct.tags.size()); for (Tag _iter36 : struct.tags) { _iter36.write(oprot); } } } }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_serviceName = true && (isSetServiceName()); list.add(present_serviceName); if (present_serviceName) list.add(serviceName); boolean present_tags = true && (isSetTags()); list.add(present_tags); if (present_tags) list.add(tags); return list.hashCode(); }
private static SpanExporter.Handler newHandlerWithSender( final HttpSender sender, final String serviceName) { final Process process = new Process(serviceName); return new JaegerExporterHandler(sender, process); }
public boolean equals(Batch that) { if (that == null) return false; boolean this_present_process = true && this.isSetProcess(); boolean that_present_process = true && that.isSetProcess(); if (this_present_process || that_present_process) { if (!(this_present_process && that_present_process)) return false; if (!this.process.equals(that.process)) return false; } boolean this_present_spans = true && this.isSetSpans(); boolean that_present_spans = true && that.isSetSpans(); if (this_present_spans || that_present_spans) { if (!(this_present_spans && that_present_spans)) return false; if (!this.spans.equals(that.spans)) return false; } return true; }
/** * Performs a deep copy on <i>other</i>. */ public Process(Process other) { if (other.isSetServiceName()) { this.serviceName = other.serviceName; } if (other.isSetTags()) { List<Tag> __this__tags = new ArrayList<Tag>(other.tags.size()); for (Tag other_element : other.tags) { __this__tags.add(new Tag(other_element)); } this.tags = __this__tags; } }
private static SpanExporter.Handler newHandler( final String thriftEndpoint, final String serviceName) { final HttpSender sender = new HttpSender(thriftEndpoint); final Process process = new Process(serviceName); return new JaegerExporterHandler(sender, process); }
@Override public int compareTo(Process other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetServiceName()).compareTo(other.isSetServiceName()); if (lastComparison != 0) { return lastComparison; } if (isSetServiceName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceName, other.serviceName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags()); if (lastComparison != 0) { return lastComparison; } if (isSetTags()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags); if (lastComparison != 0) { return lastComparison; } } return 0; }