Stay organized with collections
Save and categorize content based on your preferences.
TracePropagatingExecutorService
public
final
class
TracePropagatingExecutorService
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.invoker.tracing.TracePropagatingExecutorService
|
An executor service that forwards tasks to an underlying implementation while propagating the
tracing context.
This enables using tracing facilities such as CloseableTraceScope
in submitted tasks.
Summary
Public methods
awaitTermination
public boolean awaitTermination (long timeout,
TimeUnit unit)
Parameters |
timeout |
long |
unit |
TimeUnit |
create
public static TracePropagatingExecutorService create (ExecutorService delegate)
Creates an ERROR(/ExecutorService)
that delegates to the given delegate executor.
Note that the active trace on is that is propagated to tasks is the one active on calls to
the executor method. This is done because TF constructs most objects before starting the
invocation and attaching the trace.
Parameters |
delegate |
ExecutorService |
execute
public void execute (Runnable command)
Parameters |
command |
Runnable |
invokeAll
public invokeAll ( tasks,
long timeout,
TimeUnit unit)
Parameters |
tasks |
|
timeout |
long |
unit |
TimeUnit |
invokeAll
public invokeAll ( tasks)
invokeAny
public T invokeAny ( tasks)
invokeAny
public T invokeAny ( tasks,
long timeout,
TimeUnit unit)
Parameters |
tasks |
|
timeout |
long |
unit |
TimeUnit |
isShutdown
public boolean isShutdown ()
isTerminated
public boolean isTerminated ()
shutdown
public void shutdown ()
shutdownNow
public shutdownNow ()
submit
public submit (Runnable task)
submit
public submit (Runnable task,
T result)
Parameters |
task |
Runnable |
result |
T |
submit
public submit ( task)
Protected methods
wrapTasks
protected wrapTasks ( tasks)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-04-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-28 UTC."],[],[]]