Cache Eviction Example

You can use eviction to control how much heap your data regions use.
Eviction controls your data region size by removing least recently used (LRU)
entries to make way for new data. It kicks in when your data region reaches a
specified size or entry count. Size can be absolute or a percentage of your
application's current heap.

Running the Example

In this example, the data region is configured to keep the entry count
at 10 or below by destroying LRU entries. A cache listener installed on the
region reports the changes to the region entries.

Note: To run this example, you must have terminal sessions configured for
the QuickStart examples, as described in
Setting Up Your Environment.

In a single session, run the example:

$ java quickstart.DataEviction

Example Source Files

Program and cache configuration source files for the example,
including the listener declared in the DataEviction.xml file: