org.htrace.impl
Class LocalFileSpanReceiver

java.lang.Object
  extended by org.htrace.impl.LocalFileSpanReceiver
All Implemented Interfaces:
Closeable, SpanReceiver

public class LocalFileSpanReceiver
extends Object
implements SpanReceiver

Writes the spans it receives to a local file. A production LocalFileSpanReceiver should use a real CSV format.


Field Summary
static int CAPACITY_DEFAULT
           
static String CAPACITY_KEY
           
static long EXECUTOR_TERMINATION_TIMEOUT_DURATION_DEFAULT
           
static org.apache.commons.logging.Log LOG
           
static String PATH_KEY
           
 
Constructor Summary
LocalFileSpanReceiver()
           
 
Method Summary
 void close()
           
 void configure(HTraceConfiguration conf)
          Hosts of SpanReceivers should call this method to provide configuration to SpanReceivers after creating them.
 void receiveSpan(Span span)
          Called when a Span is stopped and can now be stored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

PATH_KEY

public static final String PATH_KEY
See Also:
Constant Field Values

CAPACITY_KEY

public static final String CAPACITY_KEY
See Also:
Constant Field Values

CAPACITY_DEFAULT

public static final int CAPACITY_DEFAULT
See Also:
Constant Field Values

EXECUTOR_TERMINATION_TIMEOUT_DURATION_DEFAULT

public static final long EXECUTOR_TERMINATION_TIMEOUT_DURATION_DEFAULT
See Also:
Constant Field Values
Constructor Detail

LocalFileSpanReceiver

public LocalFileSpanReceiver()
Method Detail

configure

public void configure(HTraceConfiguration conf)
Description copied from interface: SpanReceiver
Hosts of SpanReceivers should call this method to provide configuration to SpanReceivers after creating them.

Specified by:
configure in interface SpanReceiver

receiveSpan

public void receiveSpan(Span span)
Description copied from interface: SpanReceiver
Called when a Span is stopped and can now be stored.

Specified by:
receiveSpan in interface SpanReceiver

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2014. All Rights Reserved.