diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-08-01 23:39:57 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-08-01 23:39:57 +0000 |
commit | 2c3ab374267eb89c1a64bf6c28d6a34137e96b13 (patch) | |
tree | e11d110b2f6e69f07a780756276cc735be3e8fa9 /TAO/tao/default_resource.cpp | |
parent | 78f15e9fef70e8500baf261258da62677e2340ff (diff) | |
download | ATCD-2c3ab374267eb89c1a64bf6c28d6a34137e96b13.tar.gz |
ChangeLogTag:Wed Aug 1 16:05:36 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/default_resource.cpp')
-rw-r--r-- | TAO/tao/default_resource.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index 08b52c3c2dd..43b8db95560 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -12,9 +12,13 @@ #include "tao/Reactive_Flushing_Strategy.h" #include "tao/Block_Flushing_Strategy.h" +#include "tao/Leader_Follower_Flushing_Strategy.h" + #include "tao/Leader_Follower.h" #include "tao/LRU_Connection_Purging_Strategy.h" +#include "tao/LF_Strategy_Complete.h" + #include "ace/TP_Reactor.h" #include "ace/Dynamic_Service.h" #include "ace/Arg_Shifter.h" @@ -26,8 +30,6 @@ ACE_RCSID(tao, default_resource, "$Id$") - - TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) : use_tss_resources_ (0), use_locked_data_blocks_ (1), @@ -42,7 +44,7 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) options_processed_ (0), factory_disabled_ (0), cached_connection_lock_type_ (TAO_THREAD_LOCK), - flushing_strategy_type_ (TAO_REACTIVE_FLUSHING) + flushing_strategy_type_ (TAO_LEADER_FOLLOWER_FLUSHING) { } @@ -81,7 +83,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) return 0; } this->options_processed_ = 1; - + this->parser_names_count_ = 0; int curarg = 0; @@ -335,6 +337,9 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) char *name = argv[curarg]; if (ACE_OS::strcasecmp (name, + "leader_follower") == 0) + this->flushing_strategy_type_ = TAO_LEADER_FOLLOWER_FLUSHING; + else if (ACE_OS::strcasecmp (name, "reactive") == 0) this->flushing_strategy_type_ = TAO_REACTIVE_FLUSHING; else if (ACE_OS::strcasecmp (name, @@ -839,7 +844,11 @@ TAO_Flushing_Strategy * TAO_Default_Resource_Factory::create_flushing_strategy (void) { TAO_Flushing_Strategy *strategy = 0; - if (this->flushing_strategy_type_ == TAO_REACTIVE_FLUSHING) + if (this->flushing_strategy_type_ == TAO_LEADER_FOLLOWER_FLUSHING) + ACE_NEW_RETURN (strategy, + TAO_Leader_Follower_Flushing_Strategy, + 0); + else if (this->flushing_strategy_type_ == TAO_REACTIVE_FLUSHING) ACE_NEW_RETURN (strategy, TAO_Reactive_Flushing_Strategy, 0); @@ -879,7 +888,7 @@ TAO_Default_Resource_Factory::create_lf_strategy (void) TAO_LF_Strategy *strategy = 0; ACE_NEW_RETURN (strategy, - TAO_Complete_LF_Strategy, + TAO_LF_Strategy_Complete, 0); return strategy; |