[유치수] [NOBTS] refactor

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@580 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-09-05 06:06:25 +00:00
parent ac01a697db
commit c4008035e8
11 changed files with 127 additions and 80 deletions
+9 -5
View File
@@ -24,16 +24,20 @@ public class Span {
private final List<HippoAnnotation> annotations = new ArrayList<HippoAnnotation>(5);
private final Set<String> annotationValues = new HashSet<String>(5);
/**
* Cancel timer logic.
* TODO: refactor this.
*/
private TimerTask timerTask;
public void setTimerTask(TimerTask task) {
this.timerTask = task;
}
public boolean cancelTimer() {
return timerTask.cancel();
}
public Span(TraceID traceId, String name, EndPoint endPoint) {
this.traceID = traceId;
this.name = name;
@@ -108,8 +112,8 @@ public class Span {
com.profiler.context.gen.Span span = new com.profiler.context.gen.Span();
span.setTimestamp(createTime);
span.setMostTraceID(traceID.getTraceId().getMostSignificantBits());
span.setLeastTraceID(traceID.getTraceId().getLeastSignificantBits());
span.setMostTraceID(traceID.getId().getMostSignificantBits());
span.setLeastTraceID(traceID.getId().getLeastSignificantBits());
span.setName(name);
span.setSpanID(traceID.getSpanId());
span.setParentSpanId(traceID.getParentSpanId());