net.esper.timer
Class TimerServiceImpl

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

public final class TimerServiceImpl
extends Object
implements TimerService

Implementation of the internal clocking service interface.


Constructor Summary
TimerServiceImpl(long msecTimerResolution)
          Constructor.
 
Method Summary
 long getMsecTimerResolution()
          Returns the timer resolution.
 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

public TimerServiceImpl(long msecTimerResolution)
Constructor.

Parameters:
msecTimerResolution - is the millisecond resolution or interval the internal timer thread processes schedules
Method Detail

getMsecTimerResolution

public long getMsecTimerResolution()
Returns the timer resolution.

Returns:
the millisecond resolution or interval the internal timer thread processes schedules

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.

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com