Class LoadManagingExecutionService.Task

  • All Implemented Interfaces:
    java.lang.Comparable, java.lang.Runnable
    Enclosing class:
    LoadManagingExecutionService

    public class LoadManagingExecutionService.Task
    extends java.lang.Object
    implements java.lang.Runnable, java.lang.Comparable
    A task info holds a task and meta information.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IExecutable executable
      The task.
      protected double priority
      The priority.
      protected int seqnr
      The sequence number.
    • Constructor Summary

      Constructors 
      Constructor Description
      Task​(IExecutable task, double priority)
      Create a new task info for a given task.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object obj)
      Return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      void run()
      Perform the task once and notify the manager.
      java.lang.String toString()
      Create a string representation of the task info.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • executable

        protected IExecutable executable
        The task.
      • priority

        protected double priority
        The priority.
      • seqnr

        protected int seqnr
        The sequence number.
    • Constructor Detail

      • Task

        public Task​(IExecutable task,
                    double priority)
        Create a new task info for a given task.
    • Method Detail

      • run

        public void run()
        Perform the task once and notify the manager.
        Specified by:
        run in interface java.lang.Runnable
      • compareTo

        public int compareTo​(java.lang.Object obj)
        Return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Specified by:
        compareTo in interface java.lang.Comparable
      • toString

        public java.lang.String toString()
        Create a string representation of the task info.
        Overrides:
        toString in class java.lang.Object