ACE_Caching_Strategy_Adapter3
This class follows the adaptor pattern and is used to provide external polymorphism by deriving from ace_caching_strategy.
Usage
#include <ace/Caching_Strategies_T.h>
template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION>
class ACE_Caching_Strategy_Adapter :
public ACE_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>
{
public:
ACE_Caching_Strategy_Adapter (
IMPLEMENTATION *implementation = 0,
int delete_implementation = 0
);
~ACE_Caching_Strategy_Adapter (void);
ATTRIBUTES attributes (void);
double purge_percent (void);
void purge_percent (double percentage);
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);
CACHING_UTILITY &caching_utility (void);
void dump (void) const;
private:
IMPLEMENTATION *implementation_;
int delete_implementation_;
};
Overview
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.
Accessor methods for the percentage of entries to purge.
double purge_percent (void);
void purge_percent (double percentage);
Library
ace