summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-11-05 22:09:34 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-11-05 22:09:34 +0000
commitc357832867d68638fce9a2db576bda4a9b429b8c (patch)
treef336781ca7674602391e54d8e2234068df02250e
parent326d3ddfd57972215a9145b4e42a1462cf8b6a85 (diff)
downloadATCD-c357832867d68638fce9a2db576bda4a9b429b8c.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Connection_Cache_Manager.cpp336
-rw-r--r--TAO/tao/Connection_Cache_Manager.h223
-rw-r--r--TAO/tao/Connection_Cache_Manager.inl164
3 files changed, 0 insertions, 723 deletions
diff --git a/TAO/tao/Connection_Cache_Manager.cpp b/TAO/tao/Connection_Cache_Manager.cpp
deleted file mode 100644
index 0a2d9193680..00000000000
--- a/TAO/tao/Connection_Cache_Manager.cpp
+++ /dev/null
@@ -1,336 +0,0 @@
-#include "tao/Connection_Cache_Manager.h"
-#include "tao/Connection_Handler.h"
-#include "tao/debug.h"
-#include "tao/ORB_Core.h"
-#include "tao/Resource_Factory.h"
-
-#if !defined (__ACE_INLINE__)
-# include "tao/Connection_Cache_Manager.inl"
-#endif /* __ACE_INLINE__ */
-
-
-ACE_RCSID(tao, Connection_Cache_Hash_Manager, "$Id$")
-
-
-TAO_Connection_Cache_Manager::
- TAO_Connection_Cache_Manager (void)
- : cache_map_ (),
- cache_lock_ (0)
-{
-
-}
-
-TAO_Connection_Cache_Manager::~TAO_Connection_Cache_Manager (void)
-{
- // Delete the lock that we have
- delete this->cache_lock_;
-}
-
-int
-TAO_Connection_Cache_Manager::open (TAO_ORB_Core *orb_core,
- size_t size)
-{
- // Create the cache_lock
- this->cache_lock_ =
- orb_core->resource_factory ()->create_cached_connection_lock ();
-
- if (this->cache_lock_ == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("TAO (%P|%t) ERROR TAO_Connection_Cache_Manager::open "),
- ACE_TEXT ("Lock creation error \n")),
- -1);
- }
-
- // Now open the cache map
- return this->cache_map_.open (size);
-}
-
-int
-TAO_Connection_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
- TAO_Cache_IntId &int_id)
-{
- // Get the entry too
- HASH_MAP_ENTRY *entry = 0;
- int retval = this->cache_map_.bind (ext_id,
- int_id,
- entry);
- if (retval == 0)
- {
- // The entry has been added to cache succesfully
- // Add the cache_map_entry to the handler
- int_id.handler () ->cache_map_entry (entry);
- }
- else if (retval == 1)
- {
- if (TAO_debug_level > 0 && retval != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::bind_i")
- ACE_TEXT (" unable to bind in the first attempt")
- ACE_TEXT (" so trying with a new index \n")));
- }
-
- // There was an entry like this before, so let us do some
- // minor adjustments
- retval = this->get_last_index_bind (ext_id,
- int_id,
- entry);
- if (retval == 0)
- int_id.handler ()->cache_map_entry (entry);
- }
-
- if (TAO_debug_level > 0 && retval != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::bind_i")
- ACE_TEXT (" unable to bind \n")));
- }
-
- return retval;
-}
-
-
-int
-TAO_Connection_Cache_Manager::find_i (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value)
-{
- HASH_MAP_ENTRY *entry = 0;
-
- // Get the entry from the Hash Map
- int retval = this->cache_map_.find (key,
- entry);
- if (retval == 0)
- {
- retval = this->get_idle_handler (key,
- entry);
-
- // We have a succesful entry
- if (entry)
- {
- value = entry->int_id_;
- }
-
- if (TAO_debug_level > 0 && retval != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::find_i")
- ACE_TEXT (" unable to locate a free connection \n")));
- }
- }
-
-
- return retval;
-}
-
-int
-TAO_Connection_Cache_Manager::rebind_i (const TAO_Cache_ExtId &key,
- const TAO_Cache_IntId &value)
-{
- return this->cache_map_.rebind (key,
- value);
-}
-
-int
-TAO_Connection_Cache_Manager::trybind_i (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value)
-{
- return this->cache_map_.trybind (key, value);
-}
-
-int
-TAO_Connection_Cache_Manager::unbind_i (const TAO_Cache_ExtId &key)
-{
- return this->cache_map_.unbind (key);
-}
-
-int
-TAO_Connection_Cache_Manager::unbind_i (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value)
-{
- return this->cache_map_.unbind (key,
- value);
-}
-
-int
-TAO_Connection_Cache_Manager::make_idle_i (HASH_MAP_ENTRY *&entry)
-{
-
- // First get the entry again (if at all things had changed in the
- // cache map in the mean time)
- HASH_MAP_ENTRY *new_entry = 0;
- int retval = this->cache_map_.find (entry->ext_id_,
- new_entry);
- if (retval == 0)
- {
- new_entry->int_id_.
- recycle_state (ACE_RECYCLABLE_IDLE_AND_PURGABLE);
-
- entry = new_entry;
- }
- else if (TAO_debug_level > 0 && retval != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::make_idle_i")
- ACE_TEXT ("unable to locate the entry to make it idle \n")));
- }
-
- return retval;
-}
-
-int
-TAO_Connection_Cache_Manager::mark_closed_i (HASH_MAP_ENTRY *&entry)
-{
- // First get the entry again (if at all things had changed in the
- // cache map in the mean time)
- HASH_MAP_ENTRY *new_entry = 0;
-
- int retval = this->cache_map_.find (entry->ext_id_,
- new_entry);
- if (retval == 0)
- {
- new_entry->int_id_.
- recycle_state (ACE_RECYCLABLE_CLOSED);
-
- entry = new_entry;
- }
- else if (TAO_debug_level > 0 && retval != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::make_idle_i")
- ACE_TEXT ("unable to locate the entry to mark it as closed \n")));
- }
-
- return retval;
-}
-
-int
-TAO_Connection_Cache_Manager::close_i (ACE_Handle_Set &handle_set)
-{
-
-
- for (HASH_MAP_ITER iter = this->cache_map_.begin ();
- iter != this->cache_map_.end ();
- iter ++)
- {
-
- // Should I look for IDLE & PURGABLE ones to remove? That would
- // sound odd as we would be called at ORB destruction time. So,
- // we should just go ahead and remove the entries from the map
-
- // As a first step, check whether the handler has been
- // registered with the reactor. If registered, then get the
- // handle and set that in the <handle_set> so that the ORB_Core
- // would deregister them from the reactor before shutdown.
- if ((*iter).int_id_.handler ()->is_registered ())
- {
- handle_set.set_bit ((*iter).int_id_.handler ()->fetch_handle ());
- }
-
- // Then decrement the reference count on the handler
- (*iter).int_id_.handler ()->decr_ref_count ();
-
- // Then remove the entry from the map
- // @@ When I get the purging ready, I should call purge () from
- // here.
- HASH_MAP_ENTRY &entry = (*iter);
-
- this->cache_map_.unbind (&entry);
- }
-
- return 0;
-}
-
-int
-TAO_Connection_Cache_Manager::
- get_last_index_bind (TAO_Cache_ExtId &key,
- TAO_Cache_IntId &val,
- HASH_MAP_ENTRY *&entry)
-{
- CORBA::ULong ctr = entry->ext_id_.index ();
-
- // Start looking at the succesive elements
- while (entry->next_ != 0 &&
- entry->next_->ext_id_.index () != 0)
- {
- ctr++;
-
- // Change the entry
- entry = entry->next_;
- }
-
- // Set the index
- key.index (ctr + 1);
-
- // Now do a bind again with the new index
- return this->cache_map_.bind (key,
- val,
- entry);
-}
-
-
-int
-TAO_Connection_Cache_Manager::
- get_idle_handler (const TAO_Cache_ExtId & /*ext_id*/,
- HASH_MAP_ENTRY *&entry)
-{
- // We are sure that we have an entry
- do
- {
- // Found the entry, so check whether it is busy
- if (entry->int_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE ||
- entry->int_id_.recycle_state () == ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE)
- {
- // Save that in the handler
- entry->int_id_.handler ()->cache_map_entry (entry);
-
- // Mark the connection as busy
- entry->int_id_.recycle_state (ACE_RECYCLABLE_BUSY);
- return 0;
- }
- else
- {
- entry = entry->next_;
- }
- }
- // This would prevent us from moving to the next ext_id..
- while (entry->next_->ext_id_.index () != 0);
-
- // @@ There is a subtle assumption that I have made, ie. the
- // elements with higher indexes of ext_id will be placed
- // continously. That could be *bad*
-
- // We havent got a connection, so set the pointer to null.
- entry = 0;
- return -1;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
- // Instantiations for the Hash Map
-template class ACE_Equal_To<TAO_Cache_ExtId>;
-template class ACE_Hash<TAO_Cache_ExtId>;
-template class ACE_Hash_Map_Entry<TAO_Cache_ExtId, TAO_Cache_IntId>;
-template class ACE_Hash_Map_Manager<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
- // Instantiations for the Hash Map
-#pragma instantiate ACE_Equal_To<TAO_Cache_ExtId>
-#pragma instantiate ACE_Hash<TAO_Cache_ExtId>
-#pragma instantiate ACE_Hash_Map_Entry<TAO_Cache_ExtId, TAO_Cache_IntId>
-#pragma instantiate ACE_Hash_Map_Manager<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_Cache_ExtId, TAO_Cache_IntId, ACE_Hash<TAO_Cache_ExtId>, ACE_Equal_To<TAO_Cache_ExtId>, ACE_Null_Mutex>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/Connection_Cache_Manager.h b/TAO/tao/Connection_Cache_Manager.h
deleted file mode 100644
index 0158211697f..00000000000
--- a/TAO/tao/Connection_Cache_Manager.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// Connection_Cache_Manager.h
-//
-// = AUTHOR
-// Bala Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_CONNECTION_CACHE_MANAGER_H
-#define TAO_CONNECTION_CACHE_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/Hash_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/TAO_Export.h"
-#include "tao/Cache_Entries.h"
-
-#if defined(_MSC_VER)
-#if (_MSC_VER >= 1200)
-#pragma warning(push)
-#endif /* _MSC_VER >= 1200 */
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class TAO_ORB_Core;
-
-class TAO_Export TAO_Connection_Cache_Manager
-{
- // = TITLE
- // The Connection Cache Manager for TAO
-
- // = DESCRIPTION
- // This class provides interfaces associating a TAO_Cache_ExtId
- // & TAO_Cache_IntId. This class manages a ACE_Hash_Map_Manager
- // class which is used as a container to Cache the
- // connections. This class protects the entries with a lock. The
- // map can be updated only by holding the lock.
-
- // General Note: This class at present has an interface that may
- // not be needed. But, the interface has just been copied from
- // the ACE Hash Map Manager classes. The interface wold be
- // pruned once I get the purging stuff also in. Till then let
- // the interface be there as it is.
-public:
-
- // Some useful typedef's
- typedef ACE_Hash_Map_Manager <TAO_Cache_ExtId,
- TAO_Cache_IntId,
- ACE_Null_Mutex>
- HASH_MAP;
-
- typedef ACE_Hash_Map_Iterator <TAO_Cache_ExtId,
- TAO_Cache_IntId,
- ACE_Null_Mutex>
- HASH_MAP_ITER;
-
- typedef ACE_Hash_Map_Entry <TAO_Cache_ExtId,
- TAO_Cache_IntId>
- HASH_MAP_ENTRY;
-
- // == Public methods
-
- TAO_Connection_Cache_Manager (void);
- // Constructor
-
- virtual ~TAO_Connection_Cache_Manager (void);
- // Destructor
-
- int cache_handler (TAO_Base_Connection_Property *prop,
- TAO_Connection_Handler *handler);
- // Add the handler to the cache. The handler has the property
- // definition based on which caching can be done
-
-
- int find_handler (TAO_Base_Connection_Property *prop,
- TAO_Connection_Handler *&handler);
- // Check the Connection Cache to check whether the connection exists
- // in the Cache and return the connection
-
- int open (TAO_ORB_Core *orb_core,
- size_t size = ACE_DEFAULT_MAP_SIZE);
- // Initialize the lock and the <HASH_MAP> with <size> elements.
-
- int bind (TAO_Cache_ExtId &ext_id,
- TAO_Cache_IntId &int_id);
- // Associate <ext_id> with <int_id>. Grabs the lock and calls the
- // implementation function bind_i.
-
- int find (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value);
- // Lookup entry<key,value> in the cache. Grabs the lock and calls the
- // implementation function find_i.
-
- int rebind (const TAO_Cache_ExtId &key,
- const TAO_Cache_IntId &value);
- // Reassociate the <key> with <value>. Grabs the lock and calls the
- // implementation function find_i.
-
- int trybind (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // cache. Grabs the lock and calls the implementation function
- // find_i.
-
- int unbind (const TAO_Cache_ExtId &key);
- // Remove <key> from the cache.
-
- int unbind (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value);
- // Remove <key> from the cache, and return the <value> associated with
- // <key>.
-
- int purge (void);
- // Remove entries from the cache depending upon the strategy.
-
- int make_idle (HASH_MAP_ENTRY *&entry);
- // Make the entry idle and ready for use.
-
- int mark_closed (HASH_MAP_ENTRY *&entry);
- // Mark the entry as closed
-
- int close (ACE_Handle_Set &handle_set);
- // Close the underlying hash map manager and return the handle set
- // that have been registered with the reactor
-
- size_t current_size (void) const;
- // Return the current size of the cache.
-
- size_t total_size (void) const;
- // Return the total size of the cache.
-
-private:
-
- int bind_i (TAO_Cache_ExtId &ext_id,
- TAO_Cache_IntId &int_id);
- // Non-Locking version and actual implementation of bind ()
- // call. Calls bind on the Hash_Map_Manager that it holds. If the
- // bind succeeds, it adds the Hash_Map_Entry in to the
- // Connection_Handler for its reference. If the bind fails because
- // of an exiting entry, this method calls the get_last_index_bind
- // ().
-
- int find_i (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value);
- // Non-locking version and actual implementation of find ()
- // call. This calls the find () on the underlying
- // Hash_Map_Manager. If the find succeeds, it calls the
- // get_idle_handler ().
-
- int rebind_i (const TAO_Cache_ExtId &key,
- const TAO_Cache_IntId &value);
- // Non-locking version and actual implementation of rebind () call
-
- int trybind_i (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value);
- // Non-locking version and actual implementation of trybind () call
-
- int unbind_i (const TAO_Cache_ExtId &key);
- // Non-locking version and actual implementation of unbind () call
-
- int unbind_i (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value);
- // Non-locking version and actual implementation of unbind () call
-
- int make_idle_i (HASH_MAP_ENTRY *&entry);
- // Non-locking version and actual implementation of make_idle ().
-
- int mark_closed_i (HASH_MAP_ENTRY *&entry);
- // Non-locking version and actual implementation of mark_closed ()
-
- int close_i (ACE_Handle_Set &handle_set);
- // Non-locking version and actual implementation of close ()
-
-private:
-
- int get_last_index_bind (TAO_Cache_ExtId &key,
- TAO_Cache_IntId &val,
- HASH_MAP_ENTRY *&entry);
- // This is called by the bind () call when a bind fails with a
- // available entry. When a new connection is created in TAO with an
- // already existing endpoint, in addition to an exisitng one, we
- // mark the connections with an index. This method, finds out the
- // last highest index and binds the entry with an index = (last
- // highest index + 1).
-
- int get_idle_handler (const TAO_Cache_ExtId &ext_id,
- HASH_MAP_ENTRY *&entry);
- // This is called by the find (). Get an idle handler if one is
- // available in Cache. If an idle one does not exist, we look at the
- // next entry to see whether we have an entry of the same ext_id
- // type. If so, we check whether they are are idle for use. If we
- // find one we mark it busy, and set the Hash_Map_Entry in the
- // Connection_Handler object.
-
-
-
-private:
-
- HASH_MAP cache_map_;
- // The hash map that has the connections
-
- ACE_Lock *cache_lock_;
- // Lock for the map
-};
-
-#if defined (__ACE_INLINE__)
-# include "tao/Connection_Cache_Manager.inl"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /*TAO_CONNECTION_CACHE_MANAGER_H*/
diff --git a/TAO/tao/Connection_Cache_Manager.inl b/TAO/tao/Connection_Cache_Manager.inl
deleted file mode 100644
index 0eb245b2531..00000000000
--- a/TAO/tao/Connection_Cache_Manager.inl
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- C++ -*- */
-//$Id$
-
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::
- cache_handler (TAO_Base_Connection_Property *prop,
- TAO_Connection_Handler *handler)
-{
- // Compose the ExternId & Intid
- TAO_Cache_ExtId ext_id (prop);
- TAO_Cache_IntId int_id (handler);
-
- return this->bind (ext_id,
- int_id);
-
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::
- find_handler (TAO_Base_Connection_Property *prop,
- TAO_Connection_Handler *&handler)
-{
- // Compose the ExternId
- TAO_Cache_ExtId ext_id (prop);
- TAO_Cache_IntId int_id;
-
- int retval = this->find (ext_id,
- int_id);
- if (retval == 0)
- {
- handler = int_id.handler ();
- }
-
- return retval;
-}
-
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::bind (TAO_Cache_ExtId &ext_id,
- TAO_Cache_IntId &int_id)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->bind_i (ext_id,
- int_id);
-}
-
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::find (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->find_i (key,
- value);
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::rebind (const TAO_Cache_ExtId &key,
- const TAO_Cache_IntId &value)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->rebind_i (key,
- value);
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::trybind (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->trybind_i (key, value);
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::unbind (const TAO_Cache_ExtId &key)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->unbind_i (key);
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::unbind (const TAO_Cache_ExtId &key,
- TAO_Cache_IntId &value)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->unbind_i (key,
- value);
-}
-
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::purge (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::make_idle (HASH_MAP_ENTRY *&entry)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
- return this->make_idle_i (entry);
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::mark_closed (HASH_MAP_ENTRY *&entry)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
- return this->mark_closed_i (entry);
-}
-
-ACE_INLINE int
-TAO_Connection_Cache_Manager::close (ACE_Handle_Set &handle_Set)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->cache_lock_,
- -1));
-
- return this->close_i (handle_Set);
-}
-
-
-ACE_INLINE size_t
-TAO_Connection_Cache_Manager::current_size (void) const
-{
- return this->cache_map_.current_size ();
-}
-
-ACE_INLINE size_t
-TAO_Connection_Cache_Manager::total_size (void) const
-{
- return this->cache_map_.total_size ();
-}