Class JobSchedulerView

  • All Implemented Interfaces:
    JobSchedulerViewMBean

    public class JobSchedulerView
    extends Object
    implements JobSchedulerViewMBean
    MBean object that can be used to manage a single instance of a JobScheduler. The object provides methods for querying for jobs and removing some or all of the jobs that are scheduled in the managed store.
    • Constructor Detail

      • JobSchedulerView

        public JobSchedulerView​(JobScheduler jobScheduler)
        Creates a new instance of the JobScheduler management MBean.
        Parameters:
        jobScheduler - The scheduler instance to manage.
    • Method Detail

      • getAllJobs

        public TabularData getAllJobs​(String startTime,
                                      String finishTime)
                               throws Exception
        Description copied from interface: JobSchedulerViewMBean
        Get all outstanding jobs due to run between start and finish time range.
        Specified by:
        getAllJobs in interface JobSchedulerViewMBean
        Parameters:
        startTime - the starting time range to query the store for jobs.
        finishTime - the ending time of this query for scheduled jobs.
        Returns:
        a table of jobs in the range given.
        Throws:
        Exception - if an error occurs while querying the scheduler store.
      • removeAllJobs

        public void removeAllJobs​(String startTime,
                                  String finishTime)
                           throws Exception
        Description copied from interface: JobSchedulerViewMBean
        Remove all the Jobs from the scheduler that are due between the start and finish times.
        Specified by:
        removeAllJobs in interface JobSchedulerViewMBean
        Parameters:
        startTime - the starting time to remove jobs from.
        finishTime - the finish time for the remove operation.
        Throws:
        Exception - if an error occurs while attempting to remove the jobs.
      • removeAllJobsAtScheduledTime

        public void removeAllJobsAtScheduledTime​(String time)
                                          throws Exception
        Description copied from interface: JobSchedulerViewMBean
        Remove all jobs scheduled to run at this time. If there are no jobs scheduled at the given time this methods returns without making any modifications to the scheduler store.
        Specified by:
        removeAllJobsAtScheduledTime in interface JobSchedulerViewMBean
        Parameters:
        time - the string formated time that should be used to remove jobs.
        Throws:
        Exception - if an error occurs while performing the remove.
      • removeJob

        public void removeJob​(String jobId)
                       throws Exception
        Description copied from interface: JobSchedulerViewMBean
        Remove a job with the matching jobId. If the method does not find a matching job then it returns without throwing an error or making any modifications to the job scheduler store.
        Specified by:
        removeJob in interface JobSchedulerViewMBean
        Parameters:
        jobId - the Job Id to remove from the scheduler store.
        Throws:
        Exception - if an error occurs while attempting to remove the Job.