public interface Scheduler extends ScheduleTimer
Scheduler interface.
| Modifier and Type | Method and Description | 
|---|---|
long | 
getCurrentTime()
This returns the current time for the scheduler 
 | 
long | 
getNumTasksExecuted()
Returns the total number of scheduled tasks (ReadyRunnables) that have
 been executed since the scheduler was initialized. 
 | 
int | 
getStatus()
Returns the current of this fiber. 
 | 
void | 
pause()
Pauses the scheduler if it is current running. 
 | 
void | 
resume()
Resumes the scheduler if it has been paused. 
 | 
void | 
schedule(long interval,
        ReadyRunnable runnable)
schedule 
 | 
void | 
start()
Starts the fiber. 
 | 
void | 
stop()
Stops the fiber. 
 | 
void schedule(long interval,
              ReadyRunnable runnable)
schedule
This method is used to schedule a ready runnable in the system. The interval is used as the key for determining which queue to add the runnable.schedule in interface ScheduleTimerinterval - a long.runnable - a ReadyRunnable object.long getCurrentTime()
getCurrentTime in interface Timervoid start()
IllegalStateException - Thrown if the fiber is already running.void stop()
IllegalStateException - Throws if the fiber has never been started.void pause()
IllegalStateException - Throws if the operation could not be completed due to the
             fiber's state.void resume()
IllegalStateException - Throws if the operation could not be completed due to the
             fiber's state.int getStatus()
long getNumTasksExecuted()
Copyright © 2020. All rights reserved.