@ParametersAreNonnullByDefault public final class ProfiledExecutionContextFactory extends Object implements ExecutionContextFactory<ExecutionContext>
Constructor and Description |
---|
ProfiledExecutionContextFactory(ExecutionContextFactory<ExecutionContext> wrapped) |
Modifier and Type | Method and Description |
---|---|
Iterable<Map.Entry<Thread,ExecutionContext>> |
getCurrentThreadContexts() |
Iterable<Thread> |
getCurrentThreads() |
ExecutionContext |
start(String name,
ExecutionContext parent,
long startTimeNanos,
long deadlineNanos,
Runnable onClose)
Create a ExecutionContext.
|
ExecutionContext |
startThreadRoot(String name,
ExecutionContext parent,
long startTimeNanos,
long deadlineNanos,
Runnable onClose) |
String |
toString() |
public ProfiledExecutionContextFactory(ExecutionContextFactory<ExecutionContext> wrapped)
public Iterable<Map.Entry<Thread,ExecutionContext>> getCurrentThreadContexts()
public ExecutionContext start(String name, @Nullable ExecutionContext parent, long startTimeNanos, long deadlineNanos, Runnable onClose)
ExecutionContextFactory
start
in interface ExecutionContextFactory<ExecutionContext>
name
- name of the context.parent
- parent execution context. (null if this is root)deadlineNanos
- the deadline of the context.onClose
- a callback that needs to be executed when context is closed.public ExecutionContext startThreadRoot(String name, @Nullable ExecutionContext parent, long startTimeNanos, long deadlineNanos, Runnable onClose)
startThreadRoot
in interface ExecutionContextFactory<ExecutionContext>
Copyright © 2018 SPF4J. All rights reserved.