org.apache.accumulo.cloudtrace.instrument.receivers
Class AsyncSpanReceiver<SpanKey,Destination>
java.lang.Object
org.apache.accumulo.cloudtrace.instrument.receivers.AsyncSpanReceiver<SpanKey,Destination>
- All Implemented Interfaces:
- SpanReceiver
- Direct Known Subclasses:
- SendSpansViaThrift
public abstract class AsyncSpanReceiver<SpanKey,Destination>
- extends Object
- implements SpanReceiver
Deliver Span information periodically to a destination.
- Send host and service information with the span.
- Cache Destination objects by some key that can be extracted from the span.
- Can be used to queue spans up for delivery over RPC, or for saving into a file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
protected final String host
service
protected final String service
AsyncSpanReceiver
public AsyncSpanReceiver(String host,
String service,
long millis)
createDestination
protected abstract Destination createDestination(SpanKey key)
throws Exception
- Throws:
Exception
send
protected abstract void send(Destination resource,
RemoteSpan span)
throws Exception
- Throws:
Exception
getSpanKey
protected abstract SpanKey getSpanKey(Map<String,String> data)
span
public void span(long traceId,
long spanId,
long parentId,
long start,
long stop,
String description,
Map<String,String> data)
- Specified by:
span
in interface SpanReceiver
flush
public void flush()
- Specified by:
flush
in interface SpanReceiver
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.