org.appdapter.module.basic
Class TimedModule<Mlator extends Modulator>
java.lang.Object
org.appdapter.core.log.BasicDebugger
org.appdapter.module.basic.BasicModule<Mlator>
org.appdapter.module.basic.TimedModule<Mlator>
- All Implemented Interfaces:
- Module<Mlator>
- Direct Known Subclasses:
- EmptyTimedModule
public abstract class TimedModule<Mlator extends Modulator>
- extends BasicModule<Mlator>
Here we log the timing of each callback exec, and also make the parent modulator's
presence explicit in each callback. We also supply a naive "completed run count".
- Author:
- Stu B.
| Nested classes/interfaces inherited from interface org.appdapter.api.module.Module |
Module.State |
| Methods inherited from class org.appdapter.module.basic.BasicModule |
enterBasicInitModule, enterBasicReleaseModule, enterBasicRunOnce, enterBasicStart, enterBasicStop, exitBasicInitModule, exitBasicReleaseModule, exitBasicRunOnce, exitBasicStart, exitBasicStop, failDuringInitOrStartup, getParentModulator, getState, isStopRequested, markStopRequested, notifyStateViolation, setParentModulator, toString, verifyStoredState |
myRunDebugModulus
protected int myRunDebugModulus
TimedModule
public TimedModule()
getCompletedRunCount
public long getCompletedRunCount()
doInit
protected abstract void doInit(Mlator mlator)
initModule
public void initModule()
- Description copied from interface:
Module
- Modulator must be set when initModule is called. initModule is called exactly
once, by the modulator, and can be First method called on Module, and called only once.
Can only be called by the modulatorModule
Upon return, must be in WAIT_TO_START, or or POST_STOP_OR_FAILED_STARTUP.
doStart
protected abstract void doStart(Mlator mlator)
start
public void start()
- Description copied from interface:
Module
- Required pre-state is WAIT_TO_START.
During-state is IN_START
Upon return, state is WAIT_TO_RUN_OR_STOP, or POST_STOP_OR_FAILED_STARTUP.
doRunOnce
protected abstract void doRunOnce(Mlator mlator,
long runSeqNum)
runOnce
public void runOnce()
- Description copied from interface:
Module
- Required pre-state is WAIT_TO_RUN_OR_STOP.
During-state is IN_RUN.
Upon return, state is WAIT_TO_RUN_OR_STOP.
doStop
protected abstract void doStop(Mlator mlator)
stop
public void stop()
- Description copied from interface:
Module
- Required pre-state is WAIT_TO_RUN_OR_STOP.
During-state is IN_STOP.
Upon return, state is POST_STOP_OR_FAILED_STARTUP.
doRelease
protected abstract void doRelease(Mlator mlator)
releaseModule
public void releaseModule()
- Description copied from interface:
Module
- Required pre-state is POST_STOP_OR_FAILED_STARTUP. Module is no longer usable as soon as call begins.
Should not throw.
getDescription
public String getDescription()
- Overrides:
getDescription in class BasicModule<Mlator extends Modulator>
Copyright © 2010-2012. All Rights Reserved.