Package gov.nasa.worldwind.cache
Interface MemoryCache.CacheListener
-
- Enclosing interface:
- MemoryCache
public static interface MemoryCache.CacheListener
Provides the interface for cache clients to be notified of key events. Currently the only key event is the removal of an entry from the cache. A client may need to know a removal instigated by the cache occurred in order to adjust its own state or to free resources associated with the removed entry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
entryRemoved(java.lang.Object key, java.lang.Object clientObject)
Called just after an entry has been removed from the cache.void
removalException(java.lang.Throwable exception, java.lang.Object key, java.lang.Object clientObject)
Called when an exception occurs within theentryRemoved(Object, Object)
call.
-
-
-
Method Detail
-
entryRemoved
void entryRemoved(java.lang.Object key, java.lang.Object clientObject)
Called just after an entry has been removed from the cache. Listeners should deallocate any resources that won't be deallocated by normal garbage collection.- Parameters:
key
- the entry's cache key.clientObject
- the cached object.
-
removalException
void removalException(java.lang.Throwable exception, java.lang.Object key, java.lang.Object clientObject)
Called when an exception occurs within theentryRemoved(Object, Object)
call.- Parameters:
exception
- the exception that occurred.key
- the entry's cache key.clientObject
- the cached object.
-
-