Interface Job

All Superinterfaces:
Entity, NamedResource, Resource, Serializable

public interface Job extends NamedResource
Represents a job

Job is a single atomic task that is to be performed asynchronously.

  • Method Details

    • getType

      String getType()
      Returns the type of the job.
      Returns:
      the type of the job
    • getUserId

      UUID getUserId()
      Returns the UUID of the user that initiated this job.
      Returns:
      the UUID of the user
    • getProgressPercentage

      double getProgressPercentage()
      Returns the progress percentage of the job.
      Returns:
      the progress percentage of the job
    • getStartDate

      Long getStartDate()
      Returns the start date of the job.
      Returns:
      the start date
    • getEndDate

      Long getEndDate()
      Returns the end date of the job.
      Returns:
      the end date
    • getState

      JobState getState()
      Returns the state of the job.
      Returns:
      the state of the job
    • getMessage

      String getMessage()
      Returns the message of the job.
      Returns:
      the message of the job
    • isFinished

      boolean isFinished()
      Returns whether given job has already finished processing or is still running.
      Returns:
      whether given job has already finished processing or is still running
    • getResult

      JobResult getResult()
      Returns the result of the job.
      Returns:
      the result of the job
    • setName

      void setName(String name)
      Sets the name of the job.
      Parameters:
      name - the name of the job