-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
126 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
profiler/src/main/java/com/navercorp/pinpoint/profiler/context/AsyncContexts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package com.navercorp.pinpoint.profiler.context; | ||
|
||
import com.navercorp.pinpoint.bootstrap.context.AsyncContext; | ||
import com.navercorp.pinpoint.bootstrap.context.AsyncState; | ||
import com.navercorp.pinpoint.bootstrap.context.Trace; | ||
import com.navercorp.pinpoint.profiler.context.id.LocalTraceRoot; | ||
import com.navercorp.pinpoint.profiler.context.id.TraceRoot; | ||
|
||
/** | ||
* @author Woonduk Kang(emeroad) | ||
*/ | ||
public final class AsyncContexts { | ||
private AsyncContexts() { | ||
} | ||
|
||
private final static Remote remote = new Remote(); | ||
private final static Local local = new Local(); | ||
|
||
public static Remote remote() { | ||
return remote; | ||
} | ||
|
||
public static Local local() { | ||
return local; | ||
} | ||
|
||
public static class Remote { | ||
|
||
public AsyncContext sync(AsyncTraceContext asyncTraceContext, | ||
Binder<Trace> binder, | ||
TraceRoot traceRoot, | ||
AsyncId asyncId, | ||
int asyncMethodApiId) { | ||
return new DefaultAsyncContext(asyncTraceContext, binder, traceRoot, asyncId, asyncMethodApiId, null); | ||
} | ||
|
||
public AsyncContext async(AsyncTraceContext asyncTraceContext, | ||
Binder<Trace> binder, | ||
TraceRoot traceRoot, | ||
AsyncState asyncState, | ||
AsyncId asyncId, | ||
int asyncMethodApiId) { | ||
return new DefaultAsyncContext(asyncTraceContext, binder, traceRoot, asyncId, asyncMethodApiId, asyncState); | ||
} | ||
} | ||
|
||
public static class Local { | ||
|
||
public AsyncContext sync(AsyncTraceContext asyncTraceContext, | ||
Binder<Trace> binder, | ||
LocalTraceRoot traceRoot) { | ||
return new DisableAsyncContext(asyncTraceContext, binder, traceRoot, null); | ||
} | ||
|
||
public AsyncContext async(AsyncTraceContext asyncTraceContext, | ||
Binder<Trace> binder, | ||
LocalTraceRoot traceRoot, | ||
AsyncState asyncState) { | ||
return new DisableAsyncContext(asyncTraceContext, binder, traceRoot, asyncState); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
profiler/src/main/java/com/navercorp/pinpoint/profiler/context/StatefulAsyncContext.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...er/src/main/java/com/navercorp/pinpoint/profiler/context/StatefulDisableAsyncContext.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters