#include <Caching_Strategies_T.h>
Inheritance diagram for ACE_Caching_Strategy_Adapter:


Public Methods | |
| ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation=0, int delete_implementation=0) | |
| Constructor. More... | |
| ~ACE_Caching_Strategy_Adapter (void) | |
| Destructor. More... | |
| ATTRIBUTES | attributes (void) |
| Accessor method for the timer attributes. More... | |
| double | purge_percent (void) |
| Get the percentage of entries to purge. More... | |
| void | purge_percent (double percentage) |
| Set the percentage of entries to purge. More... | |
| int | notify_bind (int result, const ATTRIBUTES &attr) |
| This method acts as a notification about the CONTAINERs bind method call. More... | |
| int | notify_find (int result, ATTRIBUTES &attr) |
| This method acts as a notification about the CONTAINERs find method call. More... | |
| int | notify_unbind (int result, const ATTRIBUTES &attr) |
| This method acts as a notification about the CONTAINERs unbind method call. More... | |
| int | notify_trybind (int result, ATTRIBUTES &attr) |
| This method acts as a notification about the CONTAINERs trybind method call. More... | |
| int | notify_rebind (int result, const ATTRIBUTES &attr) |
| This method acts as a notification about the CONTAINERs rebind method call. More... | |
| IMPLEMENTATION & | implementation (void) |
| Accessor to the implementation. More... | |
| CACHING_UTILITY & | caching_utility (void) |
| Purge the cache. More... | |
| void | dump (void) const |
| Dumps the state of the object. More... | |
Private Attributes | |
| IMPLEMENTATION * | implementation_ |
| Implementation class. More... | |
| int | delete_implementation_ |
| Do we need to delete the implementation? More... | |
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 107 of file Caching_Strategies_T.h.
|
||||||||||||||||
|
Constructor.
Definition at line 7 of file Caching_Strategies_T.i. References ACE_NEW, delete_implementation_, and implementation_.
00009 : implementation_ (implementation), 00010 delete_implementation_ (delete_implementation) 00011 { 00012 if (this->implementation_ == 0) 00013 { 00014 ACE_NEW (this->implementation_, 00015 IMPLEMENTATION); 00016 this->delete_implementation_ = 1; 00017 } 00018 } |
|
||||||||||
|
Destructor.
Definition at line 21 of file Caching_Strategies_T.i. References delete_implementation_, and implementation_.
00022 {
00023 if (this->delete_implementation_)
00024 {
00025 delete this->implementation_;
00026 this->delete_implementation_ = 0;
00027 this->implementation_ = 0;
00028 }
00029 }
|
|
||||||||||
|
Accessor method for the timer attributes.
Implements ACE_Caching_Strategy. Definition at line 32 of file Caching_Strategies_T.i. References implementation_.
00033 {
00034 return this->implementation_->attributes ();
00035 }
|
|
||||||||||
|
Purge the cache.
Implements ACE_Caching_Strategy. Definition at line 96 of file Caching_Strategies_T.i. References implementation_.
00097 {
00098 return this->implementation_->caching_utility ();
00099 }
|
|
||||||||||
|
Dumps the state of the object.
Implements ACE_Caching_Strategy. Definition at line 102 of file Caching_Strategies_T.i. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TRACE, and LM_DEBUG.
00103 {
00104 ACE_TRACE ("ACE_Caching_Strategy_Adapter::dump");
00105
00106 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00107 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00108 }
|
|
||||||||||
|
Accessor to the implementation.
Definition at line 90 of file Caching_Strategies_T.i. References implementation_.
00091 {
00092 return *this->implementation_;
00093 }
|
|
||||||||||||||||
|
This method acts as a notification about the CONTAINERs bind method call.
Implements ACE_Caching_Strategy. Definition at line 50 of file Caching_Strategies_T.i. References implementation_.
00052 {
00053 return this->implementation_->notify_bind (result,
00054 attr);
00055 }
|
|
||||||||||||||||
|
This method acts as a notification about the CONTAINERs find method call.
Implements ACE_Caching_Strategy. Definition at line 58 of file Caching_Strategies_T.i. References implementation_.
00060 {
00061 return this->implementation_->notify_find (result,
00062 attr);
00063 }
|
|
||||||||||||||||
|
This method acts as a notification about the CONTAINERs rebind method call.
Implements ACE_Caching_Strategy. Definition at line 82 of file Caching_Strategies_T.i. References implementation_.
00084 {
00085 return this->implementation_->notify_rebind (result,
00086 attr);
00087 }
|
|
||||||||||||||||
|
This method acts as a notification about the CONTAINERs trybind method call.
Implements ACE_Caching_Strategy. Definition at line 74 of file Caching_Strategies_T.i. References implementation_.
00076 {
00077 return this->implementation_->notify_trybind (result,
00078 attr);
00079 }
|
|
||||||||||||||||
|
This method acts as a notification about the CONTAINERs unbind method call.
Implements ACE_Caching_Strategy. Definition at line 66 of file Caching_Strategies_T.i. References implementation_.
00068 {
00069 return this->implementation_->notify_unbind (result,
00070 attr);
00071 }
|
|
||||||||||
|
Set the percentage of entries to purge.
Implements ACE_Caching_Strategy. Definition at line 44 of file Caching_Strategies_T.i. References implementation_.
00045 {
00046 this->implementation_->purge_percent (percentage);
00047 }
|
|
||||||||||
|
Get the percentage of entries to purge.
Implements ACE_Caching_Strategy. Definition at line 38 of file Caching_Strategies_T.i. References implementation_.
00039 {
00040 return this->implementation_->purge_percent ();
00041 }
|
|
|||||
|
Do we need to delete the implementation?
Definition at line 171 of file Caching_Strategies_T.h. Referenced by ACE_Caching_Strategy_Adapter, and ~ACE_Caching_Strategy_Adapter. |
|
|||||
|
Implementation class.
Definition at line 168 of file Caching_Strategies_T.h. Referenced by ACE_Caching_Strategy_Adapter, attributes, caching_utility, implementation, notify_bind, notify_find, notify_rebind, notify_trybind, notify_unbind, purge_percent, and ~ACE_Caching_Strategy_Adapter. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002