TracePropagatingExecutorService
public
final
class
TracePropagatingExecutorService
extends Object
implements
ExecutorService
| java.lang.Object | |
| ↳ | com.android.tradefed.invoker.tracing.TracePropagatingExecutorService |
トレース コンテキストを伝播しながら、タスクを基盤となる実装に転送するエグゼキュータ サービス。
これにより、送信されたタスクで CloseableTraceScope などのトレース機能を使用できます。
概要
パブリック メソッド | |
|---|---|
boolean
|
awaitTermination(long timeout, TimeUnit unit)
|
static
TracePropagatingExecutorService
|
create(ExecutorService delegate)
指定された委任エグゼキュータに委任する |
void
|
execute(Runnable command)
|
<T>
List<Future<T>>
|
invokeAll(Collection<? extends Callable<T>> tasks)
|
<T>
List<Future<T>>
|
invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
|
<T>
T
|
invokeAny(Collection<? extends Callable<T>> tasks)
|
<T>
T
|
invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
|
boolean
|
isShutdown()
|
boolean
|
isTerminated()
|
void
|
shutdown()
|
List<Runnable>
|
shutdownNow()
|
Future<?>
|
submit(Runnable task)
|
<T>
Future<T>
|
submit(Callable<T> task)
|
<T>
Future<T>
|
submit(Runnable task, T result)
|
保護されたメソッド | |
|---|---|
<T>
Collection<? extends Callable<T>>
|
wrapTasks(Collection<? extends Callable<T>> tasks)
|
パブリック メソッド
awaitTermination
public boolean awaitTermination (long timeout,
TimeUnit unit)| パラメータ | |
|---|---|
timeout |
long |
unit |
TimeUnit |
| 戻り値 | |
|---|---|
boolean |
|
| 例外 | |
|---|---|
InterruptedException |
|
create
public static TracePropagatingExecutorService create (ExecutorService delegate)
指定されたデリゲート エグゼキュータに委任する ExecutorService を作成します。
タスクに伝播されるアクティブなトレースは、エグゼキュータ メソッドの呼び出しでアクティブなトレースです。これは、TF が呼び出しを開始してトレースをアタッチする前に、ほとんどのオブジェクトを構築するためです。
| パラメータ | |
|---|---|
delegate |
ExecutorService |
| 戻り値 | |
|---|---|
TracePropagatingExecutorService |
|
実行
public void execute (Runnable command)
| パラメータ | |
|---|---|
command |
Runnable |
invokeAll
public List<Future<T>> invokeAll (Collection<? extends Callable<T>> tasks)
| パラメータ | |
|---|---|
tasks |
Collection |
| 戻り値 | |
|---|---|
List<Future<T>> |
|
| 例外 | |
|---|---|
InterruptedException |
|
invokeAll
public List<Future<T>> invokeAll (Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)| パラメータ | |
|---|---|
tasks |
Collection |
timeout |
long |
unit |
TimeUnit |
| 戻り値 | |
|---|---|
List<Future<T>> |
|
| 例外 | |
|---|---|
InterruptedException |
|
invokeAny
public T invokeAny (Collection<? extends Callable<T>> tasks)
| パラメータ | |
|---|---|
tasks |
Collection |
| 戻り値 | |
|---|---|
T |
|
| 例外 | |
|---|---|
ExecutionException |
|
InterruptedException |
|
invokeAny
public T invokeAny (Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)| パラメータ | |
|---|---|
tasks |
Collection |
timeout |
long |
unit |
TimeUnit |
| 戻り値 | |
|---|---|
T |
|
| 例外 | |
|---|---|
ExecutionException |
|
InterruptedException |
|
TimeoutException |
|
isShutdown
public boolean isShutdown ()
| 戻り値 | |
|---|---|
boolean |
|
isTerminated
public boolean isTerminated ()
| 戻り値 | |
|---|---|
boolean |
|
shutdown
public void shutdown ()
shutdownNow
public List<Runnable> shutdownNow ()
| 戻り値 | |
|---|---|
List<Runnable> |
|
送信
public Future<?> submit (Runnable task)
| パラメータ | |
|---|---|
task |
Runnable |
| 戻り値 | |
|---|---|
Future<?> |
|
送信
public Future<T> submit (Callable<T> task)
| パラメータ | |
|---|---|
task |
Callable |
| 戻り値 | |
|---|---|
Future<T> |
|
送信
public Future<T> submit (Runnable task,
T result)| パラメータ | |
|---|---|
task |
Runnable |
result |
T |
| 戻り値 | |
|---|---|
Future<T> |
|
保護されたメソッド
wrapTasks
protected Collection<? extends Callable<T>> wrapTasks (Collection<? extends Callable<T>> tasks)
| パラメータ | |
|---|---|
tasks |
Collection |
| 戻り値 | |
|---|---|
Collection<? extends Callable<T>> |
|