Package io.atomix.utils.concurrent
Interface Scheduler
-
- All Known Subinterfaces:
ThreadContext
- All Known Implementing Classes:
AbstractThreadContext,BlockingAwareSingleThreadContext,BlockingAwareThreadPoolContext,NullThreadContext,SingleThreadContext,ThreadPoolContext
public interface SchedulerScheduler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Scheduledschedule(long initialDelay, long interval, TimeUnit timeUnit, Runnable callback)Schedules a runnable at a fixed rate.default Scheduledschedule(long delay, TimeUnit timeUnit, Runnable callback)Schedules a runnable after a delay.Scheduledschedule(Duration delay, Runnable callback)Schedules a runnable after a delay.Scheduledschedule(Duration initialDelay, Duration interval, Runnable callback)Schedules a runnable at a fixed rate.
-
-
-
Method Detail
-
schedule
default Scheduled schedule(long delay, TimeUnit timeUnit, Runnable callback)
Schedules a runnable after a delay.- Parameters:
delay- the delay after which to run the callbacktimeUnit- the time unitcallback- the callback to run- Returns:
- the scheduled callback
-
schedule
Scheduled schedule(Duration delay, Runnable callback)
Schedules a runnable after a delay.- Parameters:
delay- the delay after which to run the callbackcallback- the callback to run- Returns:
- the scheduled callback
-
schedule
default Scheduled schedule(long initialDelay, long interval, TimeUnit timeUnit, Runnable callback)
Schedules a runnable at a fixed rate.- Parameters:
initialDelay- the initial delayinterval- the interval at which to run the callbacktimeUnit- the time unitcallback- the callback to run- Returns:
- the scheduled callback
-
-