Class GraphThreadPoolExecutor.PhoneyWorker

java.lang.Object
org.testng.internal.thread.graph.GraphThreadPoolExecutor.PhoneyWorker
All Implemented Interfaces:
Comparable<IWorker<T>>, Runnable, IWorker<T>
Enclosing class:
GraphThreadPoolExecutor<T>

private class GraphThreadPoolExecutor.PhoneyWorker extends Object implements IWorker<T>
  • Field Details

    • threadId

      private long threadId
  • Constructor Details

    • PhoneyWorker

      public PhoneyWorker(long threadId)
  • Method Details

    • getTasks

      public List<T> getTasks()
      Specified by:
      getTasks in interface IWorker<T>
      Returns:
      list of tasks this worker is working on.
    • getTimeOut

      public long getTimeOut()
      Specified by:
      getTimeOut in interface IWorker<T>
      Returns:
      the maximum time allowed for the worker to complete the task.
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface IWorker<T>
      Returns:
      the priority of this task.
    • compareTo

      public int compareTo(@Nonnull IWorker<T> o)
      Specified by:
      compareTo in interface Comparable<IWorker<T>>
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getThreadIdToRunOn

      public long getThreadIdToRunOn()
      Specified by:
      getThreadIdToRunOn in interface IWorker<T>