Interface ResourceCache
-
- All Known Implementing Classes:
ResourceCacheImpl
public interface ResourceCacheInterface that defines the shape of a pluggable resource cache for the included ResourceManager- Version:
- $Id$
- Author:
- Geir Magnusson Jr.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Removes all of the resources from this cache.IteratorenumerateKeys()returns an Iterator of Keys in the cache.Resourceget(Object resourceKey)retrieves a Resource from the cachevoidinitialize(RuntimeServices rs)initializes the ResourceCache.Resourceput(Object resourceKey, Resource resource)stores a Resource in the cacheResourceremove(Object resourceKey)removes a Resource from the cache
-
-
-
Method Detail
-
initialize
void initialize(RuntimeServices rs)
initializes the ResourceCache. Will be called before any utilization- Parameters:
rs- RuntimeServices to use for logging, etc
-
get
Resource get(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
Resource put(Object resourceKey, Resource resource)
stores a Resource in the cache- Parameters:
resourceKey- key to associate with the Resourceresource- Resource to be stored- Returns:
- existing Resource stored under this key, or null if none
-
remove
Resource remove(Object resourceKey)
removes a Resource from the cache- Parameters:
resourceKey- resource to be removed- Returns:
- stored under key
-
clear
void clear()
Removes all of the resources from this cache. The cache will be empty after this call returns.- Since:
- 2.0
-
enumerateKeys
Iterator enumerateKeys()
returns an Iterator of Keys in the cache.- Returns:
- An Iterator of Keys in the cache.
-
-