package org.testng.internal.thread.graph;

import java.util.List;

A runnable object that is used by GraphThreadPoolExecutor to execute tasks
/** * A runnable object that is used by {@code GraphThreadPoolExecutor} to execute * tasks */
public interface IWorker<T> extends Runnable, Comparable<IWorker<T>> {
Returns:list of tasks this worker is working on.
/** * @return list of tasks this worker is working on. */
List<T> getTasks();
Returns:the maximum time allowed for the worker to complete the task.
/** * @return the maximum time allowed for the worker to complete the task. */
long getTimeOut();
Returns:the priority of this task.
/** * @return the priority of this task. */
int getPriority(); }