com.google.common.util.concurrent
Class AbstractScheduledService.CustomScheduler
java.lang.Object
com.google.common.util.concurrent.AbstractScheduledService.Scheduler
com.google.common.util.concurrent.AbstractScheduledService.CustomScheduler
- Enclosing class:
- AbstractScheduledService
@Beta
public abstract static class AbstractScheduledService.CustomScheduler
- extends AbstractScheduledService.Scheduler
A AbstractScheduledService.Scheduler that provides a convenient way for the AbstractScheduledService to
use a dynamically changing schedule. After every execution of the task, assuming it hasn't
been cancelled, the getNextSchedule() method will be called.
- Since:
- 11.0
- Author:
- Luke Sandberg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractScheduledService.CustomScheduler
public AbstractScheduledService.CustomScheduler()
getNextSchedule
protected abstract AbstractScheduledService.CustomScheduler.Schedule getNextSchedule()
throws Exception
- Calculates the time at which to next invoke the task.
This is guaranteed to be called immediately after the task has completed an iteration and
on the same thread as the previous execution of AbstractScheduledService.runOneIteration().
- Returns:
- a schedule that defines the delay before the next execution.
- Throws:
Exception
Copyright © 2010-2011. All Rights Reserved.