public interface CachePolicyListener
CachePolicy
and a Cache implementation
to notify about cached object eviction.
Note that CachePolicy
implementations typically use
object equality when removing listeners, so concrete
implementations of this interface should also pay attention to
their Object.equals(Object)
and Object.hashCode()
methods.
Modifier and Type | Method and Description |
---|---|
void |
cacheObjectEvicted(java.lang.Object obj)
Notification that the cache this listener is attached to is evicting
the object indicated.
|
void cacheObjectEvicted(java.lang.Object obj) throws CacheEvictionException
obj
- object being evited from cacheCacheEvictionException
- if this listener encountered problems
while preparing for the specified object's eviction. For example,
a listener may try to persist the object to disk, and encounter
an IOException
.Cees de Groot (C) 2000-2001. All rights reserved http://jdbm.sourceforge.net