NASA World Wind

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
 void entryRemoved(Object key, Object clientObject)
          Called just after an entry has been removed from the cache.
 void removalException(Throwable exception, Object key, Object clientObject)
          Called when an exception occurs within the entryRemoved(Object, Object) call.
 

Method Detail

entryRemoved

void entryRemoved(Object key,
                  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(Throwable exception,
                      Object key,
                      Object clientObject)
Called when an exception occurs within the entryRemoved(Object, Object) call.

Parameters:
exception - the exception that occurred.
key - the entry's cache key.
clientObject - the cached object.

NASA World Wind