net.esper.timer
Class TimerServiceImpl

java.lang.Object
  extended by net.esper.timer.TimerServiceImpl
All Implemented Interfaces:
TimerService

public final class TimerServiceImpl
extends java.lang.Object
implements TimerService

Implementation of the internal clocking service interface.


Field Summary
 
Fields inherited from interface net.esper.timer.TimerService
INTERNAL_CLOCK_RESOLUTION_MSEC
 
Constructor Summary
protected TimerServiceImpl()
          Constructor.
 
Method Summary
 void setCallback(TimerCallback timerCallback)
          Set the callback method to invoke for clock ticks.
 void startInternalClock()
          Start clock expecting callbacks at regular intervals and a fixed rate.
 void stopInternalClock(boolean warnIfNotStarted)
          Stop internal clock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerServiceImpl

protected TimerServiceImpl()
Constructor.

Method Detail

setCallback

public void setCallback(TimerCallback timerCallback)
Description copied from interface: TimerService
Set the callback method to invoke for clock ticks.

Specified by:
setCallback in interface TimerService
Parameters:
timerCallback - is the callback

startInternalClock

public final void startInternalClock()
Description copied from interface: TimerService
Start clock expecting callbacks at regular intervals and a fixed rate. Catch-up callbacks are possible should the callback fall behind.

Specified by:
startInternalClock in interface TimerService

stopInternalClock

public final void stopInternalClock(boolean warnIfNotStarted)
Description copied from interface: TimerService
Stop internal clock.

Specified by:
stopInternalClock in interface TimerService
Parameters:
warnIfNotStarted - use true to indicate whether to warn if the clock is not started, use false to not warn and expect the clock to be not started.