org.apache.velocity.runtime.resource
public class ResourceCacheImpl extends java.lang.Object implements ResourceCache
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
cache
Cache storage, assumed to be thread-safe.
|
protected RuntimeServices |
rsvc
Runtime services, generally initialized by the
initialize() method. |
Constructor and Description |
---|
ResourceCacheImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
enumerateKeys()
returns an Iterator of Keys in the cache
|
Resource |
get(java.lang.Object key)
retrieves a Resource from the
cache
|
void |
initialize(RuntimeServices rs)
initializes the ResourceCache.
|
Resource |
put(java.lang.Object key,
Resource value)
stores a Resource in the cache
|
Resource |
remove(java.lang.Object key)
removes a Resource from the cache
|
protected java.util.Map cache
protected RuntimeServices rsvc
initialize()
method.public void initialize(RuntimeServices rs)
ResourceCache
initialize
in interface ResourceCache
rs
- RuntimeServices to use for logging, etcpublic Resource get(java.lang.Object key)
ResourceCache
get
in interface ResourceCache
key
- key for Resource to be retrievedpublic Resource put(java.lang.Object key, Resource value)
ResourceCache
put
in interface ResourceCache
key
- key to associate with the Resourcevalue
- Resource to be storedpublic Resource remove(java.lang.Object key)
ResourceCache
remove
in interface ResourceCache
key
- resource to be removedpublic java.util.Iterator enumerateKeys()
ResourceCache
enumerateKeys
in interface ResourceCache
Copyright ? 2002 Apache Software Foundation. All Rights Reserved.