public final class RuntimeClock extends Object implements Clock
Clock.IdleHandler, Clock.RuntimeStartHandler, Clock.RuntimeStopHandler, Clock.StartHandler, Clock.StopHandler| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
This will stop the clock after all client alarms
 finish executing. 
 | 
boolean | 
isIdle()
Clock is idle if it has no future Alarms set. 
 | 
void | 
registerEventHandler(Class<? extends Time> clazz,
                                        EventHandler<Time> handler)  | 
void | 
run()  | 
void | 
scheduleAlarm(int offset,
                          EventHandler<Alarm> handler)
Schedule a TimerEvent at the given future offset 
 | 
void | 
scheduleRuntimeAlarm(int offset,
                                        EventHandler<Alarm> handler)  | 
void | 
stop()
This stops the clock immediately, without waiting for
 client alarms to finish. 
 | 
public final void scheduleAlarm(int offset, EventHandler<Alarm> handler)
ClockscheduleAlarm in interface Clockoffset - into the futurehandler - to be calledpublic final void registerEventHandler(Class<? extends Time> clazz, EventHandler<Time> handler)
public final void scheduleRuntimeAlarm(int offset, EventHandler<Alarm> handler)
public final void stop()
Clockpublic final void close()
Clockclose in interface AutoCloseableclose in interface Clockpublic final boolean isIdle()
ClockCopyright © 2015 The Apache Software Foundation. All rights reserved.