Reference

ACE_Caching_Strategy_Adapter(3)

This class follows the Adaptor pattern and is used to provide External Polymorphism by deriving from ACE_Caching_Strategy.

NAME

ACE_Caching_Strategy_Adapter - This class follows the Adaptor pattern and is used to provide External Polymorphism by deriving from ACE_Caching_Strategy.

SYNOPSIS

#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_;
};

DESCRIPTION

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);

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

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.

AUTHOR

Kirthika Parameswaran [email protected]

LIBRARY

ace