TracePropagatingExecutorService

public final class TracePropagatingExecutorService
extends Object implements ExecutorService

java.lang.Object
   ↳ com.android.tradefed.invoker.tracing.TracePropagatingExecutorService


שירות לביצוע משימות שמעביר משימות להטמעה בסיסית תוך הפצת הקשר של המעקב.

כך אפשר להשתמש בכלי מעקב כמו CloseableTraceScope במשימות שנשלחות.

סיכום

‫methods ציבוריים

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)

‫methods ציבוריים

awaitTermination

public boolean awaitTermination (long timeout, 
                TimeUnit unit)

פרמטרים
timeout long

unit TimeUnit

החזרות
boolean

הקפצת הודעות שגיאה (throw)
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>>

הקפצת הודעות שגיאה (throw)
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>>

הקפצת הודעות שגיאה (throw)
InterruptedException

invokeAny

public T invokeAny (Collection<? extends Callable<T>> tasks)

פרמטרים
tasks Collection

החזרות
T

הקפצת הודעות שגיאה (throw)
ExecutionException
InterruptedException

invokeAny

public T invokeAny (Collection<? extends Callable<T>> tasks, 
                long timeout, 
                TimeUnit unit)

פרמטרים
tasks Collection

timeout long

unit TimeUnit

החזרות
T

הקפצת הודעות שגיאה (throw)
ExecutionException
InterruptedException
TimeoutException

isShutdown

public boolean isShutdown ()

החזרות
boolean

isTerminated

public boolean isTerminated ()

החזרות
boolean

כיבוי

public void shutdown ()

shutdownNow

public List<Runnable> shutdownNow ()

החזרות
List<Runnable>

submit

public Future<?> submit (Runnable task)

פרמטרים
task Runnable

החזרות
Future<?>

submit

public Future<T> submit (Callable<T> task)

פרמטרים
task Callable

החזרות
Future<T>

submit

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