org.htrace
Class TraceTree
java.lang.Object
org.htrace.TraceTree
public class TraceTree
- extends Object
Used to create the graph formed by spans.
|
Field Summary |
static org.apache.commons.logging.Log |
LOG
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
TraceTree
public TraceTree(Collection<Span> spans)
- Create a new TraceTree
- Parameters:
spans - The collection of spans to use to create this TraceTree. Should
have at least one root span (span with parentId =
Span.ROOT_SPAN_ID
getSpans
public Collection<Span> getSpans()
- Returns:
- The collection of spans given to this TraceTree at construction.
getSpansByParentIdMap
public com.google.common.collect.Multimap<Long,Span> getSpansByParentIdMap()
- Returns:
- A copy of the MultiMap from parent span ID -> children of span with
that ID.
getRoots
public Collection<Span> getRoots()
- Returns:
- A collection of the root spans (spans with parent ID =
Span.ROOT_SPAN_ID) in this tree.
getSpansByPidMap
public com.google.common.collect.Multimap<String,Span> getSpansByPidMap()
- Returns:
- A copy of the Multimap from String process ID -> spans with that
process ID. If process ID was not set in Trace.java, all spans will
have empty string process IDs.
Copyright © 2014. All Rights Reserved.