org.webmacro.resource
Class CacheReloadContext

java.lang.Object
  extended byorg.webmacro.resource.CacheReloadContext
Direct Known Subclasses:
TemplateProvider.FTReloadContext, TimedReloadContext

public abstract class CacheReloadContext
extends java.lang.Object

CacheReloadContext provides support for providers which support cache invalidation on a per-element basis, for example if an underlying resource has changed. The reload context allows the cache manager to ask the provider if the resource should be reloaded.

Since:
0.96

Constructor Summary
CacheReloadContext()
           
 
Method Summary
 boolean shouldReload()
          The CacheManager calls shouldReload to ask the reference whether it has changed since we loaded it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheReloadContext

public CacheReloadContext()
Method Detail

shouldReload

public boolean shouldReload()
The CacheManager calls shouldReload to ask the reference whether it has changed since we loaded it. Subclasses should define an implementation if this if it makes sense to. Otherwise, the default returns false, which means the item is replaced when it expires from the cache.



Copyright © 1999-2006 WebMacro. All Rights Reserved.