Interface TaskRegistry

All Known Implementing Classes:
TaskRegister

public interface TaskRegistry
A TaskRegistry is an interface specifying the requirements for a "register" or collection of Tasks.
Author:
nealk
See Also:
TaskRegister
  • Method Details

    • offer

      void offer​(Task<?> task)
      Inserts the specified element into this TaskRegistry. On average, the performance runtime of this method is O(1).
      Parameters:
      task - - The Task to be inserted.
      See Also:
      TaskRegister.offer(Task)
    • offer

      void offer​(Task<?>... tasks)
      Inserts the specified element into this TaskRegistry. This is the varargs implementation of offer(Task), meaning that it handles all instances where there are either 0 or >1 parameter arguments present.
      Parameters:
      tasks - - The set of zero or more Task to be inserted into this registry.
    • remove

      boolean remove​(Task<?> task)
      Removes a single instance of the specified Task from this TaskRegistry, if it is present. More formally, removes a Task task such that task is no longer present in the TaskRegistry if this TaskRegistry contains one or more such elements.
      Parameters:
      task - - The Task to be removed.
      Returns:
    • getRegistrySize

      int getRegistrySize()
    • pollTask

      Task<?> pollTask()
    • interruptAll

      void interruptAll()