public interface JobScheduler
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(JobListener l)
Add a Job listener
|
java.util.List<Job> |
getAllJobs()
Get all the outstanding Jobs
|
java.util.List<Job> |
getAllJobs(long start,
long finish)
Get all outstanding jobs due to run between start and finish
|
java.lang.String |
getName() |
java.util.List<Job> |
getNextScheduleJobs()
Get all the jobs scheduled to run next
|
long |
getNextScheduleTime()
Get the next time jobs will be fired
|
void |
remove(long time)
remove all jobs scheduled to run at this time
|
void |
remove(java.lang.String jobId)
remove a job with the matching jobId
|
void |
removeAllJobs()
remove all the Jobs from the scheduler
|
void |
removeAllJobs(long start,
long finish)
remove all the Jobs from the scheduler that are due between the start and finish times
|
void |
removeListener(JobListener l)
remove a JobListener
|
void |
schedule(java.lang.String jobId,
ByteSequence payload,
long delay)
Add a job to be scheduled
|
void |
schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry)
Add a job to be scheduled
|
void |
schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry,
long delay,
long period,
int repeat)
Add a job to be scheduled
|
void |
startDispatching()
Starts dispatch of scheduled Jobs to registered listeners.
|
void |
stopDispatching()
Stops dispatching of scheduled Jobs to registered listeners.
|
java.lang.String getName()
throws java.lang.Exception
java.lang.Exceptionvoid startDispatching()
throws java.lang.Exception
java.lang.Exceptionvoid stopDispatching()
throws java.lang.Exception
java.lang.Exceptionvoid addListener(JobListener l) throws java.lang.Exception
l - java.lang.Exceptionvoid removeListener(JobListener l) throws java.lang.Exception
l - java.lang.Exceptionvoid schedule(java.lang.String jobId,
ByteSequence payload,
long delay)
throws java.lang.Exception
jobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduleddelay - the time in milliseconds before the job will be runjava.lang.Exceptionvoid schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry)
throws java.lang.Exception
jobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduledcronEntry - - cron entryjava.lang.Exceptionvoid schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry,
long delay,
long period,
int repeat)
throws java.lang.Exception
jobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduledcronEntry - - cron entrydelay - time in ms to wait before schedulingperiod - the time in milliseconds between successive executions of the Jobrepeat - the number of times to execute the job - less than 0 will be repeated foreverjava.lang.Exceptionvoid remove(long time)
throws java.lang.Exception
time - java.lang.Exceptionvoid remove(java.lang.String jobId)
throws java.lang.Exception
jobId - java.lang.Exceptionvoid removeAllJobs()
throws java.lang.Exception
java.lang.Exceptionvoid removeAllJobs(long start,
long finish)
throws java.lang.Exception
start - time in millisecondsfinish - time in millisecondsjava.lang.Exceptionlong getNextScheduleTime()
throws java.lang.Exception
java.lang.Exceptionjava.util.List<Job> getNextScheduleJobs() throws java.lang.Exception
java.lang.Exceptionjava.util.List<Job> getAllJobs() throws java.lang.Exception
java.lang.Exceptionjava.util.List<Job> getAllJobs(long start, long finish) throws java.lang.Exception
start - finish - java.lang.ExceptionCopyright © 2005-2016 Red Hat, Inc.. All Rights Reserved.