Interface Job
- All Superinterfaces:
Entity
,NamedResource
,Resource
,Serializable
Represents a job
Job is a single atomic task that is to be performed asynchronously.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the end date of the job.Returns the message of the job.double
Returns the progress percentage of the job.Returns the result of the job.Returns the start date of the job.getState()
Returns the state of the job.getType()
Returns the type of the job.Returns the UUID of the user that initiated this job.boolean
Returns whether given job has already finished processing or is still running.void
Sets the name of the job.Methods inherited from interface NamedResource
getName
Methods inherited from interface Resource
getCreatedBy, getCreatedOn, getLastModifiedBy, getLastModifiedOn, getResourceType, isSystem
-
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
Sets the name of the job.- Parameters:
name
- the name of the job
-