org.webmacro.resource
Class StaticIdentityCacheManager

java.lang.Object
  |
  +--org.webmacro.resource.StaticIdentityCacheManager
All Implemented Interfaces:
CacheManager

public class StaticIdentityCacheManager
extends java.lang.Object
implements CacheManager


Constructor Summary
StaticIdentityCacheManager()
           
 
Method Summary
 void destroy()
          Close down the provider.
 void flush()
          Clear the cache.
 java.lang.Object get(java.lang.Object query)
          Called to get a resource from the cache.
 java.lang.Object get(java.lang.Object query, ResourceLoader helper)
          Get the object associated with the specific query, first trying to look it up in a cache.
 void init(Broker b, Settings config, java.lang.String resourceType)
          Same as defined in Provider, except with an additional type parameter so it knows what type of resource it is caching
 void invalidate(java.lang.Object query)
          This method throws an exception because this kind of a cache does not support individual element invalidation.
 void put(java.lang.Object query, java.lang.Object resource)
          Called to put a resource into the cache.
 boolean supportsReload()
          Does this cache manager support reloading of resources if the underlying resource has changed?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StaticIdentityCacheManager

public StaticIdentityCacheManager()
Method Detail

init

public void init(Broker b,
                 Settings config,
                 java.lang.String resourceType)
          throws InitException
Description copied from interface: CacheManager
Same as defined in Provider, except with an additional type parameter so it knows what type of resource it is caching
Specified by:
init in interface CacheManager

flush

public void flush()
Clear the cache.
Specified by:
flush in interface CacheManager

destroy

public void destroy()
Close down the provider.
Specified by:
destroy in interface CacheManager

supportsReload

public boolean supportsReload()
Description copied from interface: CacheManager
Does this cache manager support reloading of resources if the underlying resource has changed?
Specified by:
supportsReload in interface CacheManager

get

public java.lang.Object get(java.lang.Object query,
                            ResourceLoader helper)
                     throws ResourceException
Get the object associated with the specific query, first trying to look it up in a cache. If it's not there, then call load(String) to load it into the cache.
Specified by:
get in interface CacheManager

put

public void put(java.lang.Object query,
                java.lang.Object resource)
Description copied from interface: CacheManager
Called to put a resource into the cache.
Specified by:
put in interface CacheManager

get

public java.lang.Object get(java.lang.Object query)
Description copied from interface: CacheManager
Called to get a resource from the cache. Returns null if not present.
Specified by:
get in interface CacheManager

invalidate

public void invalidate(java.lang.Object query)
This method throws an exception because this kind of a cache does not support individual element invalidation.
Specified by:
invalidate in interface CacheManager

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object