#include <Caching_Strategies_T.h>
Inheritance diagram for ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >:
Public Member Functions | |
ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation=0, bool delete_implementation=false) | |
Constructor. | |
~ACE_Caching_Strategy_Adapter (void) | |
Destructor. | |
ATTRIBUTES | attributes (void) |
Accessor method for the timer attributes. | |
double | purge_percent (void) |
Get the percentage of entries to purge. | |
void | purge_percent (double percentage) |
Set the percentage of entries to purge. | |
int | notify_bind (int result, const ATTRIBUTES &attr) |
int | notify_find (int result, ATTRIBUTES &attr) |
int | notify_unbind (int result, const ATTRIBUTES &attr) |
int | notify_trybind (int result, ATTRIBUTES &attr) |
int | notify_rebind (int result, const ATTRIBUTES &attr) |
IMPLEMENTATION & | implementation (void) |
Accessor to the implementation. | |
CACHING_UTILITY & | caching_utility (void) |
Purge the cache. | |
void | dump (void) const |
Dumps the state of the object. | |
Private Attributes | |
IMPLEMENTATION * | implementation_ |
Implementation class. | |
bool | delete_implementation_ |
Do we need to delete the implementation? |
This class simply delegates all requests to the IMPLEMNETATION object within. This class should be passed in place of the the abstract base ACE_Caching_Strategy class as part of the External Polymorphism pattern.
Definition at line 109 of file Caching_Strategies_T.h.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::ACE_Caching_Strategy_Adapter | ( | IMPLEMENTATION * | implementation = 0 , |
|
bool | delete_implementation = false | |||
) |
Constructor.
Definition at line 12 of file Caching_Strategies_T.inl.
References ACE_NEW, and ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::delete_implementation_.
00014 : implementation_ (implementation), 00015 delete_implementation_ (delete_implementation) 00016 { 00017 if (this->implementation_ == 0) 00018 { 00019 ACE_NEW (this->implementation_, 00020 IMPLEMENTATION); 00021 this->delete_implementation_ = true; 00022 } 00023 }
ACE_INLINE ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::~ACE_Caching_Strategy_Adapter | ( | void | ) |
Destructor.
Definition at line 26 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::delete_implementation_, and ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00027 { 00028 if (this->delete_implementation_) 00029 { 00030 delete this->implementation_; 00031 this->delete_implementation_ = false; 00032 this->implementation_ = 0; 00033 } 00034 }
ACE_INLINE ATTRIBUTES ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::attributes | ( | void | ) | [virtual] |
Accessor method for the timer attributes.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 37 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00038 { 00039 return this->implementation_->attributes (); 00040 }
ACE_INLINE CACHING_UTILITY & ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::caching_utility | ( | void | ) | [virtual] |
Purge the cache.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 101 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00102 { 00103 return this->implementation_->caching_utility (); 00104 }
ACE_INLINE void ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::dump | ( | void | ) | const [virtual] |
Dumps the state of the object.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 107 of file Caching_Strategies_T.inl.
References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TRACE, and LM_DEBUG.
00108 { 00109 #if defined (ACE_HAS_DUMP) 00110 ACE_TRACE ("ACE_Caching_Strategy_Adapter::dump"); 00111 00112 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00113 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00114 #endif /* ACE_HAS_DUMP */ 00115 }
ACE_INLINE IMPLEMENTATION & ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation | ( | void | ) |
Accessor to the implementation.
Definition at line 95 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00096 { 00097 return *this->implementation_; 00098 }
ACE_INLINE int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_bind | ( | int | result, | |
const ATTRIBUTES & | attr | |||
) | [virtual] |
This method acts as a notification about the CONTAINERs bind method call.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 55 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00057 { 00058 return this->implementation_->notify_bind (result, 00059 attr); 00060 }
ACE_INLINE int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_find | ( | int | result, | |
ATTRIBUTES & | attr | |||
) | [virtual] |
This method acts as a notification about the CONTAINERs find method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 63 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00065 { 00066 return this->implementation_->notify_find (result, 00067 attr); 00068 }
ACE_INLINE int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_rebind | ( | int | result, | |
const ATTRIBUTES & | attr | |||
) | [virtual] |
This method acts as a notification about the CONTAINERs rebind method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 87 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00089 { 00090 return this->implementation_->notify_rebind (result, 00091 attr); 00092 }
ACE_INLINE int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_trybind | ( | int | result, | |
ATTRIBUTES & | attr | |||
) | [virtual] |
This method acts as a notification about the CONTAINERs trybind method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 79 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00081 { 00082 return this->implementation_->notify_trybind (result, 00083 attr); 00084 }
ACE_INLINE int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_unbind | ( | int | result, | |
const ATTRIBUTES & | attr | |||
) | [virtual] |
This method acts as a notification about the CONTAINERs unbind method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 71 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00073 { 00074 return this->implementation_->notify_unbind (result, 00075 attr); 00076 }
ACE_INLINE void ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::purge_percent | ( | double | percentage | ) | [virtual] |
Set the percentage of entries to purge.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 49 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00050 { 00051 this->implementation_->purge_percent (percentage); 00052 }
ACE_INLINE double ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::purge_percent | ( | void | ) | [virtual] |
Get the percentage of entries to purge.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 43 of file Caching_Strategies_T.inl.
References ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_.
00044 { 00045 return this->implementation_->purge_percent (); 00046 }
bool ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::delete_implementation_ [private] |
Do we need to delete the implementation?
Definition at line 173 of file Caching_Strategies_T.h.
Referenced by ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::ACE_Caching_Strategy_Adapter(), and ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::~ACE_Caching_Strategy_Adapter().
IMPLEMENTATION* ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_ [private] |
Implementation class.
Definition at line 170 of file Caching_Strategies_T.h.
Referenced by ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::attributes(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::caching_utility(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_bind(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_find(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_rebind(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_trybind(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_unbind(), ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::purge_percent(), and ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::~ACE_Caching_Strategy_Adapter().