TAO_ESF
2.3.1
|
TAO_ESF_Delayed_Operations. More...
#include <ESF_Delayed_Changes.h>
Public Types | |
typedef TAO_ESF_Connected_Command < TAO_ESF_Delayed_Changes < PROXY, COLLECTION, ITERATOR, ACE_SYNCH_USE >, PROXY > | Connected_Command |
typedef TAO_ESF_Reconnected_Command < TAO_ESF_Delayed_Changes < PROXY, COLLECTION, ITERATOR, ACE_SYNCH_USE >, PROXY > | Reconnected_Command |
typedef TAO_ESF_Disconnected_Command < TAO_ESF_Delayed_Changes < PROXY, COLLECTION, ITERATOR, ACE_SYNCH_USE >, PROXY > | Disconnected_Command |
typedef TAO_ESF_Shutdown_Command < TAO_ESF_Delayed_Changes < PROXY, COLLECTION, ITERATOR, ACE_SYNCH_USE > > | Shutdown_Command |
Public Member Functions | |
TAO_ESF_Delayed_Changes (void) | |
TAO_ESF_Delayed_Changes (const COLLECTION &collection) | |
int | busy (void) |
int | idle (void) |
int | execute_delayed_operations (void) |
void | connected_i (PROXY *proxy) |
void | reconnected_i (PROXY *proxy) |
void | disconnected_i (PROXY *proxy) |
void | shutdown_i (void) |
virtual void | for_each (TAO_ESF_Worker< PROXY > *worker) |
virtual void | connected (PROXY *proxy) |
virtual void | reconnected (PROXY *proxy) |
virtual void | disconnected (PROXY *proxy) |
Remove an element from the collection. More... | |
virtual void | shutdown (void) |
The EC is shutting down, must release all the elements. More... | |
![]() | |
virtual | ~TAO_ESF_Proxy_Collection (void) |
destructor More... | |
Private Types | |
typedef TAO_ESF_Busy_Lock_Adapter < TAO_ESF_Delayed_Changes < PROXY, COLLECTION, ITERATOR, ACE_SYNCH_USE > > | Busy_Lock |
Private Attributes | |
COLLECTION | collection_ |
Busy_Lock | lock_ |
ACE_SYNCH_MUTEX_T | busy_lock_ |
ACE_SYNCH_CONDITION_T | busy_cond_ |
CORBA::ULong | busy_count_ |
CORBA::ULong | write_delay_count_ |
CORBA::ULong | busy_hwm_ |
Control variables for the concurrency policies. More... | |
CORBA::ULong | max_write_delay_ |
ACE_Unbounded_Queue < ACE_Command_Base * > | command_queue_ |
TAO_ESF_Delayed_Operations.
This class implements the Delayed Operations protocol to solve the concurrency challenges outlined in the documentation of TAO_ESF_Proxy_Collection. In short the class delays changes by putting them on an "operation queue", the operations are stored as command objects in this queue and executed once the system is quiescent (i.e. no threads are iterating over the collection). The algorithm implemented so far is:
|
private |
typedef TAO_ESF_Connected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::Connected_Command |
typedef TAO_ESF_Disconnected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::Disconnected_Command |
typedef TAO_ESF_Reconnected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::Reconnected_Command |
typedef TAO_ESF_Shutdown_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE> > TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::Shutdown_Command |
TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::TAO_ESF_Delayed_Changes | ( | void | ) |
TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::TAO_ESF_Delayed_Changes | ( | const COLLECTION & | collection | ) |
int TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::busy | ( | void | ) |
|
virtual |
Insert a new element into the collection. The collection assumes ownership of the element.
Implements TAO_ESF_Proxy_Collection< PROXY >.
void TAO_ESF_Delayed_Changes< PROXY, C, I, ACE_SYNCH_DECL >::connected_i | ( | PROXY * | proxy | ) |
|
virtual |
Remove an element from the collection.
Implements TAO_ESF_Proxy_Collection< PROXY >.
void TAO_ESF_Delayed_Changes< PROXY, C, I, ACE_SYNCH_DECL >::disconnected_i | ( | PROXY * | proxy | ) |
int TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::execute_delayed_operations | ( | void | ) |
|
virtual |
Iterate over the collection and invoke worker->work() for each member of the collection. This encapsulates
Implements TAO_ESF_Proxy_Collection< PROXY >.
int TAO_ESF_Delayed_Changes< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::idle | ( | void | ) |
|
virtual |
Insert an element into the collection. No errors can be raised if the element is already present. The collection assumes ownership, i.e. must invoke <proxy->_decr_refcnt()> if the element is already present in the collection.
Implements TAO_ESF_Proxy_Collection< PROXY >.
void TAO_ESF_Delayed_Changes< PROXY, C, I, ACE_SYNCH_DECL >::reconnected_i | ( | PROXY * | proxy | ) |
|
virtual |
The EC is shutting down, must release all the elements.
Implements TAO_ESF_Proxy_Collection< PROXY >.
void TAO_ESF_Delayed_Changes< PROXY, C, I, ACE_SYNCH_DECL >::shutdown_i | ( | void | ) |
|
private |
|
private |
|
private |
Control variables for the concurrency policies.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |