-
public abstract class Scheduler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract class
Scheduler.Worker
Sequential Scheduler for executing actions on a single thread or event loop.
Unsubscribing the Worker cancels all outstanding work and allows resources cleanup.
-
Method Summary
Modifier and Type Method Description abstract Scheduler.Worker
createWorker()
Retrieves or creates a new Scheduler.Worker that represents serial execution of actions. long
now()
Gets the current time, in milliseconds, according to this Scheduler. -
-
Method Detail
-
createWorker
abstract Scheduler.Worker createWorker()
Retrieves or creates a new Scheduler.Worker that represents serial execution of actions.
When work is completed it should be unsubscribed using unsubscribe.
Work on a Scheduler.Worker is guaranteed to be sequential.
-
now
long now()
Gets the current time, in milliseconds, according to this Scheduler.
-
-
-
-