org.apache.accumulo.trace.instrument.receivers
Class AsyncSpanReceiver<SpanKey,Destination>

java.lang.Object
  extended by org.apache.accumulo.trace.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.


Field Summary
protected  String host
           
protected  String service
           
 
Constructor Summary
AsyncSpanReceiver(String host, String service, long millis)
           
 
Method Summary
protected abstract  Destination createDestination(SpanKey key)
           
 void flush()
           
protected abstract  SpanKey getSpanKey(Map<String,String> data)
           
protected abstract  void send(Destination resource, RemoteSpan span)
           
 void span(long traceId, long spanId, long parentId, long start, long stop, String description, Map<String,String> data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

protected final String host

service

protected final String service
Constructor Detail

AsyncSpanReceiver

public AsyncSpanReceiver(String host,
                         String service,
                         long millis)
Method Detail

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 © 2013 Apache Accumulo Project. All Rights Reserved.