Class BasicJobInfo
java.lang.Object
net.solarnetwork.central.scheduler.BasicJobInfo
- All Implemented Interfaces:
JobInfo
- Direct Known Subclasses:
ScheduledJob
Basic implementation of
JobInfo.- Since:
- 1.37
-
Constructor Summary
ConstructorsConstructorDescriptionBasicJobInfo(String groupId, String id, String executionScheduleDescription) -
Method Summary
Modifier and TypeMethodDescriptionfinal StringGet a description of the execution schedule of the job.final StringGet the group this job belongs to.final StringgetId()Get the ID of this job, unique to the job's group.Get the status of this job.Get the next execution time of the job.Get the previous execution time of the job.booleanFlag indicating the job is currently executing.
-
Constructor Details
-
BasicJobInfo
-
-
Method Details
-
getGroupId
Description copied from interface:JobInfoGet the group this job belongs to.- Specified by:
getGroupIdin interfaceJobInfo- Returns:
- the group ID
-
getId
Description copied from interface:JobInfoGet the ID of this job, unique to the job's group. -
getExecutionScheduleDescription
Description copied from interface:JobInfoGet a description of the execution schedule of the job.The description might be a period like "every 10 minutes" or a cron expression, for example.
- Specified by:
getExecutionScheduleDescriptionin interfaceJobInfo- Returns:
- a description of the execution schedule
-
getJobStatus
Description copied from interface:JobInfoGet the status of this job.- Specified by:
getJobStatusin interfaceJobInfo- Returns:
- the job status
-
isExecuting
public boolean isExecuting()Description copied from interface:JobInfoFlag indicating the job is currently executing.- Specified by:
isExecutingin interfaceJobInfo- Returns:
- true if the job is executing
-
getPreviousExecutionTime
Description copied from interface:JobInfoGet the previous execution time of the job.If the job is currently executing, this value represents the time the job started.
- Specified by:
getPreviousExecutionTimein interfaceJobInfo- Returns:
- the previous execution time, or null if the job has never run before
-
getNextExecutionTime
Description copied from interface:JobInfoGet the next execution time of the job.- Specified by:
getNextExecutionTimein interfaceJobInfo- Returns:
- the next execution time, or null if no more executions are scheduled
-