public class CommonMonitorImpl extends java.lang.Object implements BACITimer.TimerRunnable, PrioritizedRunnable, BACIDispatchAction.DispatchFailedListener
| Modifier and Type | Field and Description |
|---|---|
protected BACIDispatchAction |
dispatchAction
Dispatch action.
|
protected boolean |
isDestroyed
Destruction status.
|
protected boolean |
isSuspended
Suspend/resume status.
|
protected java.lang.Object |
monitorTimerTask
Monitor timer task.
|
protected CommonPropertyImpl |
property
Monitorized property.
|
protected java.util.concurrent.atomic.AtomicLong |
queuedKeyTime
Key time to process, 0 means none.
|
protected long |
startTime
Start time (java time).
|
protected long |
timeTrigger
Time trigger (monitoring interval in ms).
|
protected boolean |
userControlledStartTime
Start time control status.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CommonMonitorImpl()
Default constructor.
|
|
CommonMonitorImpl(CommonPropertyImpl property,
Callback callback,
CBDescIn descIn)
Constructor with immediate monitor notification (synchronized monitors supported).
|
|
CommonMonitorImpl(CommonPropertyImpl property,
Callback callback,
CBDescIn descIn,
long startTime)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
alignStartTime()
If
userControlledStartTime == false |
void |
destroy() |
void |
dispatchFailed(BACIDispatchAction action,
BACIDispatchAction.DispatchRequest failedRequest)
Called when dispatching of particulat request failed.
|
void |
get_timer_trigger(org.omg.CORBA.LongHolder timeIntervalHolder) |
BACIPriority |
getPriority()
Return priority of the task.
|
protected void |
initialize()
Initialize monitor.
|
void |
resume() |
protected void |
retrieveValueAndDispatch(long keyTime,
boolean done)
Retrieve property value via cached
mnemonicValue
and add response to BACIDispatchAction |
void |
run() |
void |
schedule()
Schedule monitor using fixed rate interval
timeTrigger
starting from startTime paramterer. |
void |
set_timer_trigger(long timeInterval) |
protected void |
setTimeTrigger(long timeInterval)
Set time trigger.
|
long |
start_time() |
void |
suspend() |
void |
timeout(long timeToRun)
Timer implementation - it stores time when triggered
and delegates value retrival to
BACIExecutor. |
protected java.lang.Object monitorTimerTask
protected CommonPropertyImpl property
protected BACIDispatchAction dispatchAction
protected long timeTrigger
protected long startTime
protected boolean isSuspended
protected boolean isDestroyed
protected boolean userControlledStartTime
protected java.util.concurrent.atomic.AtomicLong queuedKeyTime
protected CommonMonitorImpl()
public CommonMonitorImpl(CommonPropertyImpl property, Callback callback, CBDescIn descIn)
property - property to be monitored, non-null.callback - callback, non-null.descIn - callback in-descriptor.public CommonMonitorImpl(CommonPropertyImpl property, Callback callback, CBDescIn descIn, long startTime)
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).protected void initialize()
public void dispatchFailed(BACIDispatchAction action, BACIDispatchAction.DispatchRequest failedRequest)
BACIDispatchAction.DispatchFailedListenerdispatchFailed in interface BACIDispatchAction.DispatchFailedListeneraction - instance of BACIDispatchAction dispatching request.failedRequest - failed request.BACIDispatchAction.DispatchFailedListener.dispatchFailed(alma.ACS.jbaci.BACIDispatchAction, alma.ACS.jbaci.BACIDispatchAction.DispatchRequest)public void schedule()
timeTrigger
starting from startTime paramterer.protected void setTimeTrigger(long timeInterval)
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().protected void alignStartTime()
userControlledStartTime == false aligns (fixes) start time
required for synchronized monitors.public BACIPriority getPriority()
PrioritizedRunnablegetPriority in interface PrioritizedRunnablePrioritizedRunnable.getPriority()public void timeout(long timeToRun)
BACIExecutor.timeout in interface BACITimer.TimerRunnableBACITimer.TimerRunnable.timeout(long)public void run()
run in interface java.lang.RunnableRunnable.run()protected void retrieveValueAndDispatch(long keyTime,
boolean done)
mnemonicValue
and add response to BACIDispatchAction.public long start_time()
alma.ACS.MonitorOperations#start_time()public void set_timer_trigger(long timeInterval)
alma.ACS.MonitorOperations#set_timer_trigger(long)public void get_timer_trigger(org.omg.CORBA.LongHolder timeIntervalHolder)
alma.ACS.MonitorOperations#get_timer_trigger(org.omg.CORBA.LongHolder)public void suspend()
alma.ACS.SubscriptionOperations#suspend()public void resume()
alma.ACS.SubscriptionOperations#resume()public void destroy()
alma.ACS.SubscriptionOperations#destroy()