alma::ACS::impl::CommonMonitorImpl Class Reference

Inheritance diagram for alma::ACS::impl::CommonMonitorImpl:
Inheritance graph
[legend]
Collaboration diagram for alma::ACS::impl::CommonMonitorImpl:
Collaboration graph
[legend]

List of all members.

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)

Detailed Description

Implementation of common monitor.

Author:
Matej Sekoranja
Version:
$id$

Constructor & Destructor Documentation

alma::ACS::impl::CommonMonitorImpl::CommonMonitorImpl (  )  [inline, protected]

Default constructor.

alma::ACS::impl::CommonMonitorImpl::CommonMonitorImpl ( CommonPropertyImpl  property,
Callback  callback,
CBDescIn  descIn 
) [inline]

Constructor with immediate monitor notification (synchronized monitors supported).

Parameters:
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 
) [inline]

Constructor.

Parameters:
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(), dispatchAction, getPriority(), and initialize().


Member Function Documentation

void alma::ACS::impl::CommonMonitorImpl::alignStartTime (  )  [inline, protected]

If userControlledStartTime == false aligns (fixes) start time required for synchronized monitors.

References startTime, timeTrigger, and userControlledStartTime.

Referenced by resume(), and setTimeTrigger().

synchronized void alma::ACS::impl::CommonMonitorImpl::destroy (  )  [inline]
void alma::ACS::impl::CommonMonitorImpl::dispatchFailed ( BACIDispatchAction  action,
DispatchRequest  failedRequest 
) [inline]
void alma::ACS::impl::CommonMonitorImpl::get_timer_trigger ( LongHolder  timeIntervalHolder  )  [inline]
See also:
alma.ACS.MonitorOperations::get_timer_trigger(org.omg.CORBA.LongHolder)

References timeTrigger.

BACIPriority alma::ACS::impl::CommonMonitorImpl::getPriority (  )  [inline]
void alma::ACS::impl::CommonMonitorImpl::initialize (  )  [inline, protected]
synchronized void alma::ACS::impl::CommonMonitorImpl::resume (  )  [inline]
void alma::ACS::impl::CommonMonitorImpl::retrieveValueAndDispatch ( long  keyTime,
boolean  done 
) [inline, protected]
void alma::ACS::impl::CommonMonitorImpl::run (  )  [inline]
See also:
java.lang.Runnable::run()

References queuedKeyTime, and retrieveValueAndDispatch().

void alma::ACS::impl::CommonMonitorImpl::schedule (  )  [inline]

Schedule monitor using fixed rate interval timeTrigger starting from startTime paramterer.

References isSuspended, monitorTimerTask, startTime, and timeTrigger.

Referenced by resume(), and setTimeTrigger().

void alma::ACS::impl::CommonMonitorImpl::set_timer_trigger ( long  timeInterval  )  [inline]
void alma::ACS::impl::CommonMonitorImpl::setTimeTrigger ( long  timeInterval  )  [inline, protected]

Set time trigger. If userControlledStartTime == false also aligns (fixes) start time required for synchronized monitors.

Parameters:
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 alignStartTime(), alma::ACS::impl::CommonPropertyImpl::min_timer_trigger(), property, schedule(), and timeTrigger.

Referenced by initialize(), and set_timer_trigger().

long alma::ACS::impl::CommonMonitorImpl::start_time (  )  [inline]
synchronized void alma::ACS::impl::CommonMonitorImpl::suspend (  )  [inline]
void alma::ACS::impl::CommonMonitorImpl::timeout ( long  timeToRun  )  [inline]

Timer implementation - it stores time when triggered and delegates value retrival to BACIExecutor.

See also:
alma.ACS.jbaci.BACITimer.TimerRunnable::timeout(long)

Implements alma::ACS::jbaci::BACITimer::TimerRunnable.

References queuedKeyTime.


Member Data Documentation

Destruction status.

Referenced by destroy(), and initialize().

Monitor timer task.

Referenced by schedule(), and suspend().

AtomicLong alma::ACS::impl::CommonMonitorImpl::queuedKeyTime = new AtomicLong(0) [protected]

Key time to process, 0 means none.

Referenced by run(), and timeout().

Time trigger (monitoring interval in ms).

Referenced by alignStartTime(), get_timer_trigger(), resume(), schedule(), and setTimeTrigger().

Start time control status.

Referenced by alignStartTime(), initialize(), and resume().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2