mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-24 04:06:34 +10:00
[강운덕] [LUCYSUS-1744] arcus asynctrace부분 개발
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@856 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -10,22 +10,24 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class GlobalCallTrace<T> {
|
||||
public class GlobalCallTrace {
|
||||
private static AtomicInteger timerId = new AtomicInteger(0);
|
||||
|
||||
private ConcurrentMap<Integer, T> trace = new ConcurrentHashMap<Integer, T>(32);
|
||||
private ConcurrentMap<Integer, AsyncTrace> trace = new ConcurrentHashMap<Integer, AsyncTrace>(32);
|
||||
private AtomicInteger idGenerator = new AtomicInteger(0);
|
||||
private DataSender dataSender;
|
||||
|
||||
private Timer timer = new Timer("GlobalCallTrace-Timer-" + timerId.getAndIncrement(), true);
|
||||
|
||||
public int registerTraceObject(T target) {
|
||||
public int registerTraceObject(AsyncTrace target) {
|
||||
// datasender쪽 전달부분이 영 별로임.
|
||||
target.setDataSender(this.dataSender);
|
||||
int id = idGenerator.getAndIncrement();
|
||||
trace.put(id, target);
|
||||
return id;
|
||||
}
|
||||
|
||||
public T removeTraceObject(int id) {
|
||||
public AsyncTrace removeTraceObject(int id) {
|
||||
return trace.get(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user