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)

지정된 위임 실행기에 위임하는 ExecutorService를 만듭니다.

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

execute

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>>