Package org.testng.internal.thread.graph
Class TestNGFutureTask<T>
- All Implemented Interfaces:
Comparable<IWorker<T>>
,Runnable
,Future<IWorker<T>>
,RunnableFuture<IWorker<T>>
,IWorker<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorsConstructorDescriptionTestNGFutureTask
(IWorker<T> worker, BiConsumer<IWorker<T>, Throwable> callback) -
Method Summary
Methods inherited from class java.util.concurrent.FutureTask
cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, runAndReset, set, setException, state, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.testng.thread.IWorker
completed, getCurrentThreadId, getThreadIdToRunOn, setThreadIdToRunOn
-
Constructor Details
-
TestNGFutureTask
-
-
Method Details
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<T>
- Overrides:
run
in classFutureTask<IWorker<T>>
-
done
protected void done()- Overrides:
done
in classFutureTask<IWorker<T>>
-
getTasks
-
getTimeOut
public long getTimeOut()- Specified by:
getTimeOut
in interfaceIWorker<T>
- Returns:
- the maximum time allowed for the worker to complete the task.
-
getPriority
public int getPriority()- Specified by:
getPriority
in interfaceIWorker<T>
- Returns:
- the priority of this task.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-