• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.testng.internal.thread.graph;
2 
3 import java.util.List;
4 
5 /**
6  * A runnable object that is used by {@code GraphThreadPoolExecutor} to execute
7  * tasks
8  */
9 public interface IWorker<T> extends Runnable, Comparable<IWorker<T>> {
10 
11   /**
12    * @return list of tasks this worker is working on.
13    */
getTasks()14   List<T> getTasks();
15 
16   /**
17    * @return the maximum time allowed for the worker to complete the task.
18    */
getTimeOut()19   long getTimeOut();
20 
21   /**
22    * @return the priority of this task.
23    */
getPriority()24   int getPriority();
25 }
26