Interface Task<T>

Type Parameters:
T - Generic of type "T" is explicitly defined at compile-time.
  Example:
      public class TaskImplementor<T> implements Task<T>{ }
All Superinterfaces:
java.lang.Runnable
All Known Subinterfaces:
SerializableTask<T>
All Known Implementing Classes:
AbstractTask, BasicTask, MethodBlockingTask, ObjectBlockingTask, RetrievableTask, StandardNonRetrievableTask

public interface Task<T>
extends java.lang.Runnable
A concrete Task is an object which has the ability to be wrapped inside of a Thread - in the same manner as a Runnable for multiple thread execution. The advantage to use a Task however, lies with with its extended capabilities from that of a Runnable. For example, an ObjectBlockingTask handles blocking and synchronization for objects in contention. As such, downstream consumers of Tasks are easily able to integrate multithreading into their own applications, without worrying about race conditions.
Author:
Neal Kumar
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getName()  
    int getPriority()  
    long getThreadId()  
    void setName​(java.lang.String name)
    Sets the name of the Task.
    void setPriority​(int priority)  

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • getName

      java.lang.String getName()
      Returns:
      Returns the String name of the Task.
    • setName

      void setName​(java.lang.String name)
      Sets the name of the Task.
      Parameters:
      name - - the String "name" for the Task.
    • getThreadId

      long getThreadId()
      Returns:
      Returns the long id of the Task's Thread.
    • setPriority

      void setPriority​(int priority)
    • getPriority

      int getPriority()