JBoss.org Community Documentation
The design of the JBoss Cache eviction policy framework is based
on an
EvictionInterceptor
to handle cache events and relay them back to the eviction
policies. During the cache start up, an
EvictionInterceptor
will be added to the cache
interceptor stack if the eviction policy is specified.
Then whenever a node is added, removed, evicted, or visited, the
EvictionInterceptor
will maintain state statistics and
information will be relayed to each individual eviction region.
There is a single eviction thread (timer) that will run at a configured interval. This thread will make calls into each of the policy providers and inform it of any aggregated adds, removes and visits (gets) events to the cache during the configured interval. The eviction thread is responsible for kicking off the eviction policy processing (a single pass) for each configured eviction cache region.