Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.cache
Interface ConfigurableCacheMap.EvictionPolicy

All Known Subinterfaces:
  OldCache.EvictionPolicy

All Known Implementing Classes:
  AbstractEvictionPolicy, OldCache.InternalEvictionPolicy, SerializationCache.InternalEvictionPolicy

Enclosing interface:
  ConfigurableCacheMap

    public static interface ConfigurableCacheMap.EvictionPolicy

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.

See Also:
  `AbstractEvictionPolicy`

Method Summary
`void` | `entryTouched(ConfigurableCacheMap.Entry entry)` This method is called by the cache to indicate that an entry has been touched.
`java.lang.String` | `getName()` Obtain the name of the eviction policy.
`void` | `requestEviction(int cMaximum)` This method is called by the cache when the cache requires the eviction policy to evict entries.

Method Detail

### entryTouched

    void entryTouched(ConfigurableCacheMap.Entry entry)

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

  Parameters:
    `entry` - the Cache Entry that has been touched

### requestEviction

    void requestEviction(int cMaximum)

  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

### getName

    java.lang.String getName()

  Obtain the name of the eviction policy. This is intended to be human readable for use in a monitoring tool; examples include "LRU" and "LFU".

  Returns:
    the name of the eviction policy

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.