org.apache.avro.ipc.trace
Interface SpanStorage

All Known Implementing Classes:
FileSpanStorage, InMemorySpanStorage

public interface SpanStorage

Responsible for storing spans locally and answering span queries. Since query for a given set of spans may persist over several RPC calls, they are indexed by a handle.


Field Summary
static long DEFAULT_MAX_SPANS
           
static long MILLIS_PER_SECOND
           
static long NANOS_PER_SECOND
           
 
Method Summary
 void addSpan(Span s)
          Add a span.
 List<Span> getAllSpans()
          Return a list of all spans currently stored.
 List<Span> getSpansInRange(long start, long end)
          Return a list of all spans that fall within the time given range.
 void setMaxSpans(long maxSpans)
          Set the maximum number of spans to have in storage at any given time.
 

Field Detail

DEFAULT_MAX_SPANS

static final long DEFAULT_MAX_SPANS
See Also:
Constant Field Values

MILLIS_PER_SECOND

static final long MILLIS_PER_SECOND
See Also:
Constant Field Values

NANOS_PER_SECOND

static final long NANOS_PER_SECOND
See Also:
Constant Field Values
Method Detail

addSpan

void addSpan(Span s)
Add a span.

Parameters:
s -

setMaxSpans

void setMaxSpans(long maxSpans)
Set the maximum number of spans to have in storage at any given time.


getAllSpans

List<Span> getAllSpans()
Return a list of all spans currently stored. For testing.


getSpansInRange

List<Span> getSpansInRange(long start,
                           long end)
Return a list of all spans that fall within the time given range.

Parameters:
start - UNIX time (in nanoseconds) as a long
end - UNIX time (in nanoseconds) as a long


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.