Implement the Immediate_Changes strategy. More...
#include <ESF_Immediate_Changes.h>
Public Member Functions | |
TAO_ESF_Immediate_Changes (void) | |
TAO_ESF_Immediate_Changes (const COLLECTION &collection) | |
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. | |
Private Attributes | |
COLLECTION | collection_ |
ACE_LOCK | lock_ |
Implement the Immediate_Changes strategy.
Definition at line 30 of file ESF_Immediate_Changes.h.
TAO_ESF_Immediate_Changes< PROXY, C, ITERATOR, ACE_LOCK >::TAO_ESF_Immediate_Changes | ( | void | ) |
Definition at line 20 of file ESF_Immediate_Changes.cpp.
{ }
TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::TAO_ESF_Immediate_Changes | ( | const COLLECTION & | collection | ) |
void TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::connected | ( | PROXY * | proxy | ) | [virtual] |
Insert a new element into the collection. The collection assumes ownership of the element.
Implements TAO_ESF_Proxy_Collection< PROXY >.
Definition at line 11 of file ESF_Immediate_Changes.inl.
{ ACE_GUARD (ACE_LOCK, ace_mon, this->lock_); proxy->_incr_refcnt (); this->collection_.connected (proxy); }
void TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::disconnected | ( | PROXY * | proxy | ) | [virtual] |
Remove an element from the collection.
Implements TAO_ESF_Proxy_Collection< PROXY >.
Definition at line 31 of file ESF_Immediate_Changes.inl.
{ ACE_GUARD (ACE_LOCK, ace_mon, this->lock_); this->collection_.disconnected (proxy); }
void TAO_ESF_Immediate_Changes< PROXY, C, ITERATOR, ACE_LOCK >::for_each | ( | TAO_ESF_Worker< PROXY > * | worker | ) | [virtual] |
Iterate over the collection and invoke worker->work() for each member of the collection. This encapsulates
Implements TAO_ESF_Proxy_Collection< PROXY >.
Definition at line 33 of file ESF_Immediate_Changes.cpp.
{ ACE_GUARD (ACE_LOCK, ace_mon, this->lock_); worker->set_size(this->collection_.size()); ITERATOR end = this->collection_.end (); for (ITERATOR i = this->collection_.begin (); i != end; ++i) { worker->work ((*i)); } }
void TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::reconnected | ( | PROXY * | 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 >.
Definition at line 21 of file ESF_Immediate_Changes.inl.
{ ACE_GUARD (ACE_LOCK, ace_mon, this->lock_); proxy->_incr_refcnt (); this->collection_.reconnected (proxy); }
void TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::shutdown | ( | void | ) | [virtual] |
The EC is shutting down, must release all the elements.
Implements TAO_ESF_Proxy_Collection< PROXY >.
Definition at line 39 of file ESF_Immediate_Changes.inl.
{ ACE_GUARD (ACE_LOCK, ace_mon, this->lock_); this->collection_.shutdown (); }
COLLECTION TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::collection_ [private] |
Definition at line 44 of file ESF_Immediate_Changes.h.
ACE_LOCK TAO_ESF_Immediate_Changes< PROXY, COLLECTION, ITERATOR, ACE_LOCK >::lock_ [private] |
Definition at line 46 of file ESF_Immediate_Changes.h.