summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/SHMIOP_Connector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/SHMIOP_Connector.cpp')
-rw-r--r--TAO/tao/Strategies/SHMIOP_Connector.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp
index eec5c62dcae..b8277c19a9d 100644
--- a/TAO/tao/Strategies/SHMIOP_Connector.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp
@@ -13,6 +13,7 @@
#include "tao/Client_Strategy_Factory.h"
#include "tao/Environment.h"
#include "ace/Auto_Ptr.h"
+#include "tao/Connection_Purging_Strategy.h"
ACE_RCSID (Strategies,
SHMIOP_Connector,
@@ -164,8 +165,8 @@ TAO_SHMIOP_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 > 5)
ACE_DEBUG ((LM_DEBUG,
@@ -180,6 +181,9 @@ TAO_SHMIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc,
ACE_TEXT ("(%P|%t) SHMIOP_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.
@@ -232,8 +236,8 @@ TAO_SHMIOP_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,
- svc_handler->transport ());
+ this->orb_core ()->purging_strategy ()->add_to_cache (desc,
+ svc_handler->transport ());
if (retval != 0 && TAO_debug_level > 0)
{
@@ -365,8 +369,8 @@ TAO_SHMIOP_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)