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 Future
Future.State -
Constructor Summary
ConstructorsConstructorDescriptionTestNGFutureTask(IWorker<T> worker, BiConsumer<IWorker<T>, Throwable> callback) -
Method Summary
Methods inherited from class FutureTask
cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, runAndReset, set, setException, state, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IWorker
completed, getCurrentThreadId, getThreadIdToRunOn, setThreadIdToRunOn
-
Constructor Details
-
TestNGFutureTask
-
-
Method Details
-
run
public void run()- Specified by:
runin interfaceRunnable- Specified by:
runin interfaceRunnableFuture<T>- Overrides:
runin classFutureTask<IWorker<T>>
-
done
protected void done()- Overrides:
donein classFutureTask<IWorker<T>>
-
getTasks
-
getTimeOut
public long getTimeOut()- Specified by:
getTimeOutin interfaceIWorker<T>- Returns:
- the maximum time allowed for the worker to complete the task.
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceIWorker<T>- Returns:
- the priority of this task.
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-