|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.scheduling.QuartzSchedulingService
public class QuartzSchedulingService
Scheduling service that uses Quartz as backend.
Field Summary | |
---|---|
protected SchedulerFactory |
factory
Creates schedulers. |
protected String |
instanceId
Instance id |
protected AtomicLong |
jobDetailCounter
Number of job details |
protected Scheduler |
scheduler
Service scheduler |
Fields inherited from interface org.red5.server.api.scheduling.ISchedulingService |
---|
BEAN_NAME |
Constructor Summary | |
---|---|
QuartzSchedulingService()
|
Method Summary | |
---|---|
String |
addScheduledJob(int interval,
IScheduledJob job)
Schedule a job for periodic execution. |
String |
addScheduledJobAfterDelay(int interval,
IScheduledJob job,
int delay)
Schedule a job for periodic execution which will start after the specifed delay. |
String |
addScheduledOnceJob(Date date,
IScheduledJob job)
Schedule a job for single execution at a given date. |
String |
addScheduledOnceJob(long timeDelta,
IScheduledJob job)
Schedule a job for single execution in the future. |
void |
afterPropertiesSet()
Constructs a new QuartzSchedulingService. |
void |
destroy()
|
String |
getJobName()
Getter for job name. |
List<String> |
getScheduledJobNames()
Return names of scheduled jobs. |
void |
pauseScheduledJob(String name)
Pauses the trigger which initiates job execution. |
void |
pauseScheduledTrigger(String name)
|
void |
registerJMX()
|
void |
removeScheduledJob(String name)
Stop executing a previously scheduled job. |
void |
resumeScheduledJob(String name)
Resumes the trigger which initiates job execution. |
void |
resumeScheduledTrigger(String name)
|
void |
setFactory(SchedulerFactory factory)
|
void |
setInstanceId(String instanceId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AtomicLong jobDetailCounter
protected SchedulerFactory factory
protected Scheduler scheduler
protected String instanceId
Constructor Detail |
---|
public QuartzSchedulingService()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void setFactory(SchedulerFactory factory)
public void setInstanceId(String instanceId)
public void registerJMX()
public String addScheduledJob(int interval, IScheduledJob job)
addScheduledJob
in interface ISchedulingService
interval
- time in milliseconds between two notifications of the jobjob
- the job to trigger periodically
public String addScheduledOnceJob(Date date, IScheduledJob job)
addScheduledOnceJob
in interface ISchedulingService
date
- date when the job should be executedjob
- the job to trigger
public String addScheduledOnceJob(long timeDelta, IScheduledJob job)
addScheduledOnceJob
in interface ISchedulingService
timeDelta
- time delta in milliseconds from the current datejob
- the job to trigger
public String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay)
addScheduledJobAfterDelay
in interface ISchedulingService
interval
- time in milliseconds between two notifications of the jobjob
- the job to trigger periodicallydelay
- time in milliseconds to pass before first execution.
public String getJobName()
getJobName
in interface QuartzSchedulingServiceMBean
public List<String> getScheduledJobNames()
getScheduledJobNames
in interface ISchedulingService
getScheduledJobNames
in interface QuartzSchedulingServiceMBean
public void pauseScheduledJob(String name)
pauseScheduledJob
in interface ISchedulingService
name
- name of the job to stoppublic void resumeScheduledJob(String name)
resumeScheduledJob
in interface ISchedulingService
name
- name of the job to stoppublic void pauseScheduledTrigger(String name)
public void resumeScheduledTrigger(String name)
public void removeScheduledJob(String name)
removeScheduledJob
in interface ISchedulingService
removeScheduledJob
in interface QuartzSchedulingServiceMBean
name
- name of the job to stoppublic void destroy() throws Exception
destroy
in interface DisposableBean
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |