Class AbstractScheduledService.CustomScheduler
- java.lang.Object
- 
- com.google.common.util.concurrent.AbstractScheduledService.Scheduler
- 
- com.google.common.util.concurrent.AbstractScheduledService.CustomScheduler
 
 
- 
- Enclosing class:
- AbstractScheduledService
 
 public abstract static class AbstractScheduledService.CustomScheduler extends AbstractScheduledService.Scheduler AAbstractScheduledService.Schedulerthat provides a convenient way for theAbstractScheduledServiceto use a dynamically changing schedule. After every execution of the task, assuming it hasn't been cancelled, thegetNextSchedule()method will be called.- Since:
- 11.0
- Author:
- Luke Sandberg
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classAbstractScheduledService.CustomScheduler.ScheduleA value object that represents an absolute delay until a task should be invoked.
 - 
Constructor SummaryConstructors Constructor Description CustomScheduler()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract AbstractScheduledService.CustomScheduler.SchedulegetNextSchedule()Calculates the time at which to next invoke the task.- 
Methods inherited from class com.google.common.util.concurrent.AbstractScheduledService.SchedulernewFixedDelaySchedule, newFixedDelaySchedule, newFixedRateSchedule, newFixedRateSchedule
 
- 
 
- 
- 
- 
Constructor Detail- 
CustomSchedulerpublic CustomScheduler() 
 
- 
 - 
Method Detail- 
getNextScheduleprotected 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
 
 
- 
 
-