public Future<?> scheduleWithFixedDelay(Runnable work, long initial_delay, long delay, TimeUnit unit, boolean can_block) { return scheduleRecurring(work, TaskType.fixed_delay, initial_delay, delay, unit, can_block); }
public Future<?> scheduleAtFixedRate(Runnable work, long initial_delay, long delay, TimeUnit unit, boolean can_block) { return scheduleRecurring(work,TaskType.fixed_rate,initial_delay,delay,unit, can_block); }
/** * Schedule a task for execution at varying intervals. After execution, the task will get rescheduled after * {@link org.jgroups.util.TimeScheduler.Task#nextInterval()} milliseconds. The task is never done until * nextInterval() returns a value <= 0 or the task is cancelled.<p/> * Note that the task is rescheduled relative to the last time is actually executed. This is similar to * {@link #scheduleWithFixedDelay(Runnable,long,long,java.util.concurrent.TimeUnit)}. * @param work the task to execute */ public Future<?> scheduleWithDynamicInterval(TimeScheduler.Task work, boolean can_block) { return scheduleRecurring(work, TaskType.dynamic, work.nextInterval(), 0, TimeUnit.MILLISECONDS, can_block); }
public Future<?> scheduleWithFixedDelay(Runnable work, long initial_delay, long delay, TimeUnit unit, boolean can_block) { return scheduleRecurring(work, TaskType.fixed_delay, initial_delay, delay, unit, can_block); }
public Future<?> scheduleAtFixedRate(Runnable work, long initial_delay, long delay, TimeUnit unit, boolean can_block) { return scheduleRecurring(work,TaskType.fixed_rate,initial_delay,delay,unit, can_block); }
/** * Schedule a task for execution at varying intervals. After execution, the task will get rescheduled after * {@link org.jgroups.util.TimeScheduler.Task#nextInterval()} milliseconds. The task is never done until * nextInterval() returns a value <= 0 or the task is cancelled.<p/> * Note that the task is rescheduled relative to the last time is actually executed. This is similar to * {@link #scheduleWithFixedDelay(Runnable,long,long,java.util.concurrent.TimeUnit)}. * @param work the task to execute */ public Future<?> scheduleWithDynamicInterval(TimeScheduler.Task work, boolean can_block) { return scheduleRecurring(work, TaskType.dynamic, work.nextInterval(), 0, TimeUnit.MILLISECONDS, can_block); }