jdbm.helper
Interface CachePolicyListener


public interface CachePolicyListener

Callback interface between 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.

Version:
$Id: CachePolicyListener.java,v 1.3 2003/11/01 13:25:41 dranatunga Exp $
Author:
Alex Boisvert

Method Summary
 void cacheObjectEvicted(java.lang.Object obj)
          Notification that the cache this listener is attached to is evicting the object indicated.
 

Method Detail

cacheObjectEvicted

void cacheObjectEvicted(java.lang.Object obj)
                        throws CacheEvictionException
Notification that the cache this listener is attached to is evicting the object indicated.

Parameters:
obj - object being evited from cache
Throws:
CacheEvictionException - 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. All rights reserved http://jdbm.sourceforge.net