summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Connector.cpp
diff options
context:
space:
mode:
authoroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-17 14:24:17 +0000
committeroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-17 14:24:17 +0000
commit0f26b15489ae2c7a1d1de00cb019b3c8238a574f (patch)
treec4be9440656b7b04a4f231363e42ef221945623e /TAO/tao/IIOP_Connector.cpp
parentc1a6f3562c72fae20f13bd7a4b3dad5d1cdfb583 (diff)
downloadATCD-0f26b15489ae2c7a1d1de00cb019b3c8238a574f.tar.gz
ChangeLogTag: Thu May 17 08:53:33 2001 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tao/IIOP_Connector.cpp')
-rw-r--r--TAO/tao/IIOP_Connector.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index df46d268994..ddc3d34c51a 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -12,6 +12,7 @@
#include "ace/Auto_Ptr.h"
#include "tao/Base_Transport_Property.h"
#include "tao/Protocols_Hooks.h"
+#include "tao/Connection_Purging_Strategy.h"
#include "ace/Strategies_T.h"
#include "ace/SOCK_Connector.h"
@@ -158,8 +159,8 @@ TAO_IIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc,
// Check the Cache first for connections
// If transport found, reference count is incremented on assignment
- if (this->orb_core ()->transport_cache ().find_transport (desc,
- base_transport) == 0)
+ if (this->orb_core ()->purging_strategy ()->find_in_cache (desc,
+ base_transport) == 0)
{
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
@@ -174,6 +175,9 @@ TAO_IIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc,
ACE_TEXT ("(%P|%t) IIOP_Connector::connect - ")
ACE_TEXT ("making a new connection\n")));
+ // Purge connections (if necessary)
+ this->orb_core ()->purging_strategy ()->purge ();
+
// @@ This needs to change in the next round when we implement a
// policy that will not allow new connections when a connection
// is busy.
@@ -224,8 +228,8 @@ TAO_IIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc,
base_transport = TAO_Transport::_duplicate (svc_handler->transport ());
// Add the handler to Cache
int retval =
- this->orb_core ()->transport_cache ().cache_transport (desc,
- base_transport);
+ this->orb_core ()->purging_strategy ()->add_to_cache (desc,
+ base_transport);
if (retval != 0 && TAO_debug_level > 0)
{
@@ -370,8 +374,8 @@ TAO_IIOP_Connector::preconnect (const char *preconnects)
// Add the handler to Cache
int retval =
- this->orb_core ()->transport_cache ().cache_transport (&prop,
- handlers[slot]->transport ());
+ this->orb_core ()->purging_strategy ()->add_to_cache (&prop,
+ handlers[slot]->transport ());
successes++;
if (retval != 0 && TAO_debug_level > 4)