Interface Task

  • All Superinterfaces:
    java.io.Serializable, SerializableObject
    All Known Implementing Classes:
    TaskEnd, TaskGettingResult, TaskStart

    public interface Task
    extends SerializableObject
    The Task interface represents a task in a distributed computing or data processing system.

    This interface extends the SerializableObject interface and defines the methods that should be implemented by a task in order to properly function in such a system.

    The Task interface provides methods for setting and getting various properties of a task, including its ID, status, and execution metrics.

    The Task interface also includes an enum for representing the status of a task while it is running.

    Author:
    [Adeel Aslam]
    • Method Detail

      • setEventame

        void setEventame​(java.lang.String name)
        Sets the name of the event associated with this task.
        Parameters:
        name - the name of the event
      • getEventName

        java.lang.String getEventName()
        Gets the name of the event associated with this task.
        Returns:
        the name of the event
      • setID

        void setID​(java.lang.String id)
        Sets the ID of this task.
        Parameters:
        id - the task ID
      • getID

        java.lang.String getID()
        Gets the ID of this task.
        Returns:
        the task ID
      • setHostIP

        void setHostIP​(java.lang.String Ip)
        Sets the IP address of the host machine executing this task.
        Parameters:
        Ip - the IP address of the host machine
      • getHostIP

        java.lang.String getHostIP()
        Gets the IP address of the host machine executing this task.
        Returns:
        the IP address of the host machine
      • setTaskID

        void setTaskID​(long taskId)
        Sets the ID of this task.
        Parameters:
        taskId - the ID of this task
      • setStageID

        void setStageID​(int id)
        Sets the ID of the stage to which this task belongs.
        Parameters:
        id - the ID of the stage to which this task belongs
      • getStageID

        int getStageID()
        Returns the ID of the stage to which this task belongs.
        Returns:
        the ID of the stage to which this task belongs
      • getTaskID

        long getTaskID()
        Returns the ID of this task.
        Returns:
        the ID of this task
      • setStringExecutorID

        void setStringExecutorID​(java.lang.String executorID)
        Sets the ID of the executor assigned to this task.
        Parameters:
        executorID - the ID of the executor assigned to this task
      • getExecutorID

        java.lang.String getExecutorID()
        Returns the ID of the executor assigned to this task.
        Returns:
        the ID of the executor assigned to this task
      • setTaskStatus

        void setTaskStatus​(java.lang.String status)
        Sets the status of this task.
        Parameters:
        status - the status of this task
      • getTaskStatus

        java.lang.String getTaskStatus()
        Returns the status of this task.
        Returns:
        the status of this task
      • setIndex

        void setIndex​(int index)
        Sets the index of this task.
        Parameters:
        index - the index of this task
      • getIndex

        int getIndex()
        Returns the index of this task.
        Returns:
        the index of this task
      • setPartition

        void setPartition​(int partition)
        Sets the partition of this task.
        Parameters:
        partition - the partition of this task
      • getPartition

        int getPartition()
        Returns the partition of this task.
        Returns:
        the partition of this task
      • setLaunchTime

        void setLaunchTime​(long time)
        Sets the launch time of this task.
        Parameters:
        time - the launch time of this task
      • getLaunchTime

        long getLaunchTime()
        Returns the launch time of this task.
        Returns:
        the launch time of this task
      • setFinishTime

        void setFinishTime​(long time)
        Sets the finish time of this task.
        Parameters:
        time - the finish time of this task
      • getFinishTime

        long getFinishTime()
        Returns the finish time of this task.
        Returns:
        the finish time of this task
      • setGettingTime

        void setGettingTime​(long time)
        Sets the getting time of this task.
        Parameters:
        time - the getting time of this task
      • getGettingTime

        long getGettingTime()
        Returns the getting time of this task.
        Returns:
        the getting time of this task
      • setDurationTime

        void setDurationTime​(long time)
        Sets the duration time of this task.
        Parameters:
        time - the duration time of this task
      • getDurationTime

        long getDurationTime()
        Returns the duration time of this task.
        Returns:
        the duration time of this task
      • setTaskStatus

        void setTaskStatus​(boolean status)
        Sets the status of this task.
        Parameters:
        status - the status of this task
      • getTaskSatus

        boolean getTaskSatus()
        Returns the status of this task.
        Returns:
        the status of this task
      • setTaskMetric

        void setTaskMetric​(TaskMetric taskMetric)
        Sets the TaskMetric associated with this task.
        Parameters:
        taskMetric - the TaskMetric to be set for the task