org.apache.velocity.runtime.resource

Class ResourceCacheImpl

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.8.1 2004/03/03 23:23:01 geirm Exp $
Authors:
Geir Magnusson Jr.
Daniel Rall

Field Summary

protected Map
cache
Cache storage, assumed to be thread-safe.
protected RuntimeServices
rsvc
Runtime services, generally initialized by the initialize() method.

Method Summary

Iterator
enumerateKeys()
Resource
get(Object key)
void
initialize(RuntimeServices rs)
Resource
put(Object key, Resource value)
Resource
remove(Object key)

Field Details

cache

protected Map cache
Cache storage, assumed to be thread-safe.

rsvc

protected RuntimeServices rsvc
Runtime services, generally initialized by the initialize() method.

Method Details

enumerateKeys

public Iterator enumerateKeys()
Specified by:
enumerateKeys in interface ResourceCache

get

public Resource get(Object key)
Specified by:
get in interface ResourceCache

initialize

public void initialize(RuntimeServices rs)
Specified by:
initialize in interface ResourceCache

put

public Resource put(Object key,
                    Resource value)
Specified by:
put in interface ResourceCache

remove

public Resource remove(Object key)
Specified by:
remove in interface ResourceCache

Copyright B) 2002 Apache Software Foundation. All Rights Reserved.