mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 07:24:51 +00:00
Don't use the scheduleAtFixedRate method in our scheduler as we don't really have a need for real time task execution, just use the fixed delay scheduler so that jobs don't stack up. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1174951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2db7cbf436
commit
1453c53105
@ -36,12 +36,12 @@ public final class Scheduler extends ServiceSupport {
|
|||||||
|
|
||||||
public void executePeriodically(final Runnable task, long period) {
|
public void executePeriodically(final Runnable task, long period) {
|
||||||
TimerTask timerTask = new SchedulerTimerTask(task);
|
TimerTask timerTask = new SchedulerTimerTask(task);
|
||||||
timer.scheduleAtFixedRate(timerTask, period, period);
|
timer.schedule(timerTask, period, period);
|
||||||
timerTasks.put(task, timerTask);
|
timerTasks.put(task, timerTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* execute on rough schedual based on termination of last execution. There is no
|
* execute on rough schedule based on termination of last execution. There is no
|
||||||
* compensation (two runs in quick succession) for delays
|
* compensation (two runs in quick succession) for delays
|
||||||
*/
|
*/
|
||||||
public synchronized void schedualPeriodically(final Runnable task, long period) {
|
public synchronized void schedualPeriodically(final Runnable task, long period) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user