org.sandev.basics.util
Interface IDCacheCallback


public interface IDCacheCallback

An interface used by a cache to get information back from the application.


Method Summary
 void cacheRemoved(SandPersistMessage spm)
          When the cache removes an instance, it calls this method to let the application know.
 boolean okToUncache(SandPersistMessage spm)
          Return true if the given item is safe to remove from the cache, false otherwise.
 

Method Detail

okToUncache

boolean okToUncache(SandPersistMessage spm)
Return true if the given item is safe to remove from the cache, false otherwise. If this method returns true, the given item may or may not actually be removed. Actual removal depends on when the item was last accessed, cache maximum sizes and other factors. If this method returns false, then the given item will not be removed from cache.


cacheRemoved

void cacheRemoved(SandPersistMessage spm)
When the cache removes an instance, it calls this method to let the application know. This callback provides an opportunity for the app to do things like cascading removals for further cleanup, but no action is required. This method does not throw.