Public Member Functions | |
CommonMonitorImpl (CommonPropertyImpl property, Callback callback, CBDescIn descIn) | |
CommonMonitorImpl (CommonPropertyImpl property, Callback callback, CBDescIn descIn, long startTime) | |
void | dispatchFailed (BACIDispatchAction action, DispatchRequest failedRequest) |
void | schedule () |
BACIPriority | getPriority () |
void | timeout (long timeToRun) |
void | run () |
long | start_time () |
void | set_timer_trigger (long timeInterval) |
void | get_timer_trigger (LongHolder timeIntervalHolder) |
synchronized void | suspend () |
synchronized void | resume () |
synchronized void | destroy () |
Protected Member Functions | |
CommonMonitorImpl () | |
void | initialize () |
void | setTimeTrigger (long timeInterval) |
void | alignStartTime () |
void | retrieveValueAndDispatch (long keyTime, boolean done) |
Protected Attributes | |
Object | monitorTimerTask |
CommonPropertyImpl | property |
BACIDispatchAction | dispatchAction |
long | timeTrigger |
long | startTime |
boolean | isSuspended |
boolean | isDestroyed |
boolean | userControlledStartTime |
AtomicLong | queuedKeyTime = new AtomicLong(0) |
Implementation of common monitor.
alma.ACS.impl.CommonMonitorImpl.CommonMonitorImpl | ( | ) | [protected] |
Default constructor.
alma.ACS.impl.CommonMonitorImpl.CommonMonitorImpl | ( | CommonPropertyImpl | property, | |
Callback | callback, | |||
CBDescIn | descIn | |||
) |
Constructor with immediate monitor notification (synchronized monitors supported).
property | property to be monitored, non-null . | |
callback | callback, non-null . | |
descIn | callback in-descriptor. |
alma.ACS.impl.CommonMonitorImpl.CommonMonitorImpl | ( | CommonPropertyImpl | property, | |
Callback | callback, | |||
CBDescIn | descIn, | |||
long | startTime | |||
) |
Constructor.
property | property to be monitored, non-null . | |
callback | callback, non-null . | |
descIn | callback in-descriptor. | |
startTime | startTime (OMG time), values less or equal to current time mean immediately, value 0 means that start time should be controlled automatically (synchronized monitors). |
References alma.ACS.jbaci.BACIDispatchAction.addDispatchFailedListener(), alma.ACS.impl.CommonMonitorImpl.dispatchAction, alma.ACS.impl.CommonMonitorImpl.getPriority(), and alma.ACS.impl.CommonMonitorImpl.initialize().
void alma.ACS.impl.CommonMonitorImpl.alignStartTime | ( | ) | [protected] |
If userControlledStartTime == false
aligns (fixes) start time required for synchronized monitors.
References alma.ACS.impl.CommonMonitorImpl.startTime, alma.ACS.impl.CommonMonitorImpl.timeTrigger, and alma.ACS.impl.CommonMonitorImpl.userControlledStartTime.
Referenced by alma.ACS.impl.CommonMonitorImpl.resume(), and alma.ACS.impl.CommonMonitorImpl.setTimeTrigger().
synchronized void alma.ACS.impl.CommonMonitorImpl.destroy | ( | ) |
References alma.ACS.impl.CommonMonitorImpl.dispatchAction, alma.ACS.impl.CommonMonitorImpl.isDestroyed, alma.ACS.impl.CommonMonitorImpl.isSuspended, alma.ACS.jbaci.BACIDispatchAction.removeDispatchFailedListener(), alma.ACS.impl.CommonMonitorImpl.retrieveValueAndDispatch(), and alma.ACS.impl.CommonMonitorImpl.suspend().
Referenced by alma.ACS.impl.CommonMonitorImpl.dispatchFailed().
void alma.ACS.impl.CommonMonitorImpl.dispatchFailed | ( | BACIDispatchAction | action, | |
DispatchRequest | failedRequest | |||
) |
void alma.ACS.impl.CommonMonitorImpl.get_timer_trigger | ( | LongHolder | timeIntervalHolder | ) |
References alma.ACS.impl.CommonMonitorImpl.timeTrigger.
BACIPriority alma.ACS.impl.CommonMonitorImpl.getPriority | ( | ) |
Reimplemented in alma.ACS.impl.HistoryMonitorImpl.
References alma.ACS.jbaci.BACIPriority.NORMAL.
Referenced by alma.ACS.impl.CommonMonitorImpl.CommonMonitorImpl().
void alma.ACS.impl.CommonMonitorImpl.initialize | ( | ) | [protected] |
Initialize monitor.
References alma.ACS.impl.CommonPropertyImpl.default_timer_trigger(), alma.ACS.impl.CommonMonitorImpl.isDestroyed, alma.ACS.impl.CommonMonitorImpl.isSuspended, alma.ACS.impl.CommonMonitorImpl.property, alma.ACS.impl.CommonMonitorImpl.setTimeTrigger(), alma.ACS.impl.CommonMonitorImpl.startTime, and alma.ACS.impl.CommonMonitorImpl.userControlledStartTime.
Referenced by alma.ACS.impl.CommonMonitorImpl.CommonMonitorImpl(), and alma.ACS.impl.HistoryMonitorImpl.HistoryMonitorImpl().
synchronized void alma.ACS.impl.CommonMonitorImpl.resume | ( | ) |
References alma.ACS.impl.CommonMonitorImpl.alignStartTime(), alma.ACS.impl.CommonMonitorImpl.isSuspended, alma.ACS.impl.CommonMonitorImpl.schedule(), alma.ACS.impl.CommonMonitorImpl.startTime, alma.ACS.impl.CommonMonitorImpl.timeTrigger, and alma.ACS.impl.CommonMonitorImpl.userControlledStartTime.
void alma.ACS.impl.CommonMonitorImpl.retrieveValueAndDispatch | ( | long | keyTime, | |
boolean | done | |||
) | [protected] |
Retrieve property value via cached mnemonicValue
and add response to BACIDispatchAction
.
Reimplemented in alma.ACS.impl.HistoryMonitorImpl.
References alma.ACS.impl.CommonMonitorImpl.dispatchAction, alma.ACS.jbaci.BACIDispatchAction.dispatchDoneRequest(), and alma.ACS.jbaci.BACIDispatchAction.dispatchWorkingRequest().
Referenced by alma.ACS.impl.CommonMonitorImpl.destroy(), and alma.ACS.impl.CommonMonitorImpl.run().
void alma.ACS.impl.CommonMonitorImpl.run | ( | ) |
References alma.ACS.impl.CommonMonitorImpl.queuedKeyTime, and alma.ACS.impl.CommonMonitorImpl.retrieveValueAndDispatch().
void alma.ACS.impl.CommonMonitorImpl.schedule | ( | ) |
Schedule monitor using fixed rate interval timeTrigger
starting from startTime
paramterer.
References alma.ACS.impl.CommonMonitorImpl.isSuspended, alma.ACS.impl.CommonMonitorImpl.monitorTimerTask, alma.ACS.impl.CommonMonitorImpl.startTime, and alma.ACS.impl.CommonMonitorImpl.timeTrigger.
Referenced by alma.ACS.impl.CommonMonitorImpl.resume(), and alma.ACS.impl.CommonMonitorImpl.setTimeTrigger().
void alma.ACS.impl.CommonMonitorImpl.set_timer_trigger | ( | long | timeInterval | ) |
References alma.ACS.impl.CommonMonitorImpl.setTimeTrigger().
void alma.ACS.impl.CommonMonitorImpl.setTimeTrigger | ( | long | timeInterval | ) | [protected] |
Set time trigger. If userControlledStartTime == false
also aligns (fixes) start time required for synchronized monitors.
timeTtrigger | time trigger (monitor interval in ms), if <= 0 monitoring is disabled but not resumed since there still might be on-change trigger enabled. timeTrigger is limited with lower bound property.min_timer_trigger() . |
References alma.ACS.impl.CommonMonitorImpl.alignStartTime(), alma.ACS.impl.CommonPropertyImpl.min_timer_trigger(), alma.ACS.impl.CommonMonitorImpl.property, alma.ACS.impl.CommonMonitorImpl.schedule(), and alma.ACS.impl.CommonMonitorImpl.timeTrigger.
Referenced by alma.ACS.impl.CommonMonitorImpl.initialize(), and alma.ACS.impl.CommonMonitorImpl.set_timer_trigger().
long alma.ACS.impl.CommonMonitorImpl.start_time | ( | ) |
References alma.ACS.impl.CommonMonitorImpl.startTime.
synchronized void alma.ACS.impl.CommonMonitorImpl.suspend | ( | ) |
References alma.ACS.impl.CommonMonitorImpl.isSuspended, and alma.ACS.impl.CommonMonitorImpl.monitorTimerTask.
Referenced by alma.ACS.impl.CommonMonitorImpl.destroy().
void alma.ACS.impl.CommonMonitorImpl.timeout | ( | long | timeToRun | ) |
Timer implementation - it stores time when triggered and delegates value retrival to BACIExecutor
.
References alma.ACS.impl.CommonMonitorImpl.queuedKeyTime.
boolean alma.ACS.impl.CommonMonitorImpl.isDestroyed [protected] |
Destruction status.
Referenced by alma.ACS.impl.CommonMonitorImpl.destroy(), and alma.ACS.impl.CommonMonitorImpl.initialize().
boolean alma.ACS.impl.CommonMonitorImpl.isSuspended [protected] |
Suspend/resume status.
Referenced by alma.ACS.impl.CommonMonitorImpl.destroy(), alma.ACS.impl.CommonComparableMonitorImpl.enable(), alma.ACS.impl.CommonMonitorImpl.initialize(), alma.ACS.impl.CommonMonitorImpl.resume(), alma.ACS.impl.CommonComparableMonitorImpl.resume(), alma.ACS.impl.CommonMonitorImpl.schedule(), alma.ACS.impl.CommonMonitorImpl.suspend(), and alma.ACS.impl.CommonComparableMonitorImpl.suspend().
Object alma.ACS.impl.CommonMonitorImpl.monitorTimerTask [protected] |
Monitor timer task.
Referenced by alma.ACS.impl.CommonMonitorImpl.schedule(), and alma.ACS.impl.CommonMonitorImpl.suspend().
AtomicLong alma.ACS.impl.CommonMonitorImpl.queuedKeyTime = new AtomicLong(0) [protected] |
Key time to process, 0 means none.
Referenced by alma.ACS.impl.CommonMonitorImpl.run(), and alma.ACS.impl.CommonMonitorImpl.timeout().
long alma.ACS.impl.CommonMonitorImpl.startTime [protected] |
Start time (java time).
Referenced by alma.ACS.impl.CommonMonitorImpl.alignStartTime(), alma.ACS.impl.CommonComparableMonitorImpl.enable(), alma.ACS.impl.HistoryMonitorImpl.HistoryMonitorImpl(), alma.ACS.impl.CommonMonitorImpl.initialize(), alma.ACS.impl.CommonMonitorImpl.resume(), alma.ACS.impl.CommonMonitorImpl.schedule(), and alma.ACS.impl.CommonMonitorImpl.start_time().
long alma.ACS.impl.CommonMonitorImpl.timeTrigger [protected] |
Time trigger (monitoring interval in ms).
Referenced by alma.ACS.impl.CommonMonitorImpl.alignStartTime(), alma.ACS.impl.CommonMonitorImpl.get_timer_trigger(), alma.ACS.impl.CommonMonitorImpl.resume(), alma.ACS.impl.CommonMonitorImpl.schedule(), and alma.ACS.impl.CommonMonitorImpl.setTimeTrigger().
boolean alma.ACS.impl.CommonMonitorImpl.userControlledStartTime [protected] |
Start time control status.
Referenced by alma.ACS.impl.CommonMonitorImpl.alignStartTime(), alma.ACS.impl.CommonMonitorImpl.initialize(), and alma.ACS.impl.CommonMonitorImpl.resume().