#include <coherence/net/cache/EvictionPolicy.hpp>
Inherits Object.
If the eviction policy needs to be aware of changes to the cache, it must implement the MapListener interface; if it does, it will automatically be registered to receive MapEvents.
Public Types | |
enum | EvictionPolicyType { eviction_policy_hybrid, eviction_policy_lru, eviction_policy_lfu, eviction_policy_external } |
EvictionPolicyType describes the eviction policies available. More... | |
typedef spec::Handle | Handle |
EvictionPolicy Handle definition. | |
typedef spec::View | View |
EvictionPolicy View definition. | |
typedef spec::Holder | Holder |
EvictionPolicy Holder definition. | |
Public Member Functions | |
virtual void | entryTouched (Map::Entry::Handle hEntry)=0 |
This method is called by the cache to indicate that an entry has been touched. | |
virtual void | requestEviction (int32_t cMaximum)=0 |
This method is called by the cache when the cache requires the eviction policy to evict entries. |
enum EvictionPolicyType |
EvictionPolicyType describes the eviction policies available.
eviction_policy_hybrid | By default, the cache prunes based on a hybrid LRU+LFU algorithm. |
eviction_policy_lru | The cache can prune based on a pure Least Recently Used (LRU) algorithm. |
eviction_policy_lfu | The cache can prune based on a pure Least Frequently Used (LFU) algorithm. |
eviction_policy_external | The cache can prune using an external eviction policy. |
virtual void entryTouched | ( | Map::Entry::Handle | hEntry | ) | [pure virtual] |
This method is called by the cache to indicate that an entry has been touched.
hEntry | the Cache Entry that has been touched |
virtual void requestEviction | ( | int32_t | cMaximum | ) | [pure virtual] |