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 2002/02/12 19:08:06 dlr Exp $

Authors:
Geir Magnusson Jr.
Daniel Rall

Nested Class Summary

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 © 2003 Apache Software Foundation. All Rights Reserved.