Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TAO_ESF_Delayed_Changes Class Template Reference

TAO_ESF_Delayed_Operations. More...

#include <ESF_Delayed_Changes.h>

Inheritance diagram for TAO_ESF_Delayed_Changes

Inheritance graph
[legend]
Collaboration diagram for TAO_ESF_Delayed_Changes:

Collaboration graph
[legend]
List of all members.

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 Methods

 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, CORBA::Environment &ACE_TRY_ENV)
void reconnected_i (PROXY *proxy, CORBA::Environment &ACE_TRY_ENV)
void disconnected_i (PROXY *proxy, CORBA::Environment &ACE_TRY_ENV)
void shutdown_i (CORBA::Environment &ACE_TRY_ENV)
virtual void for_each (TAO_ESF_Worker<PROXY> *worker, CORBA::Environment &ACE_TRY_ENV)
virtual void connected (PROXY *proxy, CORBA::Environment &ACE_TRY_ENV)
 Insert a new element into the collection. The collection assumes ownership of the element.

virtual void reconnected (PROXY *proxy, CORBA::Environment &ACE_TRY_ENV)
virtual void disconnected (PROXY *proxy, CORBA::Environment &ACE_TRY_ENV)
 Remove an element from the collection.

virtual void shutdown (CORBA::Environment &ACE_TRY_ENV)
 The EC is shutting down, must release all the elements.


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.

CORBA::ULong max_write_delay_
ACE_Unbounded_Queue<ACE_Command_Base*> command_queue_

Detailed Description

template<class PROXY, class COLLECTION, class ITERATOR, ACE_SYNCH_DECL> template class TAO_ESF_Delayed_Changes

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:


Member Typedef Documentation

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
typedef TAO_ESF_Busy_Lock_Adapter<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE> > TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::Busy_Lock [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
typedef TAO_ESF_Connected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::Connected_Command
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
typedef TAO_ESF_Disconnected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::Disconnected_Command
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
typedef TAO_ESF_Reconnected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::Reconnected_Command
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
typedef TAO_ESF_Shutdown_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE> > TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::Shutdown_Command
 


Constructor & Destructor Documentation

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
const char *get_rcsid_ESF _ TAO_ESF_Delayed_Changes< PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE >::TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, > ( void ) [inline]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
TAO_ESF_Delayed_Changes< PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE >::TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, > ( const COLLECTION & collection )
 


Member Function Documentation

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
int TAO_ESF_Delayed_Changes< PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE >::busy ( void )
 

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::connected ( PROXY * proxy,
CORBA::Environment & ACE_TRY_ENV ) [virtual]
 

Insert a new element into the collection. The collection assumes ownership of the element.

Reimplemented from TAO_ESF_Proxy_Collection.

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::connected_i ( PROXY * proxy,
CORBA::Environment & ACE_TRY_ENV )
 

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::disconnected ( PROXY * proxy,
CORBA::Environment & ACE_TRY_ENV ) [virtual]
 

Remove an element from the collection.

Reimplemented from TAO_ESF_Proxy_Collection.

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::disconnected_i ( PROXY * proxy,
CORBA::Environment & ACE_TRY_ENV )
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
int TAO_ESF_Delayed_Changes< PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE >::execute_delayed_operations ( void )
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE >::for_each ( TAO_ESF_Worker< PROXY >* worker,
CORBA::Environment & ACE_TRY_ENV ) [virtual]
 

Iterate over the collection and invoke worker->work() for each member of the collection. This encapsulates

Reimplemented from TAO_ESF_Proxy_Collection.

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
int TAO_ESF_Delayed_Changes< PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE >::idle ( void )
 

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::reconnected ( PROXY * proxy,
CORBA::Environment & ACE_TRY_ENV ) [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.

Reimplemented from TAO_ESF_Proxy_Collection.

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::reconnected_i ( PROXY * proxy,
CORBA::Environment & ACE_TRY_ENV )
 

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::shutdown ( CORBA::Environment & ACE_TRY_ENV ) [virtual]
 

The EC is shutting down, must release all the elements.

Reimplemented from TAO_ESF_Proxy_Collection.

template<classPROXY, classC, classI, ACE_SYNCH_DECL>
void TAO_ESF_Delayed_Changes< PROXY,C,I,ACE_SYNCH_USE >::shutdown_i ( CORBA::Environment & ACE_TRY_ENV )
 


Member Data Documentation

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
ACE_SYNCH_CONDITION_T TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::busy_cond_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
CORBA::ULong TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::busy_count_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
CORBA::ULong TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::busy_hwm_ [private]
 

Control variables for the concurrency policies.

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
ACE_SYNCH_MUTEX_T TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::busy_lock_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
COLLECTION TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::collection_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
ACE_Unbounded_Queue< ACE_Command_Base *> TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::command_queue_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
Busy_Lock TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::lock_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
CORBA::ULong TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::max_write_delay_ [private]
 

template<classPROXY, classCOLLECTION, classITERATOR, ACE_SYNCH_DECL>
CORBA::ULong TAO_ESF_Delayed_Changes<PROXY, COLLECTION, ITERATOR, >::write_delay_count_ [private]
 


The documentation for this class was generated from the following files:
Generated at Sat Dec 1 12:25:30 2001 for TAO_ESF by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000