Package org.testng.thread
Interface IWorker<T>
-
- All Superinterfaces:
java.lang.Comparable<IWorker<T>>
,java.lang.Runnable
- All Known Implementing Classes:
SuiteRunnerWorker
public interface IWorker<T> extends java.lang.Runnable, java.lang.Comparable<IWorker<T>>
A runnable object that is used byGraphThreadPoolExecutor
to execute tasks
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
completed()
default long
getCurrentThreadId()
int
getPriority()
java.util.List<T>
getTasks()
default long
getThreadIdToRunOn()
long
getTimeOut()
default void
setThreadIdToRunOn(long threadIdToRunOn)
-
-
-
Method Detail
-
getTasks
java.util.List<T> getTasks()
- Returns:
- list of tasks this worker is working on.
-
getTimeOut
long getTimeOut()
- Returns:
- the maximum time allowed for the worker to complete the task.
-
getPriority
int getPriority()
- Returns:
- the priority of this task.
-
getCurrentThreadId
default long getCurrentThreadId()
-
setThreadIdToRunOn
default void setThreadIdToRunOn(long threadIdToRunOn)
-
getThreadIdToRunOn
default long getThreadIdToRunOn()
-
completed
default boolean completed()
-
-