ResourceCache (Velocity 1.4 API)
Keywords: org.apache.velocity.runtime.resource.ResourceCache interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.resource
Interface ResourceCache

All Known Implementing Classes:
  ResourceCacheImpl

public interface ResourceCache

Interface that defines the shape of a pluggable resource cache for the included ResourceManager

Version:
  $Id: ResourceCache.java,v 1.1.8.1 2004/03/03 23:23:01 geirm Exp $
Author:
  Geir Magnusson Jr.

Method Summary
`java.util.Iterator` | `enumerateKeys()` returns an Iterator of Keys in the cache
`Resource` | `get(java.lang.Object resourceKey)` retrieves a Resource from the cache
`void` | `initialize(RuntimeServices rs)` initializes the ResourceCache.
`Resource` | `put(java.lang.Object resourceKey, Resource resource)` stores a Resource in the cache
`Resource` | `remove(java.lang.Object resourceKey)` removes a Resource from the cache

Method Detail

### initialize

    public void initialize(RuntimeServices rs)

  initializes the ResourceCache. Will be called before any utilization

  Parameters:
    `rs` - RuntimeServices to use for logging, etc

### get

    public Resource get(java.lang.Object resourceKey)

  retrieves a Resource from the cache

  Parameters:
    `resourceKey` - key for Resource to be retrieved
  Returns:
    Resource specified or null if not found

### put

    public Resource put(java.lang.Object resourceKey,
                        Resource resource)

  stores a Resource in the cache

  Parameters:
    `resourceKey` - key to associate with the Resource
    `resource` - Resource to be stored
  Returns:
    existing Resource stored under this key, or null if none

### remove

    public Resource remove(java.lang.Object resourceKey)

  removes a Resource from the cache

  Parameters:
    `resourceKey` - resource to be removed

### enumerateKeys

    public java.util.Iterator enumerateKeys()

  returns an Iterator of Keys in the cache

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 Apache Software Foundation. All Rights Reserved.