summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-03 20:08:15 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-03 20:08:15 +0000
commite5ce3c227bc4b414007754a4e82756e9827d7dec (patch)
tree30d3ee4ceff38b7db97ec3dfd369bec9e47c577f /examples
parent57a8452760992f718cc6108908bc8f0cc859f7a6 (diff)
downloadATCD-e5ce3c227bc4b414007754a4e82756e9827d7dec.tar.gz
part of the HTTP_Client example
Diffstat (limited to 'examples')
-rw-r--r--examples/Web_Crawler/Caching_Strategies_T.cpp247
-rw-r--r--examples/Web_Crawler/Caching_Strategies_T.h339
-rw-r--r--examples/Web_Crawler/Caching_Strategies_T.i287
3 files changed, 873 insertions, 0 deletions
diff --git a/examples/Web_Crawler/Caching_Strategies_T.cpp b/examples/Web_Crawler/Caching_Strategies_T.cpp
new file mode 100644
index 00000000000..bc0d969c7de
--- /dev/null
+++ b/examples/Web_Crawler/Caching_Strategies_T.cpp
@@ -0,0 +1,247 @@
+//$Id$
+
+#ifndef CACHING_STRATEGIES_T_C
+#define CACHING_STRATEGIES_T_C
+
+#include "Caching_Strategies_T.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#define ACE_LACKS_PRAGMA_ONCE
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#if !defined (__ACE_INLINE__)
+#include "Caching_Strategies_T.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(HTTP_1.1_Client, Caching_Strategies_T, "$Id$")
+
+template<class CONTAINER> int
+ACE_LRU_Caching_Strategy<CONTAINER>::clear_cache (CONTAINER &container)
+{
+ // Check that the purge_percent is non-zero.
+ if (purge_percent_ == 0)
+ return 0;
+
+ // Also whether the number of entries in the cache is just one!
+ // Oops! then thers no way out but exiting. So return an error.
+ if (this->entries_ == 1)
+ return -1;
+
+ KEY key_to_remove;
+ VALUE value_to_remove;
+
+ ITEM *item = 0;
+
+ ATTRIBUTES min = 0;
+
+ // Return value.
+ int result = 0;
+
+ // Calculate the no of entries to remove form the cache depending upon the <purge_percent>.
+ int no_of_entries = (this->purge_percent_/100) * this->entries_;
+ // If the number of entries is less than 10 with the default percent
+ // being 10, the calculated no_pf_entries equals 0. So increment it
+ // so that atleast one entry gets purged.
+ if (no_of_entries == 0)
+ {
+ if (container.current_size () >= 1)
+ no_of_entries = 1;
+ }
+
+ for (int i = 0; i < no_of_entries ; ++i)
+ {
+ ITERATOR iter (container);
+
+ // The iterator moves thru the container searching for the entry with the
+ // lowest ATTRIBUTES.
+
+ for (min = (*iter).int_id_.second (), key_to_remove = (*iter).ext_id_, value_to_remove = (*iter).int_id_;
+ iter.next (item) != 0 ;
+ ++iter)
+ {
+ // Ah! an item with lower ATTTRIBUTES...
+ if (min > (*iter).int_id_.second ())
+ {
+ min = (*iter).int_id_.second ();
+ key_to_remove = (*iter).ext_id_;
+ value_to_remove = (*iter).int_id_;
+ }
+ }
+ ACE_DEBUG ((LM_DEBUG, "AUTO_PURGE\nLRU: before unbind: current_size %d\n", container.current_size ()));
+
+ // Delete the dynamically allocated value object.
+ if (value_to_remove.first () != 0)
+ {
+ (value_to_remove.first ())->recycler (0, 0);
+
+ result = (value_to_remove.first ())->close();
+ if (result == -1)
+ return result;
+ }
+ // Remove the item from cache.
+ result = container.unbind (key_to_remove);
+ --this->entries_;
+ ACE_DEBUG ((LM_DEBUG, "LRU:after unbind: result %d current_size %d\n", result, container.current_size ()));
+ }
+ return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+template<class CONTAINER> int
+ACE_LFU_Caching_Strategy<CONTAINER>::clear_cache (CONTAINER &container)
+{
+ // Check that the purge_percent is non-zero.
+ if (purge_percent_ == 0)
+ return 0;
+
+ // Also whether the number of entries in the cache is just one!
+ // Oops! then thers no way out but exiting. So return an error.
+ if (this->entries_ == 1)
+ return -1;
+
+ KEY key_to_remove;
+ VALUE value_to_remove;
+
+ ITEM *item = 0;
+
+ ATTRIBUTES min = 0;
+
+ // Return value.
+ int result = 0;
+
+ // Calculate the no of entries to remove form the cache depending upon the <purge_percent>.
+ int no_of_entries = (this->purge_percent_/100) * this->entries_;
+ // If the number of entries is less than 10 with the default percent
+ // being 10, the calculated no_pf_entries equals 0. So increment it
+ // so that atleast one entry gets purged.
+ if (no_of_entries == 0)
+ {
+ if (container.current_size () >= 1)
+ no_of_entries = 1;
+ }
+
+ for (int i = 0; i < no_of_entries ; ++i)
+ {
+ ITERATOR iter (container);
+ // The iterator moves thru the container searching for the entry with the
+ // lowest ATTRIBUTES.
+
+ for (min = (*iter).int_id_.second (), key_to_remove = (*iter).ext_id_, value_to_remove = (*iter).int_id_;
+ iter.next (item) != 0 ;
+ ++iter)
+ {
+ // Ah! an item with lower ATTTRIBUTES...
+ if (min > (*iter).int_id_.second ())
+ {
+ min = (*iter).int_id_.second ();
+ key_to_remove = (*iter).ext_id_;
+ value_to_remove = (*iter).int_id_;
+ }
+ }
+ ACE_DEBUG ((LM_DEBUG, "AUTO_PURGE\nLFU: before unbind: current_size %d\n", container.current_size ()));
+
+ // Delete the dynamically allocated value object.
+ if (value_to_remove.first () != 0)
+ {
+ (value_to_remove.first ())->recycler (0, 0);
+
+ result = (value_to_remove.first ())->close();
+ if (result == -1)
+ return result;
+ }
+ // Remove the item from cache.
+ result = container.unbind (key_to_remove);
+ --this->entries_;
+ ACE_DEBUG ((LM_DEBUG, "LFU:after unbind: result %d current_size %d\n", result, container.current_size ()));
+ }
+ return result;
+
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+template<class CONTAINER> int
+ACE_FIFO_Caching_Strategy<CONTAINER>::clear_cache (CONTAINER &container)
+{
+ // Check that the purge_percent is non-zero.
+ if (this->purge_percent_ == 0)
+ return 0;
+
+ // Also whether the number of entries in the cache is just one!
+ // Oops! then thers no way out but exiting. So return an error.
+ if (this->entries_ == 1)
+ return -1;
+
+ KEY key_to_remove;
+ VALUE value_to_remove;
+
+ ITEM *item = 0;
+
+ ATTRIBUTES min = 0;
+
+ // Return value.
+ int result = 0;
+
+ // Calculate the no of entries to remove form the cache depending upon the <purge_percent>.
+ int no_of_entries = (this->purge_percent_/100) * this->entries_;
+ // If the number of entries is less than 10 with the default percent
+ // being 10, the calculated no_pf_entries equals 0. So increment it
+ // so that atleast one entry gets purged.
+ if (no_of_entries == 0)
+ {
+ if (container.current_size () >= 1)
+ no_of_entries = 1;
+ }
+
+ for (int i = 0; i < no_of_entries ; ++i)
+ {
+ ITERATOR iter (container);
+ // The iterator moves thru the container searching for the entry with the
+ // lowest ATTRIBUTES.
+ for (min = (*iter).int_id_.second (), key_to_remove = (*iter).ext_id_, value_to_remove = (*iter).int_id_;
+ iter.next (item) != 0 ;
+ ++iter)
+ {
+ // Ah! an item with lower ATTTRIBUTES...
+ if (min > (*iter).int_id_.second ())
+ {
+ min = (*iter).int_id_.second ();
+ key_to_remove = (*iter).ext_id_;
+ value_to_remove = (*iter).int_id_;
+ }
+ }
+ ACE_DEBUG ((LM_DEBUG, "AUTO_PURGE\nFIFO: before unbind: current_size %d\n", container.current_size ()));
+
+ // Delete the dynamically allocated value object.
+ if (value_to_remove.first () != 0)
+ {
+ (value_to_remove.first ())->recycler (0, 0);
+
+ result = (value_to_remove.first ())->close();
+ if (result == -1)
+ return result;
+ }
+ // Remove the item from cache.
+ result = container.unbind (key_to_remove);
+ --this->entries_;
+ ACE_DEBUG ((LM_DEBUG, "FIFO:after unbind: result %d current_size %d\n", result, container.current_size ()));
+ }
+ return result;
+
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+template<class CONTAINER> int
+ACE_Null_Caching_Strategy<CONTAINER>::clear_cache (CONTAINER &container)
+{
+ return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+ACE_ALLOC_HOOK_DEFINE(ACE_LRU_Caching_Strategy)
+ACE_ALLOC_HOOK_DEFINE(ACE_LFU_Caching_Strategy)
+ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Caching_Strategy)
+ACE_ALLOC_HOOK_DEFINE(ACE_Null_Caching_Strategy)
+#endif /* CACHING_STRATEGIES_T_C */
+
diff --git a/examples/Web_Crawler/Caching_Strategies_T.h b/examples/Web_Crawler/Caching_Strategies_T.h
new file mode 100644
index 00000000000..d2d7b4c0f0e
--- /dev/null
+++ b/examples/Web_Crawler/Caching_Strategies_T.h
@@ -0,0 +1,339 @@
+/* -*- C++ -*- */
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// Caching_Strategies_T.h
+//
+// = AUTHOR
+// Kirthika Parameswaran <kirthika@cs.wustl.edu>
+//
+// ============================================================================
+#ifndef CACHING_STRATEGIES_H
+#define CACHING_STRATEGIES_H
+
+#include "ace/OS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#define ACE_LACKS_PRAGMA_ONCE
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+template<class CONTAINER>
+class ACE_LRU_Caching_Strategy
+{
+ // = TITLE
+ // Defines a Least Recently Used strategy which will decide on
+ // the item to be removed from the cache.
+ //
+ // = DESCRIPTION
+ // This is a strategy which makes use of a virtual timer which
+ // is updated whenever an item is inserted or looked up in the
+ // container. When the need of purging entries arises, the items
+ // with the lowest timer values are removed.
+
+public:
+ typedef int ATTRIBUTES;
+
+ // Traits.
+ typedef ACE_TYPENAME CONTAINER::KEY KEY;
+
+ typedef ACE_TYPENAME CONTAINER::VALUE VALUE;
+
+ typedef ACE_TYPENAME CONTAINER::ITERATOR ITERATOR;
+
+ typedef ACE_TYPENAME CONTAINER::ENTRY ITEM;
+
+ // = Initialisation and termination.
+
+ ACE_LRU_Caching_Strategy (CONTAINER &container,
+ ATTRIBUTES timer = 0,
+ int purge_percent = 10);
+ // The <container> is the map in which the entries reside.
+ // The timer attribute could be initialsed as per need.
+ // The <purge_percent> field denotes the percentage of the entries
+ // in the cache which can be purged automagically.
+
+ ~ACE_LRU_Caching_Strategy (void);
+
+ // = Operations of the startegy.
+
+ ATTRIBUTES attributes (void);
+ // Accessor method for the timer attributes.
+
+ // = Accessor methods for the percentage of entries to purge.
+ int purge_percent (void);
+
+ void purge_percent (int percentage);
+
+ // = Strategy related Operations
+
+ int notify_bind (int result,
+ const ATTRIBUTES &attr);
+ // This method acts as a notification about the CONTAINERs bind
+ // method call.
+
+ int notify_find (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs find
+ // method call
+
+ int notify_unbind (int result,
+ const ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs unbind
+ // method call
+
+ int notify_trybind (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs trybind
+ // method call
+
+ int notify_rebind (int result,
+ const ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs rebind
+ // method call
+
+ int clear_cache (CONTAINER &container);
+ // This is the method which looks at each ITEM's attributes and
+ // then decides on the one to remove.
+
+ void dump (void) const;
+ // Dumps the state of the object.
+
+ private:
+
+ ATTRIBUTES timer_;
+ // This element is the one which is the deciding factor for purging
+ // of an ITEM.
+
+ CONTAINER &container_;
+ // The container over which the purging will occur according to the
+ // strategy.
+
+ int purge_percent_;
+ // The level about which the purging will happen automagically.
+
+ int entries_;
+ // The no of entries bound in the cache.
+};
+
+//////////////////////////////////////////////////////////////////////////
+
+template<class CONTAINER>
+class ACE_LFU_Caching_Strategy
+{
+ // = TITLE
+ // Defines a Least Frequently Used strategy for which will decide on
+ // the item to be removed from the cache.
+ //
+ // = DESCRIPTION
+ // A attribute is tagged to each item which increments whenever
+ // the item is bound or looked up in the cache. Thus it denotes
+ // the frequency of use. According to the value of the attribute
+ // the item is removed from the CONTAINER i.e cache.
+public:
+
+ typedef int ATTRIBUTES;
+
+ // Traits.
+ typedef ACE_TYPENAME CONTAINER::KEY KEY;
+
+ typedef ACE_TYPENAME CONTAINER::VALUE VALUE;
+
+ typedef ACE_TYPENAME CONTAINER::ITERATOR ITERATOR;
+
+ typedef ACE_TYPENAME CONTAINER::ENTRY ITEM;
+
+ // = Initialisation and termination methods.
+
+ ACE_LFU_Caching_Strategy (void);
+
+ ~ACE_LFU_Caching_Strategy (void);
+
+ // = Startegy methods. Most of the methods are used from the base
+ // class itself.
+
+ ATTRIBUTES attributes (void);
+ // Access the attributes.
+
+ int notify_bind (int result,
+ const ATTRIBUTES &attr);
+ // This method acts as a notification about the CONTAINERs bind
+ // method call.
+
+ int notify_find (int result,
+ ATTRIBUTES &attr);
+ // Lookup notification.
+
+ int notify_unbind (int result,
+ const ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs unbind
+ // method call
+
+ int notify_trybind (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs trybind
+ // method call
+
+ int notify_rebind (int result,
+ const ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs rebind
+ // method call
+
+ int clear_cache (CONTAINER &container);
+ // This is the method which looks at each ITEM's attributes and
+ // then decides on the one to remove.
+
+ void dump (void) const;
+ // Dumps the state of the object.
+};
+
+/////////////////////////////////////////////////////////////
+
+template<class CONTAINER>
+class ACE_FIFO_Caching_Strategy
+{
+ // = TITLE
+ // The First In First Out startegy is implemented wherein each
+ // item is ordered.
+ //
+ // = DESCRIPTION
+ // The order tag of each item is used to decide the item to be
+ // removed from the cache. The items with least order are removed.
+ public:
+
+ typedef int ATTRIBUTES;
+
+ // Traits.
+ typedef ACE_TYPENAME CONTAINER::KEY KEY;
+
+ typedef ACE_TYPENAME CONTAINER::VALUE VALUE;
+
+ typedef ACE_TYPENAME CONTAINER::ITERATOR ITERATOR;
+
+ typedef ACE_TYPENAME CONTAINER::ENTRY ITEM;
+
+ // = Initialisation and termination.
+
+ ACE_FIFO_Caching_Strategy (ATTRIBUTES order = 0);
+
+ ~ACE_FIFO_Caching_Strategy (void);
+
+ // = Startegy methods.
+
+ ATTRIBUTES attributes (void);
+ // Accessor method.
+
+ int notify_bind (int result,
+ const ATTRIBUTES &attr);
+ // Notification for an item getting bound into the cache.
+
+ int notify_find (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs find
+ // method call
+
+ int notify_unbind (int result,
+ const ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs unbind
+ // method call
+
+ int notify_trybind (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs trybind
+ // method call
+
+ int notify_rebind (int result,
+ const ATTRIBUTES &attr);
+ // Notification for an item getting bound again into the cache.
+
+ int clear_cache (CONTAINER &container);
+ // This is the method which looks at each ITEM's attributes and
+ // then decides on the one to remove.
+
+ void dump (void) const;
+ // Dumps the state of the object.
+private:
+
+ ATTRIBUTES order_;
+ // The order is the deciding factor for the item to be removed from
+ // the cache.
+};
+
+template<class CONTAINER>
+class ACE_Null_Caching_Strategy
+{
+ // = TITLE
+ // The is a special caching strategy which doesnt have the purging
+ // feature.
+ //
+ // = DESCRIPTION
+ // No purging provided. To be used when purging might be too expensive
+ // an operation.
+
+ public:
+
+ typedef int ATTRIBUTES;
+
+ // = Initialisation and termination.
+
+ ACE_Null_Caching_Strategy (void);
+
+ ~ACE_Null_Caching_Strategy (void);
+
+ // = Startegy methods. All are NO_OP methods!!!
+
+ ATTRIBUTES attributes (void);
+ // Accessor method.
+
+ int notify_bind (int result,
+ const ATTRIBUTES &attr);
+ // Notification for an item getting bound into the cache.
+
+ int notify_find (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs find
+ // method call
+
+ int notify_unbind (int result,
+ const ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs unbind
+ // method call
+
+ int notify_trybind (int result,
+ ATTRIBUTES &attr);
+ //This method acts as a notification about the CONTAINERs trybind
+ // method call
+
+ int notify_rebind (int result,
+ const ATTRIBUTES &attr);
+ // Notification for an item getting bound again into the cache.
+
+ int clear_cache (CONTAINER &container);
+ // This is the method which looks at each ITEM's attributes and
+ // then decides on the one to remove.
+
+ void dump (void) const;
+ // Dumps the state of the object.
+private:
+
+ ATTRIBUTES dummy_;
+ // Just a dummy member to be able to keep up with the common interface.
+};
+
+#if defined (__ACE_INLINE__)
+#include "Caching_Strategies_T.i"
+#endif /* __ACE_INLINE__ */
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "Caching_Strategies_T.cpp"
+#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
+#pragma implementation "Caching_Strategies_T.cpp"
+#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
+
+#endif /* CACHING_STRATEGIES_H */
diff --git a/examples/Web_Crawler/Caching_Strategies_T.i b/examples/Web_Crawler/Caching_Strategies_T.i
new file mode 100644
index 00000000000..4465a7ebff6
--- /dev/null
+++ b/examples/Web_Crawler/Caching_Strategies_T.i
@@ -0,0 +1,287 @@
+/* -*-C++-*- */
+//$Id$
+
+template<class CONTAINER> ACE_INLINE
+ACE_LRU_Caching_Strategy<CONTAINER>::ACE_LRU_Caching_Strategy (CONTAINER &container, ATTRIBUTES timer, int purge_percent)
+ : timer_ (timer),
+ container_ (container),
+ purge_percent_ (purge_percent),
+ entries_ (0)
+{
+}
+
+template<class CONTAINER> ACE_INLINE
+ACE_LRU_Caching_Strategy<CONTAINER>::~ACE_LRU_Caching_Strategy (void)
+{
+}
+
+template<class CONTAINER> ACE_INLINE ACE_LRU_Caching_Strategy<CONTAINER>::ATTRIBUTES
+ACE_LRU_Caching_Strategy<CONTAINER>::attributes (void)
+{
+ return this->timer_;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LRU_Caching_Strategy<CONTAINER>::purge_percent (void)
+{
+ return this->purge_percent_;
+}
+
+template<class CONTAINER> ACE_INLINE void
+ACE_LRU_Caching_Strategy<CONTAINER>::purge_percent (int percentage)
+{
+ this->purge_percent_ = percentage;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LRU_Caching_Strategy<CONTAINER>::notify_bind (int result,
+ const ATTRIBUTES &attributes)
+{
+ if (result == 0)
+ {
+ ++this->timer_;
+ ++ this->entries_;
+ }
+
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LRU_Caching_Strategy<CONTAINER>::notify_find (int result,
+ ATTRIBUTES &attr)
+{
+ if (result == 0)
+ {
+ attr = this->timer_;
+ ++this->timer_;
+ }
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LRU_Caching_Strategy<CONTAINER>::notify_unbind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LRU_Caching_Strategy<CONTAINER>::notify_trybind (int result,
+ ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LRU_Caching_Strategy<CONTAINER>::notify_rebind (int result,
+ const ATTRIBUTES &attr)
+{
+ if (result == 0)
+ ++this->timer_;
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE void
+ACE_LRU_Caching_Strategy<CONTAINER>::dump (void) const
+{
+ ACE_TRACE ("ACE_LRU_Caching_Strategy::dump");
+
+ ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("timer_ = %d "), this->timer_));
+ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<class CONTAINER> ACE_INLINE
+ACE_LFU_Caching_Strategy<CONTAINER>::ACE_LFU_Caching_Strategy (void)
+{
+}
+
+template<class CONTAINER> ACE_INLINE
+ACE_LFU_Caching_Strategy<CONTAINER>::~ACE_LFU_Caching_Strategy (void)
+{
+}
+
+template<class CONTAINER> ACE_INLINE ACE_LFU_Caching_Strategy<CONTAINER>::ATTRIBUTES
+ACE_LFU_Caching_Strategy<CONTAINER>::attributes (void)
+{
+ return 0;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LFU_Caching_Strategy<CONTAINER>::notify_bind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LFU_Caching_Strategy<CONTAINER>::notify_find (int result,
+ ATTRIBUTES &attr)
+{
+ if (result == 0)
+ attr += 1;
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LFU_Caching_Strategy<CONTAINER>::notify_trybind (int result,
+ ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_LFU_Caching_Strategy<CONTAINER>::notify_rebind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+template<class CONTAINER> ACE_INLINE int
+ACE_LFU_Caching_Strategy<CONTAINER>::notify_unbind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE void
+ACE_LFU_Caching_Strategy<CONTAINER>::dump (void) const
+{
+ ACE_TRACE ("ACE_LFU_Caching_Strategy::dump");
+
+ ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
+ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
+}
+
+//////////////////////////////////////////////////////////////////////////////////////
+
+template<class CONTAINER> ACE_INLINE
+ACE_FIFO_Caching_Strategy<CONTAINER>::ACE_FIFO_Caching_Strategy (ATTRIBUTES order)
+ : order_ (order)
+{
+}
+
+template<class CONTAINER> ACE_INLINE
+ACE_FIFO_Caching_Strategy<CONTAINER>::~ACE_FIFO_Caching_Strategy (void)
+{
+}
+
+template<class CONTAINER> ACE_INLINE ACE_FIFO_Caching_Strategy<CONTAINER>::ATTRIBUTES
+ACE_FIFO_Caching_Strategy<CONTAINER>::attributes (void)
+{
+ return this->order_;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_FIFO_Caching_Strategy<CONTAINER>::notify_bind (int result,
+ const ATTRIBUTES &attr)
+{
+ if (result == 0)
+ ++this->order_;
+ return result;
+}
+template<class CONTAINER> ACE_INLINE int
+ACE_FIFO_Caching_Strategy<CONTAINER>::notify_find (int result,
+ ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_FIFO_Caching_Strategy<CONTAINER>::notify_unbind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_FIFO_Caching_Strategy<CONTAINER>::notify_trybind (int result,
+ ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_FIFO_Caching_Strategy<CONTAINER>::notify_rebind (int result,
+ const ATTRIBUTES &attr)
+{
+ if (result == 0)
+ ++this->order_;
+ return result;
+}
+
+
+template<class CONTAINER> ACE_INLINE void
+ACE_FIFO_Caching_Strategy<CONTAINER>::dump (void) const
+{
+ ACE_TRACE ("ACE_FIFO_Caching_Strategy::dump");
+
+ ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("order_ = %d "), this->order_));
+ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+template<class CONTAINER> ACE_INLINE
+ACE_Null_Caching_Strategy<CONTAINER>::ACE_Null_Caching_Strategy (void)
+ : dummy_ (0)
+{
+}
+
+template<class CONTAINER> ACE_INLINE
+ACE_Null_Caching_Strategy<CONTAINER>::~ACE_Null_Caching_Strategy (void)
+{
+}
+
+template<class CONTAINER> ACE_INLINE ACE_Null_Caching_Strategy<CONTAINER>::ATTRIBUTES
+ACE_Null_Caching_Strategy<CONTAINER>::attributes (void)
+{
+ return this->dummy_;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_Null_Caching_Strategy<CONTAINER>::notify_bind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+template<class CONTAINER> ACE_INLINE int
+ACE_Null_Caching_Strategy<CONTAINER>::notify_find (int result,
+ ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_Null_Caching_Strategy<CONTAINER>::notify_unbind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_Null_Caching_Strategy<CONTAINER>::notify_trybind (int result,
+ ATTRIBUTES &attr)
+{
+ return result;
+}
+
+template<class CONTAINER> ACE_INLINE int
+ACE_Null_Caching_Strategy<CONTAINER>::notify_rebind (int result,
+ const ATTRIBUTES &attr)
+{
+ return result;
+}
+
+
+template<class CONTAINER> ACE_INLINE void
+ACE_Null_Caching_Strategy<CONTAINER>::dump (void) const
+{
+ ACE_TRACE ("ACE_Null_Caching_Strategy::dump");
+
+ ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
+ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
+}
+
+//////////////////////////////////////////////////////////////////////////////////