TAO_ESF
2.1.6
|
TAO_ESF_Copy_On_Write. More...
#include <ESF_Copy_On_Write.h>
Public Types | |
typedef TAO_ESF_Copy_On_Write_Read_Guard < COLLECTION, ITERATOR, ACE_SYNCH_MUTEX_T > | Read_Guard |
Constructor. | |
typedef TAO_ESF_Copy_On_Write_Write_Guard < COLLECTION, ITERATOR, ACE_SYNCH_USE > | Write_Guard |
Public Member Functions | |
TAO_ESF_Copy_On_Write (void) | |
~TAO_ESF_Copy_On_Write (void) | |
Destructor. | |
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. | |
virtual void | shutdown (void) |
The EC is shutting down, must release all the elements. | |
![]() | |
virtual | ~TAO_ESF_Proxy_Collection (void) |
destructor |
Private Types | |
typedef TAO_ESF_Copy_On_Write_Collection < COLLECTION, ITERATOR > | Collection |
Private Attributes | |
ACE_SYNCH_MUTEX_T | mutex_ |
A mutex to serialize access to the collection pointer. | |
int | pending_writes_ |
Number of pending writes. | |
int | writing_ |
ACE_SYNCH_CONDITION_T | cond_ |
A condition variable to wait to synchronize multiple writers. | |
Collection * | collection_ |
The collection, with reference counting added. |
Implement the Copy_On_Write protocol The class is parametric on the kind of collection and locking mechanism used.
|
private |
typedef TAO_ESF_Copy_On_Write_Read_Guard<COLLECTION,ITERATOR,ACE_SYNCH_MUTEX_T> TAO_ESF_Copy_On_Write< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::Read_Guard |
Constructor.
typedef TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE> TAO_ESF_Copy_On_Write< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::Write_Guard |
TAO_ESF_Copy_On_Write< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::TAO_ESF_Copy_On_Write | ( | void | ) |
TAO_ESF_Copy_On_Write< PROXY, COLLECTION, ITERATOR, ACE_SYNCH_DECL >::~TAO_ESF_Copy_On_Write | ( | void | ) |
Destructor.
|
virtual |
Insert a new element into the collection. The collection assumes ownership of the element.
Implements TAO_ESF_Proxy_Collection< PROXY >.
|
virtual |
Remove an element from the collection.
Implements TAO_ESF_Proxy_Collection< PROXY >.
|
virtual |
Iterate over the collection and invoke worker->work() for each member of the collection. This encapsulates
Implements TAO_ESF_Proxy_Collection< PROXY >.
|
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 >.
|
virtual |
The EC is shutting down, must release all the elements.
Implements TAO_ESF_Proxy_Collection< PROXY >.
|
private |
The collection, with reference counting added.
|
private |
A condition variable to wait to synchronize multiple writers.
|
private |
A mutex to serialize access to the collection pointer.
|
private |
Number of pending writes.
|
private |
If non-zero then a thread is changing the collection. Many threads can use the collection simulatenously, but only one change it.