Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

EvictionPolicy Class Reference

#include <coherence/net/cache/EvictionPolicy.hpp>

Inherits Object.

List of all members.


Detailed Description

An eviction policy is an object that the cache provides with access information, and when requested, the eviction policy selects and evicts entries from the cache.

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.

Author:
nsa 2008.06.23

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.

Member Enumeration Documentation

enum EvictionPolicyType

EvictionPolicyType describes the eviction policies available.

Enumerator:
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.


Member Function Documentation

virtual void entryTouched ( Map::Entry::Handle  hEntry  )  [pure virtual]

This method is called by the cache to indicate that an entry has been touched.

Parameters:
hEntry the Cache Entry that has been touched

virtual void requestEviction ( int32_t  cMaximum  )  [pure virtual]

This method is called by the cache when the cache requires the eviction policy to evict entries.

Parameters:
cMaximum the maximum number of units that should remain in the cache when the eviction is complete


The documentation for this class was generated from the following file:
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.