Package io.atomix.utils.concurrent
Interface Scheduler
- All Superinterfaces:
AutoCloseable,CloseableSilently
- All Known Subinterfaces:
ThreadContext
- All Known Implementing Classes:
SingleThreadContext
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Scheduler.
-
Method Details
-
schedule
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
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
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
-
schedule
Schedules a runnable at a fixed rate.- Parameters:
initialDelay- the initial delayinterval- the interval at which to run the callbackcallback- the callback to run- Returns:
- the scheduled callback
-
close
default void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableSilently
-