org.apache.velocity.runtime.resource
Class  ResourceCacheImpl
java.lang.Object
  |
  +--org.apache.velocity.runtime.resource.ResourceCacheImpl
- All Implemented Interfaces: 
 - ResourceCache
 
- public class ResourceCacheImpl
- extends java.lang.Object
- implements ResourceCache
   
Default implementation of the resource cache for the default
 ResourceManager.
- Version: 
 - $Id: ResourceCacheImpl.java,v 1.2 2002/02/12 19:08:06 dlr Exp $
 
- Author: 
 - Geir Magnusson Jr., Daniel Rall
 
| 
Field Summary | 
protected  java.util.Map | 
cache
 
          Cache storage, assumed to be thread-safe. | 
protected  RuntimeServices | 
rsvc
 
          Runtime services, generally initialized by the
 initialize() method. | 
 
 
 
| Methods inherited from class java.lang.Object | 
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait | 
 
cache
protected java.util.Map cache
- Cache storage, assumed to be thread-safe.
 
rsvc
protected RuntimeServices rsvc
- Runtime services, generally initialized by the
 
initialize() method. 
ResourceCacheImpl
public ResourceCacheImpl()
initialize
public void initialize(RuntimeServices rs)
- Description copied from interface: 
ResourceCache 
- initializes the ResourceCache.  Will be 
  called before any utilization
- Specified by: 
 initialize in interface ResourceCache
 
- Following copied from interface: 
org.apache.velocity.runtime.resource.ResourceCache 
- Parameters:
 rs - RuntimeServices to use for logging, etc
 
 
get
public Resource get(java.lang.Object key)
- Description copied from interface: 
ResourceCache 
- retrieves a Resource from the
  cache
- Specified by: 
 get in interface ResourceCache
 
- Following copied from interface: 
org.apache.velocity.runtime.resource.ResourceCache 
- Parameters:
 resourceKey - key for Resource to be retrieved- Returns:
 - Resource specified or null if not found
 
 
 
put
public Resource put(java.lang.Object key,
                    Resource value)
- Description copied from interface: 
ResourceCache 
- stores a Resource in the cache
- Specified by: 
 put in interface ResourceCache
 
- Following copied from interface: 
org.apache.velocity.runtime.resource.ResourceCache 
- Parameters:
 resourceKey - key to associate with the Resourceresource - Resource to be stored- Returns:
 - existing Resource stored under this key, or null if none
 
 
 
remove
public Resource remove(java.lang.Object key)
- Description copied from interface: 
ResourceCache 
- removes a Resource from the cache
- Specified by: 
 remove in interface ResourceCache
 
- Following copied from interface: 
org.apache.velocity.runtime.resource.ResourceCache 
- Parameters:
 resourceKey - resource to be removedResource - stored under key
 
 
enumerateKeys
public java.util.Iterator enumerateKeys()
- Description copied from interface: 
ResourceCache 
- returns an Iterator of Keys in the cache
- Specified by: 
 enumerateKeys in interface ResourceCache
 
 
Copyright © 2003 Apache Software Foundation. All Rights Reserved.