org.dasein.util
Interface CachedItem


public interface CachedItem

Represents an object that may expire in one of the Dasein-managed caches. Objects in these caches (Cache, ConcurrentCache, and ConcurrentMultiCache) do NOT have to implement this interface. Implementing this interface simply helps them expire from the cache according to their own rules. For example, you might want to set up persistent objects that are stored in a database to expire from the cache every 5 minutes so that the environment will pick up any changes made against the database.

Last modified: $Date: 2005/08/15 16:19:34 $

Version:
$Revision: 1.2 $
Author:
George Reese

Method Summary
 boolean isValidForCache()
          This method tells the containing cache whether this object remains valid for the cache.
 

Method Detail

isValidForCache

boolean isValidForCache()
This method tells the containing cache whether this object remains valid for the cache. The implementation determines the rules for what is valid and what is invalid. This method is NOT for garbage collection purposes. The Dasein caches use soft references and will expire any cached objects from memory in accordance with the rules for normal Java garbage collection.

Returns:
true if the object should remain in the cache


Copyright © 2011 enStratus Networks LLC. All Rights Reserved.