diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-04-30 22:15:45 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-04-30 22:15:45 +0000 |
commit | 4651aa6f7eae615431888efa4f31a8309e44509f (patch) | |
tree | a3c6801f4798263e8fe0cb9d38f51f1ebb926826 /TAO | |
parent | 62b6092eb492d90c9c73bcd23e7ffed5087493c1 (diff) | |
download | ATCD-4651aa6f7eae615431888efa4f31a8309e44509f.tar.gz |
ChangeLogTag: Tue Apr 30 17:03:49 2002 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 30 | ||||
-rw-r--r-- | TAO/docs/Options.html | 7 | ||||
-rw-r--r-- | TAO/tao/Resource_Factory.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Resource_Factory.h | 6 | ||||
-rw-r--r-- | TAO/tao/Strategies/advanced_resource.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/default_resource.cpp | 70 | ||||
-rw-r--r-- | TAO/tao/default_resource.h | 7 | ||||
-rw-r--r-- | TAO/tao/orbconf.h | 11 | ||||
-rw-r--r-- | TAO/tests/Connection_Purging/client.fifo.conf | 2 | ||||
-rw-r--r-- | TAO/tests/Connection_Purging/client.lfu.conf | 2 | ||||
-rw-r--r-- | TAO/tests/Connection_Purging/client.lru.conf | 2 | ||||
-rw-r--r-- | TAO/tests/Connection_Purging/client.null.conf | 2 |
12 files changed, 96 insertions, 55 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 8d45721b52c..19cd9c0a70d 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,33 @@ +Tue Apr 30 17:03:49 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Resource_Factory.h: + * tao/Resource_Factory.cpp: Changed the name of the enum + Connection_Strategy to Purging_Strategy. Removed + connection_caching_strategy_type () from the interface since it + is no longer used. + + * tao/default_resource.cpp: + * tao/default_resource.h: Changed all references of + TAO_Resource_Factory::Connection_strategy to + TAO_Resource_Factory::Purging_Strategy. Added a new -ORB option, + -ORBConnectionPurgingStrategy. This would replace the option + -ORBConnectionCachingStrategy which will be deprecated in the + future. The new option has the same functionality of the + -ORBConnectionCachingStrategy but with a more meaningful name. + + * tao/orbconf.h: Added a new #define + TAO_CONNECTION_PURGING_STRATEGY that will replace the existing + TAO_CONNECTION_CACHING_STRATEGY. The latter will be deprecated. + + * tao/Strategies/advanced_resource.cpp: Changed references of + Connection_Strategy to Purging_Strategy. + + * docs/Options.html: Added documentation for the new ORB option, + -ORBConnectionPurgingStrategy. + + * tests/Connection_Purging/*.conf: Replaced all the occurences of + -ORBConnectionCachingStrategy with -ORBConnectionPurgingStrategy. + Tue Apr 30 21:41:12 UTC 2002 Craig Rodrigues * orbsvcs/tests/AVStreams/Asynch_Three_Stage/run_test.pl: diff --git a/TAO/docs/Options.html b/TAO/docs/Options.html index 59c91d76bb9..0eb840f7732 100644 --- a/TAO/docs/Options.html +++ b/TAO/docs/Options.html @@ -498,6 +498,13 @@ would load all the options listed within "". <TR> <TD><CODE>-ORBConnectionCachingStrategy</CODE> <EM>type</EM></TD> <TD><a name="-ORBConnectionCachingStrategy"></a> + <FONT COLOR=RED>This option is <STRONG>deprecated</STRONG>. Use + -ORBConnectionPurgingStrategy instead.</FONT> + </TD> +</TR> +<TR> + <TD><CODE>-ORBConnectionPurgingStrategy</CODE> <EM>type</EM></TD> + <TD><a name="-ORBConnectionPurgingStrategy"></a> Opened connections are added to the transport cache so they can be reused. However, if a process continues to run and these connections are not reused, the cache will continue to grow. diff --git a/TAO/tao/Resource_Factory.cpp b/TAO/tao/Resource_Factory.cpp index 8711b484454..d7395a398b8 100644 --- a/TAO/tao/Resource_Factory.cpp +++ b/TAO/tao/Resource_Factory.cpp @@ -147,12 +147,6 @@ TAO_Resource_Factory::init_protocol_factories (void) return -1; } -TAO_Resource_Factory::Caching_Strategy -TAO_Resource_Factory::connection_caching_strategy_type (void) const -{ - return TAO_Resource_Factory::NOOP; -} - int TAO_Resource_Factory::cache_maximum (void) const { diff --git a/TAO/tao/Resource_Factory.h b/TAO/tao/Resource_Factory.h index 6a137f593d3..53494ecaaa6 100644 --- a/TAO/tao/Resource_Factory.h +++ b/TAO/tao/Resource_Factory.h @@ -98,7 +98,7 @@ class TAO_Export TAO_Resource_Factory : public ACE_Service_Object { public: - enum Caching_Strategy + enum Purging_Strategy { // Least Recently Used LRU, @@ -170,10 +170,6 @@ public: */ virtual int init_protocol_factories (void); - /// This accesses the connection caching strategy we use for managing - /// purging of unused entries from the connection cache on demand. - virtual Caching_Strategy connection_caching_strategy_type (void) const; - /// This denotes the maximum number of connections that can be cached. virtual int cache_maximum (void) const; diff --git a/TAO/tao/Strategies/advanced_resource.cpp b/TAO/tao/Strategies/advanced_resource.cpp index 6f736637c9d..0d2064d6a6e 100644 --- a/TAO/tao/Strategies/advanced_resource.cpp +++ b/TAO/tao/Strategies/advanced_resource.cpp @@ -187,13 +187,13 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) { this->report_option_value_error (ACE_LIB_TEXT("-ORBInputCDRAllocator"), current_arg); } - + arg_shifter.consume_arg (); } else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-ORBReactorThreadQueue")))) { - if (ACE_OS::strcasecmp (current_arg, + if (ACE_OS::strcasecmp (current_arg, ACE_LIB_TEXT ("LIFO")) == 0) this->threadqueue_type_ = TAO_THREAD_QUEUE_LIFO; else if (ACE_OS::strcasecmp (current_arg, @@ -642,7 +642,7 @@ TAO_Advanced_Resource_Factory::create_purging_strategy (void) { TAO_Connection_Purging_Strategy *strategy = 0; - switch(this->connection_caching_type_) + switch(this->connection_purging_type_) { case TAO_Resource_Factory::LFU: ACE_NEW_RETURN (strategy, diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index 4a1375d8d7c..1d93400103b 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -38,7 +38,7 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) parser_names_count_ (0), parser_names_ (0), protocol_factories_ (), - connection_caching_type_ (TAO_CONNECTION_CACHING_STRATEGY), + connection_purging_type_ (TAO_CONNECTION_PURGING_STRATEGY), cache_maximum_ (TAO_CONNECTION_CACHE_MAXIMUM), purge_percentage_ (TAO_PURGE_PERCENT), max_muxed_connections_ (0), @@ -175,31 +175,66 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) ACE_LIB_TEXT("-ORBConnectionCachingStrategy")) == 0) { curarg++; + + // @@todo: This needs to be removed after a few betas. The + // note is being written during 1.2.3 timeframe. + ACE_DEBUG ((LM_DEBUG, + ACE_LIB_TEXT ("(%P|%t) This option would be deprecated \n") + ACE_LIB_TEXT ("(%P|%t) Please use -ORBConnectionPurgingStrategy instead \n"))); + if (curarg < argc) { ACE_TCHAR* name = argv[curarg]; if (ACE_OS::strcasecmp (name, ACE_LIB_TEXT("lru")) == 0) - this->connection_caching_type_ = + this->connection_purging_type_ = TAO_Resource_Factory::LRU; else if (ACE_OS::strcasecmp (name, ACE_LIB_TEXT("lfu")) == 0) - this->connection_caching_type_ = + this->connection_purging_type_ = TAO_Resource_Factory::LFU; else if (ACE_OS::strcasecmp (name, ACE_LIB_TEXT("fifo")) == 0) - this->connection_caching_type_ = + this->connection_purging_type_ = TAO_Resource_Factory::FIFO; else if (ACE_OS::strcasecmp (name, ACE_LIB_TEXT("null")) == 0) - this->connection_caching_type_ = + this->connection_purging_type_ = TAO_Resource_Factory::NOOP; else this->report_option_value_error (ACE_LIB_TEXT("-ORBConnectionCachingStrategy"), name); } } + else if (ACE_OS::strcasecmp (argv[curarg], + ACE_LIB_TEXT("-ORBConnectionPurgingStrategy")) == 0) + { + curarg++; + + if (curarg < argc) + { + ACE_TCHAR* name = argv[curarg]; + if (ACE_OS::strcasecmp (name, + ACE_LIB_TEXT("lru")) == 0) + this->connection_purging_type_ = + TAO_Resource_Factory::LRU; + else if (ACE_OS::strcasecmp (name, + ACE_LIB_TEXT("lfu")) == 0) + this->connection_purging_type_ = + TAO_Resource_Factory::LFU; + else if (ACE_OS::strcasecmp (name, + ACE_LIB_TEXT("fifo")) == 0) + this->connection_purging_type_ = + TAO_Resource_Factory::FIFO; + else if (ACE_OS::strcasecmp (name, + ACE_LIB_TEXT("null")) == 0) + this->connection_purging_type_ = + TAO_Resource_Factory::NOOP; + else + this->report_option_value_error (ACE_LIB_TEXT("-ORBConnectionPurgingStrategy"), name); + } + } else if (ACE_OS::strcasecmp (argv[curarg], ACE_LIB_TEXT("-ORBConnectionCacheMax")) == 0) { @@ -220,23 +255,6 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) this->report_option_value_error (ACE_LIB_TEXT("-ORBConnectionCachePurgePercentage"), argv[curarg]); } - - else if (ACE_OS::strcasecmp (argv[curarg], - ACE_LIB_TEXT("-ORBPurgePercentage")) == 0) - { - ACE_DEBUG ((LM_DEBUG, - ACE_LIB_TEXT ("TAO (%P|%t) This option has been ") - ACE_LIB_TEXT ("deprecated\n") - ACE_LIB_TEXT ("using -ORBConnectionCachePurgePercentage ") - ACE_LIB_TEXT ("instead "))); - curarg++; - if (curarg < argc) - this->purge_percentage_ = ACE_OS::atoi (argv[curarg]); - else - this->report_option_value_error (ACE_LIB_TEXT("-ORBPurgePercentage"), - argv[curarg]); - } - else if (ACE_OS::strcasecmp (argv[curarg], ACE_LIB_TEXT("-ORBIORParser")) == 0) { @@ -736,12 +754,6 @@ TAO_Default_Resource_Factory::output_cdr_msgblock_allocator (void) return allocator; } -TAO_Resource_Factory::Caching_Strategy -TAO_Default_Resource_Factory::connection_caching_strategy_type (void) const -{ - return this->connection_caching_type_; -} - int TAO_Default_Resource_Factory::cache_maximum (void) const { @@ -812,7 +824,7 @@ TAO_Default_Resource_Factory::create_purging_strategy (void) { TAO_Connection_Purging_Strategy *strategy = 0; - if (this->connection_caching_type_ == TAO_Resource_Factory::LRU) + if (this->connection_purging_type_ == TAO_Resource_Factory::LRU) { ACE_NEW_RETURN (strategy, TAO_LRU_Connection_Purging_Strategy ( diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h index c0c11bba5a4..627b97a0e93 100644 --- a/TAO/tao/default_resource.h +++ b/TAO/tao/default_resource.h @@ -113,7 +113,6 @@ public: virtual int init_protocol_factories (void); - virtual TAO_Resource_Factory::Caching_Strategy connection_caching_strategy_type (void) const; virtual int cache_maximum (void) const; virtual int purge_percentage (void) const; virtual int max_muxed_connections (void) const; @@ -159,9 +158,9 @@ protected: /// list of loaded protocol factories. TAO_ProtocolFactorySet protocol_factories_; - /// Specifies the typeof caching strategy we should use for - /// connection management. - TAO_Resource_Factory::Caching_Strategy connection_caching_type_; + /// Specifies the typeof purging strategy we should use for cleaning + /// up unused connections + TAO_Resource_Factory::Purging_Strategy connection_purging_type_; /// Specifies the maximum number of connections which should get cached /// in the ORB. diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index 6021ef12961..0b7b96b6ff8 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -188,14 +188,17 @@ const size_t TAO_DEFAULT_OBJECT_REF_TABLE_SIZE = 256; # define TAO_USES_ROBUST_CONNECTION_MGMT #endif /* ! ACE_MVS */ -// This deals with the strategies for connection caching. By default -// it is the Null Strategy. Although it shall be Least Recently Used -// (LRU) with the default purging percentage of 20% once this feature -// has been thoroughly tested. +// @@todo: The connection caching strategy defeinition shoudl probably +// go. #if !defined (TAO_CONNECTION_CACHING_STRATEGY) # define TAO_CONNECTION_CACHING_STRATEGY TAO_Resource_Factory::LRU #endif /* TAO_CONNECTION_CACHING_STRATEGY */ +#if !defined (TAO_CONNECTION_PURGING_STRATEGY) +# define TAO_CONNECTION_PURGING_STRATEGY TAO_Resource_Factory::LRU +#endif /* TAO_CONNECTION_PURGING_STRATEGY */ + + #if !defined (TAO_PURGE_PERCENT) # define TAO_PURGE_PERCENT 20 #endif /* TAO_PURGE_PERCENT */ diff --git a/TAO/tests/Connection_Purging/client.fifo.conf b/TAO/tests/Connection_Purging/client.fifo.conf index 3a419861617..7d94c63873c 100644 --- a/TAO/tests/Connection_Purging/client.fifo.conf +++ b/TAO/tests/Connection_Purging/client.fifo.conf @@ -1,3 +1,3 @@ # $Id$ # -static Advanced_Resource_Factory "-ORBConnectionCachingStrategy fifo -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30" +static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy fifo -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30" diff --git a/TAO/tests/Connection_Purging/client.lfu.conf b/TAO/tests/Connection_Purging/client.lfu.conf index b6f9f9b6825..3c7eed6c16b 100644 --- a/TAO/tests/Connection_Purging/client.lfu.conf +++ b/TAO/tests/Connection_Purging/client.lfu.conf @@ -1,3 +1,3 @@ # $Id$ # -static Advanced_Resource_Factory "-ORBConnectionCachingStrategy lfu -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30" +static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy lfu -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30" diff --git a/TAO/tests/Connection_Purging/client.lru.conf b/TAO/tests/Connection_Purging/client.lru.conf index 05d0a821607..03a9237697c 100644 --- a/TAO/tests/Connection_Purging/client.lru.conf +++ b/TAO/tests/Connection_Purging/client.lru.conf @@ -1,3 +1,3 @@ # $Id$ # -static Advanced_Resource_Factory "-ORBConnectionCachingStrategy lru -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30" +static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy lru -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30" diff --git a/TAO/tests/Connection_Purging/client.null.conf b/TAO/tests/Connection_Purging/client.null.conf index a17153121a6..dcb4c8ee4cf 100644 --- a/TAO/tests/Connection_Purging/client.null.conf +++ b/TAO/tests/Connection_Purging/client.null.conf @@ -1,3 +1,3 @@ # $Id$ # -static Advanced_Resource_Factory "-ORBConnectionCachingStrategy null" +static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy null" |