Package org.apache.activemq.broker.jmx
Class JobSchedulerView
java.lang.Object
org.apache.activemq.broker.jmx.JobSchedulerView
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionJobSchedulerView(JobScheduler jobScheduler) Creates a new instance of the JobScheduler management MBean. -
Method Summary
Modifier and TypeMethodDescriptionGet all the outstanding Jobs that are scheduled in this scheduler store.getAllJobs(boolean includeDestinationName) Get all the outstanding Jobs that are scheduled in this scheduler store.getAllJobs(String startTime, String finishTime) Get all outstanding jobs due to run between start and finish time range.getAllJobs(String startTime, String finishTime, boolean includeDestinationName) Get all outstanding jobs due to run between start and finish time range.intGet the number of delayed messages.intgetExecutionCount(String jobId) Gets the number of times a scheduled Job has been executed.Get all the jobs scheduled to run next.getNextScheduleJobs(boolean includeDestinationName) Get all the jobs scheduled to run next.Get the next time jobs will be fired from this scheduler store.intGet the number of messages in the scheduler.voidRemove all the Jobs from the scheduler,voidremoveAllJobs(String startTime, String finishTime) Remove all the Jobs from the scheduler that are due between the start and finish times.voidRemove all jobs scheduled to run at this time.voidRemove a job with the matching jobId.
-
Constructor Details
-
JobSchedulerView
Creates a new instance of the JobScheduler management MBean.- Parameters:
jobScheduler- The scheduler instance to manage.
-
-
Method Details
-
getAllJobs
Description copied from interface:JobSchedulerViewMBeanGet all the outstanding Jobs that are scheduled in this scheduler store.- Specified by:
getAllJobsin interfaceJobSchedulerViewMBean- Returns:
- a table of all jobs in this scheduler store.
- Throws:
Exception- if an error occurs while reading the store.
-
getAllJobs
Description copied from interface:JobSchedulerViewMBeanGet all the outstanding Jobs that are scheduled in this scheduler store.- Specified by:
getAllJobsin interfaceJobSchedulerViewMBean- Parameters:
includeDestinationName- include the destination name with the job metadata.- Returns:
- a table of all jobs in this scheduler store.
- Throws:
Exception- if an error occurs while reading the store.
-
getAllJobs
Description copied from interface:JobSchedulerViewMBeanGet all outstanding jobs due to run between start and finish time range.- Specified by:
getAllJobsin interfaceJobSchedulerViewMBean- 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.
-
getAllJobs
public TabularData getAllJobs(String startTime, String finishTime, boolean includeDestinationName) throws Exception Description copied from interface:JobSchedulerViewMBeanGet all outstanding jobs due to run between start and finish time range.- Specified by:
getAllJobsin interfaceJobSchedulerViewMBeanincludeDestinationName- include the destination name with the job metadata.- Returns:
- a table of jobs in the range given.
- Throws:
Exception- if an error occurs while querying the scheduler store.
-
getDelayedMessageCount
Description copied from interface:JobSchedulerViewMBeanGet the number of delayed messages.- Specified by:
getDelayedMessageCountin interfaceJobSchedulerViewMBean- Returns:
- the number of delayed messages.
- Throws:
Exception- if an error occurs while querying the scheduler store.
-
getScheduledMessageCount
Description copied from interface:JobSchedulerViewMBeanGet the number of messages in the scheduler.- Specified by:
getScheduledMessageCountin interfaceJobSchedulerViewMBean- Returns:
- the number of messages in the scheduler.
- Throws:
Exception- if an error occurs while querying the scheduler store.
-
getNextScheduleJobs
Description copied from interface:JobSchedulerViewMBeanGet all the jobs scheduled to run next.- Specified by:
getNextScheduleJobsin interfaceJobSchedulerViewMBean- Returns:
- a list of jobs that will be scheduled next
- Throws:
Exception- if an error occurs while reading the scheduler store.
-
getNextScheduleJobs
Description copied from interface:JobSchedulerViewMBeanGet all the jobs scheduled to run next.- Specified by:
getNextScheduleJobsin interfaceJobSchedulerViewMBean- Parameters:
includeDestinationName- include the destination name with the job metadata.- Returns:
- a list of jobs that will be scheduled next
- Throws:
Exception- if an error occurs while reading the scheduler store.
-
getNextScheduleTime
Description copied from interface:JobSchedulerViewMBeanGet the next time jobs will be fired from this scheduler store.- Specified by:
getNextScheduleTimein interfaceJobSchedulerViewMBean- Returns:
- the time in milliseconds of the next job to execute.
- Throws:
Exception- if an error occurs while accessing the store.
-
removeAllJobs
Description copied from interface:JobSchedulerViewMBeanRemove all the Jobs from the scheduler,- Specified by:
removeAllJobsin interfaceJobSchedulerViewMBean- Throws:
Exception- if an error occurs while purging the store.
-
removeAllJobs
Description copied from interface:JobSchedulerViewMBeanRemove all the Jobs from the scheduler that are due between the start and finish times.- Specified by:
removeAllJobsin interfaceJobSchedulerViewMBean- 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
Description copied from interface:JobSchedulerViewMBeanRemove 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:
removeAllJobsAtScheduledTimein interfaceJobSchedulerViewMBean- Parameters:
time- the string formated time that should be used to remove jobs.- Throws:
Exception- if an error occurs while performing the remove.
-
removeJob
Description copied from interface:JobSchedulerViewMBeanRemove 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:
removeJobin interfaceJobSchedulerViewMBean- Parameters:
jobId- the Job Id to remove from the scheduler store.- Throws:
Exception- if an error occurs while attempting to remove the Job.
-
getExecutionCount
Description copied from interface:JobSchedulerViewMBeanGets the number of times a scheduled Job has been executed.- Specified by:
getExecutionCountin interfaceJobSchedulerViewMBean- Returns:
- the total number of time a scheduled job has executed.
- Throws:
Exception- if an error occurs while querying for the Job.
-