Interface SchedulerManager

All Known Implementing Classes:
SimpleSchedulerManager

public interface SchedulerManager
API for management of the SolarNet scheduler.
Since:
1.37
  • Method Details

    • currentStatus

      SchedulerStatus currentStatus()
      Get the current status of the scheduler.
      Returns:
      the current status
    • updateStatus

      void updateStatus(SchedulerStatus desiredStatus)
      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

      void pauseJob(String groupId, String id)
      Pause a specific job.
      Parameters:
      groupId - the job group ID
      id - the job ID
    • resumeJob

      void resumeJob(String groupId, String id)
      Resume a paused job.
      Parameters:
      groupId - the job group ID
      id - 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 ID
      id - the job ID
      trigger - the desired trigger
      runnable - the job task
      Returns:
      the scheduled future
    • unscheduleJob

      boolean unscheduleJob(String groupId, String id)
      Unschedule a job.
      Parameters:
      groupId - the job group ID
      id - the job ID
      Returns:
      true if a job with matching group ID and ID was successfully unscheduled