public final class PendingSpans extends ReferenceQueue<TraceContext>
Spans are weakly referenced by their owning context. When the keys are collected, they are transferred to a queue, waiting to be reported. A call to modify any span will implicitly flush orphans to Zipkin. Spans in this state will have a "brave.flush" annotation added to them.
The internal implementation is derived from WeakConcurrentMap by Rafael Winterhalter. See https://github.com/raphw/weak-lock-free/blob/master/src/main/java/com/blogspot/mydailyjava/weaklockfree/WeakConcurrentMap.java
| Constructor | Description |
|---|---|
PendingSpans(Clock clock,
FinishedSpanHandler zipkinHandler,
AtomicBoolean noop) |
| Modifier and Type | Method | Description |
|---|---|---|
PendingSpan |
getOrCreate(TraceContext context,
boolean start) |
|
boolean |
remove(TraceContext context) |
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpoll, remove, removepublic PendingSpans(Clock clock, FinishedSpanHandler zipkinHandler, AtomicBoolean noop)
public PendingSpan getOrCreate(TraceContext context, boolean start)
public boolean remove(TraceContext context)
Span.abandon()Copyright © 2018 OpenZipkin. All rights reserved.