Package io.deephaven.io.sched
Class Scheduler.Null
java.lang.Object
io.deephaven.io.sched.Scheduler.Null
- All Implemented Interfaces:
Scheduler
- Enclosing interface:
- Scheduler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.io.sched.Scheduler
Scheduler.ExecutorAdaptor, Scheduler.Null -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancel a job, making the scheduler forget it completely..voidclose()Shut down the scheduler, calling close() on the underlying Selector.longReturn the scheduler's idea of the current time.voidinstallJob(Job job, long deadline) Install a job with only an associated deadline (removing any channel association)voidinstallJob(Job job, long deadline, SelectableChannel channel, int interest) Install a job in association with a channel and an interest set.booleanisClosed()Return true if the scheduler is closing or closed.Return all jobs known to the scheduler, in whatever state.Return the selection keys currently known to the scheduler.Return a map containing all channels and the jobs to which they are associated.Return the selection keys currently known to the scheduler.Return a reference to the selectorReturn the contents of the timeout queue, in deadline orderbooleanReturn true if the timeout queue invariant holds.booleanWait for jobs to become ready, then invoke() them all.
-
Constructor Details
-
Null
public Null()
-
-
Method Details
-
currentTimeMillis
public long currentTimeMillis()Description copied from interface:SchedulerReturn the scheduler's idea of the current time.- Specified by:
currentTimeMillisin interfaceScheduler
-
installJob
Description copied from interface:SchedulerInstall a job in association with a channel and an interest set.- Specified by:
installJobin interfaceScheduler
-
installJob
Description copied from interface:SchedulerInstall a job with only an associated deadline (removing any channel association)- Specified by:
installJobin interfaceScheduler
-
cancelJob
Description copied from interface:SchedulerCancel a job, making the scheduler forget it completely.. -
work
Description copied from interface:SchedulerWait for jobs to become ready, then invoke() them all. This method will form the core of the main loop of a scheduler-driven application. The method first waits until: -- the given timeout expires, -- the earliest job-specific timeout expires, or -- one or more jobs becomes ready If jobs have become ready, then the entire ready set will be invoked. If any job throws an uncaught exception, the job's terminated() method will be called and the job deregistered. This does not abort the invocation of the remaining jobs. The return value is then the number of jobs that were invoked. If no jobs are ready and any job-specific timeouts expire, the associated jobs' timedOut() methods are called. The return value is the negative of the number of expired timeouts. If the time given by the timeout argument expires, then zero is returned. Note that this method is not synchronized. The application must ensure that it is never called concurrently by more than one thread. -
close
public void close()Description copied from interface:SchedulerShut down the scheduler, calling close() on the underlying Selector. -
isClosed
public boolean isClosed()Description copied from interface:SchedulerReturn true if the scheduler is closing or closed. -
junitGetSelector
Description copied from interface:SchedulerReturn a reference to the selector- Specified by:
junitGetSelectorin interfaceScheduler
-
junitGetAllJobs
Description copied from interface:SchedulerReturn all jobs known to the scheduler, in whatever state.- Specified by:
junitGetAllJobsin interfaceScheduler
-
junitGetTimeoutQueue
Description copied from interface:SchedulerReturn the contents of the timeout queue, in deadline order- Specified by:
junitGetTimeoutQueuein interfaceScheduler- Returns:
- the jobs in the timeout queue
-
junitGetAllKeys
Description copied from interface:SchedulerReturn the selection keys currently known to the scheduler.- Specified by:
junitGetAllKeysin interfaceScheduler
-
junitGetReadyKeys
Description copied from interface:SchedulerReturn the selection keys currently known to the scheduler.- Specified by:
junitGetReadyKeysin interfaceScheduler
-
junitGetChannelsAndJobs
Description copied from interface:SchedulerReturn a map containing all channels and the jobs to which they are associated.- Specified by:
junitGetChannelsAndJobsin interfaceScheduler
-
junitTestTimeoutQueueInvariant
public boolean junitTestTimeoutQueueInvariant()Description copied from interface:SchedulerReturn true if the timeout queue invariant holds.- Specified by:
junitTestTimeoutQueueInvariantin interfaceScheduler
-