Interface SchedulerManager
- All Known Implementing Classes:
SimpleSchedulerManager
public interface SchedulerManager
API for management of the SolarNet scheduler.
- Since:
- 1.37
-
Method Summary
Modifier and TypeMethodDescriptionGet a collection of all available scheduled jobs.Get the current status of the scheduler.voidPause a specific job.voidResume a paused job.scheduleJob(String groupId, String id, Runnable task, org.springframework.scheduling.Trigger trigger) Schedule a job.booleanunscheduleJob(String groupId, String id) Unschedule a job.voidupdateStatus(SchedulerStatus desiredStatus) Change the status of the scheduler.
-
Method Details
-
currentStatus
SchedulerStatus currentStatus()Get the current status of the scheduler.- Returns:
- the current status
-
updateStatus
Change the status of the scheduler.- Parameters:
desiredStatus- the desired status to set
-
allJobInfos
Collection<JobInfo> allJobInfos()Get a collection of all available scheduled jobs.- Returns:
- the collection of jobs; never null
-
pauseJob
Pause a specific job.- Parameters:
groupId- the job group IDid- the job ID
-
resumeJob
Resume a paused job.- Parameters:
groupId- the job group IDid- the job ID
-
scheduleJob
ScheduledFuture<?> scheduleJob(String groupId, String id, Runnable task, org.springframework.scheduling.Trigger trigger) Schedule a job.If a job with the same group ID and ID has previously been scheduled, it will be re-scheduled using the given trigger.
- Parameters:
groupId- the job group IDid- the job IDtrigger- the desired triggerrunnable- the job task- Returns:
- the scheduled future
-
unscheduleJob
Unschedule a job.- Parameters:
groupId- the job group IDid- the job ID- Returns:
- true if a job with matching group ID and ID was successfully unscheduled
-