@DefaultImplementation(value=RuntimeClock.class) public interface Clock extends Runnable, AutoCloseable
| Modifier and Type | Interface and Description | 
|---|---|
static class  | 
Clock.IdleHandler
Bind this to an event handler to statically subscribe to the IdleClock Event 
 | 
static class  | 
Clock.RuntimeStartHandler
Bind this to an event handler to statically subscribe to the RuntimeStart Event 
 | 
static class  | 
Clock.RuntimeStopHandler
Bind this to an event handler to statically subscribe to the RuntimeStart Event 
 | 
static class  | 
Clock.StartHandler
Bind this to an event handler to statically subscribe to the StartTime Event 
 | 
static class  | 
Clock.StopHandler
Bind this to an event handler to statically subscribe to the StopTime Event 
 | 
| 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 | 
scheduleAlarm(int offset,
                          EventHandler<Alarm> handler)
Schedule a TimerEvent at the given future offset 
 | 
void | 
stop()
This stops the clock immediately, without waiting for
 client alarms to finish. 
 | 
void scheduleAlarm(int offset, EventHandler<Alarm> handler)
handler - to be calledoffset - into the futureIllegalStateException - when the clock has been already closedvoid close()
close in interface AutoCloseablevoid stop()
boolean isIdle()
Copyright © 2015 The Apache Software Foundation. All rights reserved.