javadoc.com.google.common.util.concurrent.AbstractScheduledService.Scheduler.html Maven / Gradle / Ivy
The newest version!
AbstractScheduledService.Scheduler (Guava: Google Core Libraries for Java 11.0.1 API)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
com.google.common.util.concurrent
Class AbstractScheduledService.Scheduler
java.lang.Object
com.google.common.util.concurrent.AbstractScheduledService.Scheduler
- Direct Known Subclasses:
- AbstractScheduledService.CustomScheduler
- Enclosing class:
- AbstractScheduledService
public abstract static class AbstractScheduledService.Scheduler
- extends Object
A scheduler defines the policy for how the AbstractScheduledService
should run its
task.
Consider using the newFixedDelaySchedule(long, long, java.util.concurrent.TimeUnit)
and newFixedRateSchedule(long, long, java.util.concurrent.TimeUnit)
factory
methods, these provide AbstractScheduledService.Scheduler
instances for the common use case of running the
service with a fixed schedule. If more flexibility is needed then consider subclassing the
AbstractScheduledService.CustomScheduler
abstract class in preference to creating your own AbstractScheduledService.Scheduler
implementation.
- Since:
- 11.0
- Author:
- Luke Sandberg
Method Summary | |
---|---|
static AbstractScheduledService.Scheduler |
newFixedDelaySchedule(long initialDelay,
long delay,
TimeUnit unit)
Returns a AbstractScheduledService.Scheduler that schedules the task using the
ScheduledExecutorService.scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit) method. |
static AbstractScheduledService.Scheduler |
newFixedRateSchedule(long initialDelay,
long period,
TimeUnit unit)
Returns a AbstractScheduledService.Scheduler that schedules the task using the
ScheduledExecutorService.scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
newFixedDelaySchedule
public static AbstractScheduledService.Scheduler newFixedDelaySchedule(long initialDelay, long delay, TimeUnit unit)
- Returns a
AbstractScheduledService.Scheduler
that schedules the task using theScheduledExecutorService.scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
method.- Parameters:
initialDelay
- the time to delay first executiondelay
- the delay between the termination of one execution and the commencement of the nextunit
- the time unit of the initialDelay and delay parameters
newFixedRateSchedule
public static AbstractScheduledService.Scheduler newFixedRateSchedule(long initialDelay, long period, TimeUnit unit)
- Returns a
AbstractScheduledService.Scheduler
that schedules the task using theScheduledExecutorService.scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
method.- Parameters:
initialDelay
- the time to delay first executionperiod
- the period between successive executions of the taskunit
- the time unit of the initialDelay and period parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010-2012. All Rights Reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy