public class InMemorySpanStorage extends Object implements SpanStorage
Modifier and Type | Field and Description |
---|---|
protected LinkedList<Span> |
spans |
MILLIS_PER_SECOND, NANOS_PER_SECOND
Constructor and Description |
---|
InMemorySpanStorage() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected LinkedList<Span> spans
public void addSpan(Span s)
SpanStorage
addSpan
in interface SpanStorage
public void setMaxSpans(long maxSpans)
SpanStorage
setMaxSpans
in interface SpanStorage
public List<Span> getAllSpans()
SpanStorage
getAllSpans
in interface SpanStorage
public List<Span> getSpansInRange(long start, long end)
SpanStorage
getSpansInRange
in interface SpanStorage
start
- UNIX time (in nanoseconds) as a longend
- UNIX time (in nanoseconds) as a longCopyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.