|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.htrace.impl.MilliSpan
public class MilliSpan
A Span implementation that stores its information in milliseconds since the epoch.
| Field Summary |
|---|
| Fields inherited from interface org.htrace.Span |
|---|
ROOT_SPAN_ID |
| Constructor Summary | |
|---|---|
MilliSpan(String description,
long traceId,
long parentSpanId,
long spanId,
String processId)
|
|
| Method Summary | |
|---|---|
void |
addKVAnnotation(byte[] key,
byte[] value)
Add a data annotation associated with this span |
void |
addTimelineAnnotation(String msg)
Add a timeline annotation associated with this span |
Span |
child(String description)
Create a child span of this span with the given description |
protected long |
currentTimeMillis()
|
long |
getAccumulatedMillis()
Return the total amount of time elapsed since start was called, if running, or difference between stop and start |
String |
getDescription()
Return a textual description of this span |
Map<byte[],byte[]> |
getKVAnnotations()
Get data associated with this span (read only) |
long |
getParentId()
Return the pseudo-unique (random) number of the parent span, returns ROOT_SPAN_ID if this is the root span |
String |
getProcessId()
Return a unique id for the node or process from which this Span originated. |
long |
getSpanId()
A pseudo-unique (random) number assigned to this span instance |
long |
getStartTimeMillis()
Get the start time, in milliseconds |
long |
getStopTimeMillis()
Get the stop time, in milliseconds |
List<TimelineAnnotation> |
getTimelineAnnotations()
Get any timeline annotations (read only) |
long |
getTraceId()
A pseudo-unique (random) number assigned to the trace associated with this span |
boolean |
isRunning()
Has the span been started and not yet stopped? |
void |
stop()
The block has completed, stop the clock |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MilliSpan(String description,
long traceId,
long parentSpanId,
long spanId,
String processId)
| Method Detail |
|---|
public Span child(String description)
Span
child in interface Spanpublic void stop()
Span
stop in interface Spanprotected long currentTimeMillis()
public boolean isRunning()
Span
isRunning in interface Spanpublic long getAccumulatedMillis()
Span
getAccumulatedMillis in interface Spanpublic String toString()
toString in interface SpantoString in class Objectpublic String getDescription()
Span
getDescription in interface Spanpublic long getSpanId()
Span
getSpanId in interface Spanpublic long getParentId()
Span
getParentId in interface Spanpublic long getTraceId()
Span
getTraceId in interface Spanpublic long getStartTimeMillis()
Span
getStartTimeMillis in interface Spanpublic long getStopTimeMillis()
Span
getStopTimeMillis in interface Span
public void addKVAnnotation(byte[] key,
byte[] value)
Span
addKVAnnotation in interface Spanpublic void addTimelineAnnotation(String msg)
Span
addTimelineAnnotation in interface Spanpublic Map<byte[],byte[]> getKVAnnotations()
Span
getKVAnnotations in interface Spanpublic List<TimelineAnnotation> getTimelineAnnotations()
Span
getTimelineAnnotations in interface Spanpublic String getProcessId()
Span
getProcessId in interface Span
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||