TAO  2.3.3
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | Friends | List of all members
TAO_Default_Resource_Factory Class Reference

TAO's default resource factory. More...

#include <default_resource.h>

Inheritance diagram for TAO_Default_Resource_Factory:
Inheritance graph
[legend]
Collaboration diagram for TAO_Default_Resource_Factory:
Collaboration graph
[legend]

Public Member Functions

 TAO_Default_Resource_Factory (void)
 Constructor. More...
 
virtual ~TAO_Default_Resource_Factory (void)
 Destructor. More...
 
Service Configurator Hooks
virtual int init (int argc, ACE_TCHAR *argv[])
 Dynamic linking hook. More...
 
int parse_args (int argc, ACE_TCHAR *argv[])
 Parse svc.conf arguments. More...
 
- Public Member Functions inherited from TAO_Resource_Factory
 TAO_Resource_Factory (void)
 
virtual ~TAO_Resource_Factory (void)
 
- Public Member Functions inherited from ACE_Service_Object
 ACE_Service_Object (ACE_Reactor *=0)
 
virtual ~ACE_Service_Object (void)
 
virtual int suspend (void)
 
virtual int resume (void)
 
- Public Member Functions inherited from ACE_Event_Handler
virtual ~ACE_Event_Handler (void)
 
virtual ACE_HANDLE get_handle (void) const
 
virtual void set_handle (ACE_HANDLE)
 
virtual int priority (void) const
 
virtual void priority (int priority)
 
virtual int handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_timeout (const ACE_Time_Value &current_time, const void *act=0)
 
virtual int handle_exit (ACE_Process *)
 
virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
 
virtual int handle_signal (int signum, siginfo_t *=0, ucontext_t *=0)
 
virtual int resume_handler (void)
 
virtual int handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual int handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual void reactor (ACE_Reactor *reactor)
 
virtual ACE_Reactorreactor (void) const
 
virtual ACE_Reactor_Timer_Interfacereactor_timer_interface (void) const
 
virtual Reference_Count add_reference (void)
 
virtual Reference_Count remove_reference (void)
 
Reference_Counting_Policyreference_counting_policy (void)
 
- Public Member Functions inherited from ACE_Shared_Object
 ACE_Shared_Object (void)
 
virtual ~ACE_Shared_Object (void)
 
virtual int fini (void)
 
virtual int info (ACE_TCHAR **info_string, size_t length=0) const
 

Protected Types

enum  Output_CDR_Allocator_Type { LOCAL_MEMORY_POOL, DEFAULT }
 
- Protected Types inherited from ACE_Event_Handler
typedef ACE_Atomic_Op< ACE_SYNCH_MUTEX, Reference_CountAtomic_Reference_Count
 

Protected Member Functions

TAO_Time_Policy_Managertime_policy_manager (void) const
 
ACE_Timer_Queuecreate_timer_queue (void) const
 
void destroy_timer_queue (ACE_Timer_Queue *tmq) const
 
virtual ACE_Reactor_Implallocate_reactor_impl (void) const
 Obtain the reactor implementation. More...
 
int add_to_ior_parser_names (const char *)
 Add a Parser name to the list of Parser names. More...
 
void report_option_value_error (const ACE_TCHAR *option_name, const ACE_TCHAR *option_value)
 
virtual int load_default_protocols (void)
 
- Protected Member Functions inherited from ACE_Event_Handler
 ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY)
 

Protected Attributes

int use_locked_data_blocks_
 The type of data blocks that the ORB should use. More...
 
int parser_names_count_
 The number of the different types of Parsers. More...
 
char ** parser_names_
 Array consisting of the names of the parsers. More...
 
int index_
 Index of the current element in the parser_names_ array. More...
 
TAO_ProtocolFactorySet protocol_factories_
 list of loaded protocol factories. More...
 
TAO_Resource_Factory::Purging_Strategy connection_purging_type_
 
int cache_maximum_
 
int purge_percentage_
 
int max_muxed_connections_
 
int reactor_mask_signals_
 If 0 then we create reactors with signal handling disabled. More...
 
bool dynamically_allocated_reactor_
 
int options_processed_
 
int factory_disabled_
 
Output_CDR_Allocator_Type output_cdr_allocator_type_
 Type of allocator to use for output CDR buffers. More...
 
bool use_local_memory_pool_
 
- Protected Attributes inherited from ACE_Event_Handler
Atomic_Reference_Count reference_count_
 

Private Types

enum  Lock_Type { TAO_NULL_LOCK, TAO_THREAD_LOCK }
 
enum  Flushing_Strategy_Type { TAO_LEADER_FOLLOWER_FLUSHING, TAO_REACTIVE_FLUSHING, TAO_BLOCKING_FLUSHING }
 

Private Attributes

Lock_Type cached_connection_lock_type_
 Type of lock used by the cached connector. More...
 
Flushing_Strategy_Type flushing_strategy_type_
 Type of flushing strategy configured. More...
 
TAO_Codeset_Parameters char_codeset_parameters_
 
TAO_Codeset_Parameters wchar_codeset_parameters_
 
Resource_Usage resource_usage_strategy_
 Resource usage strategy. More...
 
bool drop_replies_
 

Friends

class TAO_RSF_Timer_Queue_Ptr
 

Member Accessors

enum  { TAO_ALLOCATOR_THREAD_LOCK }
 Modify and get the source for the CDR allocators. More...
 
int get_parser_names (char **&names, int &number_of_names)
 Modify and get the source for the CDR allocators. More...
 
int cdr_allocator_source (void)
 Modify and get the source for the CDR allocators. More...
 
virtual int use_locked_data_blocks (void) const
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Reactorget_reactor (void)
 Modify and get the source for the CDR allocators. More...
 
virtual void reclaim_reactor (ACE_Reactor *)
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_Acceptor_Registryget_acceptor_registry (void)
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_Connector_Registryget_connector_registry (void)
 Modify and get the source for the CDR allocators. More...
 
virtual void use_local_memory_pool (bool)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatorinput_cdr_dblock_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatorinput_cdr_buffer_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatorinput_cdr_msgblock_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual int input_cdr_allocator_type_locked (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatoroutput_cdr_dblock_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatoroutput_cdr_buffer_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatoroutput_cdr_msgblock_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatoramh_response_handler_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Allocatorami_response_handler_allocator (void)
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_ProtocolFactorySetget_protocol_factories (void)
 Modify and get the source for the CDR allocators. More...
 
virtual int init_protocol_factories (void)
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_Codeset_Managercodeset_manager (void)
 Modify and get the source for the CDR allocators. More...
 
virtual int cache_maximum (void) const
 Modify and get the source for the CDR allocators. More...
 
virtual int purge_percentage (void) const
 Modify and get the source for the CDR allocators. More...
 
virtual int max_muxed_connections (void) const
 Modify and get the source for the CDR allocators. More...
 
virtual ACE_Lockcreate_cached_connection_lock (void)
 Modify and get the source for the CDR allocators. More...
 
virtual int locked_transport_cache (void)
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_Flushing_Strategycreate_flushing_strategy (void)
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_Connection_Purging_Strategycreate_purging_strategy (void)
 Modify and get the source for the CDR allocators. More...
 
TAO_Resource_Factory::Resource_Usage resource_usage_strategy (void) const
 Modify and get the source for the CDR allocators. More...
 
virtual TAO_LF_Strategycreate_lf_strategy (void)
 Modify and get the source for the CDR allocators. More...
 
virtual auto_ptr< TAO_GIOP_Fragmentation_Strategycreate_fragmentation_strategy (TAO_Transport *transport, CORBA::ULong max_message_size) const
 Modify and get the source for the CDR allocators. More...
 
virtual void disable_factory (void)
 Modify and get the source for the CDR allocators. More...
 
virtual bool drop_replies_during_shutdown (void) const
 Modify and get the source for the CDR allocators. More...
 

Additional Inherited Members

- Public Types inherited from TAO_Resource_Factory
enum  Purging_Strategy { LRU, LFU, FIFO, NOOP }
 
enum  Resource_Usage { TAO_EAGER, TAO_LAZY }
 
- Public Types inherited from ACE_Event_Handler
typedef long Reference_Count
 
- Static Public Member Functions inherited from ACE_Event_Handler
static ACE_THR_FUNC_RETURN read_adapter (void *event_handler)
 
static int register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED)
 
static int remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr)
 
- Public Attributes inherited from ACE_Event_Handler
 LO_PRIORITY
 
 HI_PRIORITY
 
 NULL_MASK
 
 READ_MASK
 
 WRITE_MASK
 
 EXCEPT_MASK
 
 ACCEPT_MASK
 
 CONNECT_MASK
 
 TIMER_MASK
 
 QOS_MASK
 
 GROUP_QOS_MASK
 
 SIGNAL_MASK
 
 ALL_EVENTS_MASK
 
 RWE_MASK
 
 DONT_CALL
 
 ACE_EVENT_HANDLER_NOT_RESUMED
 
 ACE_REACTOR_RESUMES_HANDLER
 
 ACE_APPLICATION_RESUMES_HANDLER
 

Detailed Description

TAO's default resource factory.

Using a <{resource source specifier}> as a discriminator, the factory can return resource instances which are, e.g., global, stored in thread-specific storage, stored in shared memory, etc.

Note
When using an ORB created by a dynamically loaded object, it is generally necessary to pre-load a "Resource_Factory" prior to initializing the ORB. In the case of the TAO_Default_Resource_Factory, this can be done by adding the following Service Configurator directive to your `svc.conf' file before your the directive that loads the object that initialized your ORB:
static Resource_Factory ""
Alternatively, explicitly pre-load the Resource_Factory using the following in your code:
ACE_Service_Config::process_directive ( ACE_TEXT ("static Resource_Factory \""") );
In both cases, place the appropriate resource factory arguments, if any, between the quotes immediately following "Resource_Factory."

Member Enumeration Documentation

anonymous enum

Modify and get the source for the CDR allocators.

Enumerator
TAO_ALLOCATOR_THREAD_LOCK 
Enumerator
TAO_LEADER_FOLLOWER_FLUSHING 
TAO_REACTIVE_FLUSHING 
TAO_BLOCKING_FLUSHING 
Enumerator
TAO_NULL_LOCK 
TAO_THREAD_LOCK 
Enumerator
LOCAL_MEMORY_POOL 
DEFAULT 

Constructor & Destructor Documentation

TAO_Default_Resource_Factory::TAO_Default_Resource_Factory ( void  )

Constructor.

TAO_Default_Resource_Factory::~TAO_Default_Resource_Factory ( void  )
virtual

Destructor.

Member Function Documentation

int TAO_Default_Resource_Factory::add_to_ior_parser_names ( const char *  curarg)
protected

Add a Parser name to the list of Parser names.

ACE_Reactor_Impl * TAO_Default_Resource_Factory::allocate_reactor_impl ( void  ) const
protectedvirtual

Obtain the reactor implementation.

ACE_Allocator * TAO_Default_Resource_Factory::amh_response_handler_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::ami_response_handler_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::cache_maximum ( void  ) const
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::cdr_allocator_source ( void  )

Modify and get the source for the CDR allocators.

TAO_Codeset_Manager * TAO_Default_Resource_Factory::codeset_manager ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Lock * TAO_Default_Resource_Factory::create_cached_connection_lock ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

TAO_Flushing_Strategy * TAO_Default_Resource_Factory::create_flushing_strategy ( void  )
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

auto_ptr< TAO_GIOP_Fragmentation_Strategy > TAO_Default_Resource_Factory::create_fragmentation_strategy ( TAO_Transport transport,
CORBA::ULong  max_message_size 
) const
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

TAO_LF_Strategy * TAO_Default_Resource_Factory::create_lf_strategy ( void  )
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

TAO_Connection_Purging_Strategy * TAO_Default_Resource_Factory::create_purging_strategy ( void  )
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

ACE_Timer_Queue * TAO_Default_Resource_Factory::create_timer_queue ( void  ) const
protected
void TAO_Default_Resource_Factory::destroy_timer_queue ( ACE_Timer_Queue tmq) const
protected
void TAO_Default_Resource_Factory::disable_factory ( void  )
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

bool TAO_Default_Resource_Factory::drop_replies_during_shutdown ( void  ) const
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

TAO_Acceptor_Registry * TAO_Default_Resource_Factory::get_acceptor_registry ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

TAO_Connector_Registry * TAO_Default_Resource_Factory::get_connector_registry ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::get_parser_names ( char **&  names,
int &  number_of_names 
)
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

TAO_ProtocolFactorySet * TAO_Default_Resource_Factory::get_protocol_factories ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Reactor * TAO_Default_Resource_Factory::get_reactor ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::init ( int  argc,
ACE_TCHAR argv[] 
)
virtual

Dynamic linking hook.

CodeSet Translators

CodeSet Translators

Reimplemented from ACE_Shared_Object.

int TAO_Default_Resource_Factory::init_protocol_factories ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::input_cdr_allocator_type_locked ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::input_cdr_buffer_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::input_cdr_dblock_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::input_cdr_msgblock_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::load_default_protocols ( void  )
protectedvirtual

Loads the default protocols. This method is used so that the advanced_resource.cpp can call the one in default_resource.cpp without calling unnecessary functions.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::locked_transport_cache ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::max_muxed_connections ( void  ) const
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::output_cdr_buffer_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::output_cdr_dblock_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

ACE_Allocator * TAO_Default_Resource_Factory::output_cdr_msgblock_allocator ( void  )
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::parse_args ( int  argc,
ACE_TCHAR argv[] 
)

Parse svc.conf arguments.

int TAO_Default_Resource_Factory::purge_percentage ( void  ) const
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

void TAO_Default_Resource_Factory::reclaim_reactor ( ACE_Reactor reactor)
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

void TAO_Default_Resource_Factory::report_option_value_error ( const ACE_TCHAR option_name,
const ACE_TCHAR option_value 
)
protected
TAO_Resource_Factory::Resource_Usage TAO_Default_Resource_Factory::resource_usage_strategy ( void  ) const
virtual

Modify and get the source for the CDR allocators.

Implements TAO_Resource_Factory.

TAO_Time_Policy_Manager * TAO_Default_Resource_Factory::time_policy_manager ( void  ) const
protected
void TAO_Default_Resource_Factory::use_local_memory_pool ( bool  flag)
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

int TAO_Default_Resource_Factory::use_locked_data_blocks ( void  ) const
virtual

Modify and get the source for the CDR allocators.

Reimplemented from TAO_Resource_Factory.

Friends And Related Function Documentation

friend class TAO_RSF_Timer_Queue_Ptr
friend

Member Data Documentation

int TAO_Default_Resource_Factory::cache_maximum_
protected

Specifies the maximum number of connections which should get cached in the ORB.

Lock_Type TAO_Default_Resource_Factory::cached_connection_lock_type_
private

Type of lock used by the cached connector.

TAO_Codeset_Parameters TAO_Default_Resource_Factory::char_codeset_parameters_
private

Initialization options. To be used later when creating a codeset manager instance (s)

TAO_Resource_Factory::Purging_Strategy TAO_Default_Resource_Factory::connection_purging_type_
protected

Specifies the typeof purging strategy we should use for cleaning up unused connections

bool TAO_Default_Resource_Factory::drop_replies_
private

Flag to indicate whether replies should be dropped during ORB shutdown.

bool TAO_Default_Resource_Factory::dynamically_allocated_reactor_
protected

Flag that is set to true if the reactor obtained from the get_reactor() method is dynamically allocated. If this flag is set to true, then the reclaim_reactor() method with call the delete operator on the given reactor. This flag is necessary to make sure that a reactor not allocated by the default resource factory is not reclaimed by the default resource factory. Such a situation can occur when a resource factory derived from the default one overrides the get_reactor() method but does not override the reclaim_reactor() method.

int TAO_Default_Resource_Factory::factory_disabled_
protected

This flag specifies whether the factory has been disabled. If it has been disabled we should print warnings if options were processed before (or later).

Flushing_Strategy_Type TAO_Default_Resource_Factory::flushing_strategy_type_
private

Type of flushing strategy configured.

int TAO_Default_Resource_Factory::index_
protected

Index of the current element in the parser_names_ array.

int TAO_Default_Resource_Factory::max_muxed_connections_
protected

Specifies the limit on the number of muxed connections allowed per-property for the ORB. A value of 0 indicates no limit

int TAO_Default_Resource_Factory::options_processed_
protected

This flag is used to determine whether options have been processed via the init() function. It is necessary to properly report errors when the default factory is replaced.

Output_CDR_Allocator_Type TAO_Default_Resource_Factory::output_cdr_allocator_type_
protected

Type of allocator to use for output CDR buffers.

char** TAO_Default_Resource_Factory::parser_names_
protected

Array consisting of the names of the parsers.

int TAO_Default_Resource_Factory::parser_names_count_
protected

The number of the different types of Parsers.

TAO_ProtocolFactorySet TAO_Default_Resource_Factory::protocol_factories_
protected

list of loaded protocol factories.

int TAO_Default_Resource_Factory::purge_percentage_
protected

Specifies the percentage of entries which should get purged on demand.

int TAO_Default_Resource_Factory::reactor_mask_signals_
protected

If 0 then we create reactors with signal handling disabled.

Resource_Usage TAO_Default_Resource_Factory::resource_usage_strategy_
private

Resource usage strategy.

bool TAO_Default_Resource_Factory::use_local_memory_pool_
protected

This flag is used to determine whether the CDR allocators should use the local memory pool or not.

int TAO_Default_Resource_Factory::use_locked_data_blocks_
protected

The type of data blocks that the ORB should use.

TAO_Codeset_Parameters TAO_Default_Resource_Factory::wchar_codeset_parameters_
private

The documentation for this class was generated from the following files: