diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 08:02:58 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 08:02:58 +0000 |
commit | e588f487fe14b34a642a62bd0cb53877a42b4793 (patch) | |
tree | 8c0bc2f7aa508472a4fd98dfca9d6afd60130f52 /TAO/tao/default_resource.cpp | |
parent | ad7f2d4ae4273710073d841fe5afccaf14e6718a (diff) | |
download | ATCD-e588f487fe14b34a642a62bd0cb53877a42b4793.tar.gz |
ChangeLogTag:Tue Apr 24 00:21:54 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/default_resource.cpp')
-rw-r--r-- | TAO/tao/default_resource.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index 2a74726468b..11232cc1182 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -11,6 +11,9 @@ #include "tao/Single_Reactor.h" #include "tao/Priority_Mapping.h" +#include "tao/Reactive_Flushing_Strategy.h" +#include "tao/Block_Flushing_Strategy.h" + #include "ace/TP_Reactor.h" #include "ace/Dynamic_Service.h" #include "ace/Arg_Shifter.h" @@ -33,6 +36,7 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) reactor_mask_signals_ (1), dynamically_allocated_reactor_ (0), cached_connection_lock_type_ (TAO_THREAD_LOCK) + , flushing_strategy_type_ (TAO_REACTIVE_FLUSHING) { } @@ -194,6 +198,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->add_to_ior_parser_names (argv[curarg]); } } + else if (ACE_OS::strcasecmp (argv[curarg], "-ORBConnectionCacheLock") == 0) { @@ -210,6 +215,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->cached_connection_lock_type_ = TAO_NULL_LOCK; } } + else if (ACE_OS::strcasecmp (argv[curarg], "-ORBConnectionLock") == 0) { @@ -230,6 +236,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->cached_connection_lock_type_ = TAO_NULL_LOCK; } } + else if (ACE_OS::strcasecmp (argv[curarg], "-ORBConnectorLock") == 0) { @@ -251,6 +258,23 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) } } + else if (ACE_OS::strcasecmp (argv[curarg], + "-ORBFlushingStrategy") == 0) + { + curarg++; + if (curarg < argc) + { + char *name = argv[curarg]; + + if (ACE_OS::strcasecmp (name, + "reactive") == 0) + this->flushing_strategy_type_ = TAO_REACTIVE_FLUSHING; + else if (ACE_OS::strcasecmp (name, + "blocking") == 0) + this->flushing_strategy_type_ = TAO_BLOCKING_FLUSHING; + } + } + return 0; } @@ -705,6 +729,21 @@ TAO_Default_Resource_Factory::create_cached_connection_lock (void) return the_lock; } +TAO_Flushing_Strategy * +TAO_Default_Resource_Factory::create_flushing_strategy (void) +{ + TAO_Flushing_Strategy *strategy = 0; + if (this->flushing_strategy_type_ == TAO_REACTIVE_FLUSHING) + ACE_NEW_RETURN (strategy, + TAO_Reactive_Flushing_Strategy, + 0); + else + ACE_NEW_RETURN (strategy, + TAO_Block_Flushing_Strategy, + 0); + return strategy; +} + TAO_Priority_Mapping * TAO_Default_Resource_Factory::get_priority_mapping (void) { |