Show / Hide Table of Contents

Interface IEvictionPolicy

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.

Namespace: Tangosol.Net.Cache
Assembly: Coherence.dll
Syntax
public interface IEvictionPolicy
Remarks

If the eviction policy needs to be aware of changes to the cache, it must implement the ICacheListener interface; if it does, it will automatically be registered to receive cache events.

Properties

Name

Obtain the name of the eviction policy.

Declaration
string Name { get; }
Property Value
Type Description
string

The name of the eviction policy.

Remarks

This is intended to be human readable for use in a monitoring tool; examples include "LRU" and "LFU".

Methods

EntryTouched(IConfigurableCacheEntry)

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

Declaration
void EntryTouched(IConfigurableCacheEntry entry)
Parameters
Type Name Description
IConfigurableCacheEntry entry

The cache entry that has been touched.

RequestEviction(long)

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

Declaration
void RequestEviction(long maximum)
Parameters
Type Name Description
long maximum

The maximum number of units that should remain in the cache when the eviction is complete.

See Also

AbstractEvictionPolicy
ICacheListener
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.