|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CachingStrategies provide abstract strategies about how a cache ought to
perform its caching. When an object is added to the cache, the
CachingStrategy is asked to prepare the CacheEntry for that object. The
CachingStrategy may return a new Entry that serves its purposes better, or
may just set a few properties on the current entry.
When the object is looked up in the cache, the CachingStrategy is asked to
validate this object, if the validation fails for any strategy, the object is
reloaded.
Method Summary | |
CacheEntry |
prepare(CacheEntry entry)
Prepares the cache entry for caching with this strategy. NOTE: Be Careful: a caching strategy is allowed to return a different CacheEntry, so make sure that you store the results of this method and don't assume the symantics of pass by reference. |
boolean |
validate(CacheEntry entry)
Validates this cache entry for this caching strategy. |
Method Detail |
public CacheEntry prepare(CacheEntry entry)
public boolean validate(CacheEntry entry)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |