Class GraphThreadPoolExecutor.PhoneyWorker

  • All Implemented Interfaces:
    java.lang.Comparable<IWorker<T>>, java.lang.Runnable, IWorker<T>
    Enclosing class:
    GraphThreadPoolExecutor<T>

    private class GraphThreadPoolExecutor.PhoneyWorker
    extends java.lang.Object
    implements IWorker<T>
    • Field Detail

      • threadId

        private long threadId
    • Constructor Detail

      • PhoneyWorker

        public PhoneyWorker​(long threadId)
    • Method Detail

      • getTasks

        public java.util.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 java.lang.Comparable<IWorker<T>>
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable