

BACI dispatch action.
| alma::ACS::jbaci::BACIDispatchAction::BACIDispatchAction | ( | CBvoid | callback, | |
| CBDescIn | descIn | |||
| ) | [inline] |
Constructor of NORMAL priority action (CBvoid callback).
| callback | action callback. | |
| descIn | action callback in descriptor. |
| alma::ACS::jbaci::BACIDispatchAction::BACIDispatchAction | ( | Callback | callback, | |
| CBDescIn | descIn, | |||
| CallbackDispatcher | callbackDispatcher | |||
| ) | [inline] |
Constructor of NORMAL priority action.
| callback | action callback. | |
| descIn | action callback in descriptor. | |
| callbackDispatcher | callback dispatcher (value dependend). |
| alma::ACS::jbaci::BACIDispatchAction::BACIDispatchAction | ( | CBvoid | callback, | |
| CBDescIn | descIn, | |||
| BACIPriority | priority | |||
| ) | [inline] |
Constructor.
| callback | action callback. | |
| descIn | action in descriptor. | |
| priority | action priority. |
| alma::ACS::jbaci::BACIDispatchAction::BACIDispatchAction | ( | Callback | callback, | |
| CBDescIn | descIn, | |||
| CallbackDispatcher | callbackDispatcher, | |||
| BACIPriority | priority | |||
| ) | [inline] |
Constructor.
| callback | action callback. | |
| descIn | action in descriptor. | |
| callbackDispatcher | callback dispatcher (value dependend). | |
| priority | action priority. |
References DEFAULT_FAILURE_COUNT_LIMIT, descOut, failureCountLimit, and generateCBDescOut().
| void alma::ACS::jbaci::BACIDispatchAction::addDispatchFailedListener | ( | DispatchFailedListener | listener | ) | [inline] |
Add dispatch failed listener.
| listener | listener to listen failed dispatch notifications. |
References listeners.
Referenced by alma::ACS::impl::CommonMonitorImpl::CommonMonitorImpl().
| boolean alma::ACS::jbaci::BACIDispatchAction::dispatch | ( | ) | [inline, protected] |
Dispatch method. Dispatches pendingRequest, should be non-null.
true if successfully dispatched. References callback, callbackDispatcher, alma::ACS::jbaci::BACIDispatchAction::DispatchRequest::completion, descOut, alma::ACS::jbaci::CallbackDispatcher::dispatchCallback(), pendingRequest, alma::ACS::jbaci::BACIDispatchAction::DispatchRequest::type, and alma::ACS::jbaci::BACIDispatchAction::DispatchRequest::value.
Referenced by run().
| void alma::ACS::jbaci::BACIDispatchAction::dispatchDoneRequest | ( | Completion | completion, | |
| Object | value | |||
| ) | [inline] |
Added done callback request to dispatch queue.
| completion | completion. | |
| value | value. |
References dispatchRequest().
| void alma::ACS::jbaci::BACIDispatchAction::dispatchDoneRequest | ( | Completion | completion | ) | [inline] |
Added done callback request to dispatch queue.
| completion | completion. |
References dispatchRequest().
Referenced by alma::ACS::jbaci::test::BACIDispatchActionTest::noErrorOverrideTest(), alma::ACS::impl::CommonMonitorImpl::retrieveValueAndDispatch(), alma::ACS::jbaci::test::BACIDispatchActionTest::testAlwaysFails(), alma::ACS::jbaci::test::BACIDispatchActionTest::testException(), alma::ACS::jbaci::test::BACIDispatchActionTest::testFirstFailed(), alma::ACS::jbaci::test::BACIDispatchActionTest::testNormal(), and alma::ACS::jbaci::test::BACIDispatchActionTest::testOverrideBlockingFailsNoneToOverrideTest().
| void alma::ACS::jbaci::BACIDispatchAction::dispatchRequest | ( | DispatchRequest | request | ) | [inline, protected] |
Added request to dispatch queue (internal).
References overridePolicy, queue, submit(), and submitPending.
| void alma::ACS::jbaci::BACIDispatchAction::dispatchRequest | ( | int | type, | |
| Completion | completion, | |||
| Object | value | |||
| ) | [inline] |
Added request to dispatch queue.
Referenced by dispatchDoneRequest(), and dispatchWorkingRequest().
| void alma::ACS::jbaci::BACIDispatchAction::dispatchWorkingRequest | ( | Completion | completion, | |
| Object | value | |||
| ) | [inline] |
Added working callback request to dispatch queue.
| completion | completion. |
References dispatchRequest().
| void alma::ACS::jbaci::BACIDispatchAction::dispatchWorkingRequest | ( | Completion | completion | ) | [inline] |
Added working callback request to dispatch queue.
| completion | completion. | |
| value | value. |
References dispatchRequest().
Referenced by alma::ACS::impl::CommonMonitorImpl::retrieveValueAndDispatch(), and alma::ACS::impl::CommonComparableMonitorImpl::valueChanged().
| boolean alma::ACS::jbaci::BACIDispatchAction::failed | ( | ) | [inline, protected] |
Call this metod to notify dispatch failure.
true, if dispaching is to be canceled (e.g. failure counter reached its failure limit) References failureCount, and failureCountLimit.
Referenced by run().
| static CBDescOut alma::ACS::jbaci::BACIDispatchAction::generateCBDescOut | ( | CBDescIn | descIn | ) | [inline, static, protected] |
Generates callback out descriptor from in descriptor.
| descIn | callback in descriptor. |
References alma::ACS::CBDescIn::id_tag.
Referenced by BACIDispatchAction().
| CBDescOut alma::ACS::jbaci::BACIDispatchAction::getDescOut | ( | ) | [inline] |
| BACIPriority alma::ACS::jbaci::BACIDispatchAction::getPriority | ( | ) | [inline] |
Implements alma::ACS::jbaci::PrioritizedRunnable.
References priority.
| boolean alma::ACS::jbaci::BACIDispatchAction::isOverridePolicy | ( | ) | [inline] |
Get current override policy.
References overridePolicy.
Referenced by run().
| void alma::ACS::jbaci::BACIDispatchAction::removeDispatchFailedListener | ( | DispatchFailedListener | listener | ) | [inline] |
Remove dispatch failed listener.
| listener | listener to remove. |
References listeners.
Referenced by alma::ACS::impl::CommonMonitorImpl::destroy().
| final void alma::ACS::jbaci::BACIDispatchAction::run | ( | ) | [inline] |
NOT TO BE CHANGED. Dispatching is done one by one - to achieve better fairness.
References dispatch(), alma::ACS::jbaci::BACIDispatchAction::DispatchFailedListener::dispatchFailed(), failed(), failureCount, isOverridePolicy(), listeners, pendingRequest, queue, submit(), and submitPending.
| void alma::ACS::jbaci::BACIDispatchAction::setOverridePolicy | ( | boolean | b | ) | [inline] |
Set current override policy.
| b | override policy to set. |
References overridePolicy.
Referenced by alma::ACS::jbaci::test::BACIDispatchActionTest::noErrorOverrideTest(), and alma::ACS::jbaci::test::BACIDispatchActionTest::testOverrideBlockingFailsNoneToOverrideTest().
| void alma::ACS::jbaci::BACIDispatchAction::setPriority | ( | BACIPriority | priority | ) | [inline] |
Set dispatching priority.
| priority | dispatching priority to set. |
| void alma::ACS::jbaci::BACIDispatchAction::submit | ( | ) | [inline, protected] |
Sumbit action to be BACIExecutor to be executed.
References queue, and submitPending.
Referenced by dispatchRequest(), and run().
Referenced by dispatch().
Callback dispatcher (used to dispatch non-CBvoid callbacks).
Referenced by dispatch().
final int alma::ACS::jbaci::BACIDispatchAction::DEFAULT_FAILURE_COUNT_LIMIT = 3 [static, protected] |
Failure limit.
Referenced by BACIDispatchAction().
Callback out descriptor.
Referenced by BACIDispatchAction(), dispatch(), and getDescOut().
int alma::ACS::jbaci::BACIDispatchAction::failureCount = 0 [protected] |
int alma::ACS::jbaci::BACIDispatchAction::failureCountLimit [protected] |
Failure limit (number of retries), 0 means until successfull.
Referenced by BACIDispatchAction(), and failed().
ArrayList alma::ACS::jbaci::BACIDispatchAction::listeners = new ArrayList() [protected] |
List of registered listeners.
Referenced by addDispatchFailedListener(), removeDispatchFailedListener(), and run().
boolean alma::ACS::jbaci::BACIDispatchAction::overridePolicy = false [protected] |
Override policy for request queue. If true newer request will override request in the queue. If false (default) requests will form a linked list.
Referenced by dispatchRequest(), isOverridePolicy(), and setOverridePolicy().
DispatchRequest alma::ACS::jbaci::BACIDispatchAction::pendingRequest = null [protected] |
Pending request. NOTE: synchronized on queue's monitor.
Referenced by dispatch(), and run().
Action priority.
Referenced by getPriority().
LinkedList alma::ACS::jbaci::BACIDispatchAction::queue = new LinkedList() [protected] |
Ordered dispatch queue.
Referenced by dispatchRequest(), run(), and submit().
boolean alma::ACS::jbaci::BACIDispatchAction::submitPending = false [protected] |
Flag indicating pending submit. NOTE: synchronized on queue's monitor.
Referenced by dispatchRequest(), run(), and submit().
1.6.2