|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JobScheduler
| Method Summary | |
|---|---|
void |
addListener(JobListener l)
Add a Job listener |
List<Job> |
getAllJobs()
Get all the outstanding Jobs |
List<Job> |
getAllJobs(long start,
long finish)
Get all outstanding jobs due to run between start and finish |
String |
getName()
|
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(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(String jobId,
ByteSequence payload,
long delay)
Add a job to be scheduled |
void |
schedule(String jobId,
ByteSequence payload,
String cronEntry)
Add a job to be scheduled |
void |
schedule(String jobId,
ByteSequence payload,
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. |
| Method Detail |
|---|
String getName()
throws Exception
Exception
void startDispatching()
throws Exception
Exception
void stopDispatching()
throws Exception
Exception
void addListener(JobListener l)
throws Exception
l -
Exception
void removeListener(JobListener l)
throws Exception
l -
Exception
void schedule(String jobId,
ByteSequence payload,
long delay)
throws 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 run
Exception
void schedule(String jobId,
ByteSequence payload,
String cronEntry)
throws Exception
jobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduledcronEntry - - cron entry
Exception
void schedule(String jobId,
ByteSequence payload,
String cronEntry,
long delay,
long period,
int repeat)
throws 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 forever
Exception
void remove(long time)
throws Exception
time -
Exception
void remove(String jobId)
throws Exception
jobId -
Exception
void removeAllJobs()
throws Exception
Exception
void removeAllJobs(long start,
long finish)
throws Exception
start - time in millisecondsfinish - time in milliseconds
Exception
long getNextScheduleTime()
throws Exception
Exception
List<Job> getNextScheduleJobs()
throws Exception
Exception
List<Job> getAllJobs()
throws Exception
Exception
List<Job> getAllJobs(long start,
long finish)
throws Exception
start - finish -
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||