| |
|
| java.lang.Object org.pnuts.lib.ResourceCache
All known Subclasses: org.pnuts.lib.DateFormatCache, org.pnuts.lib.CalendarCache,
ResourceCache | class ResourceCache (Code) | | Resource cache implemented with SoftReference.
|
ResourceCache | public ResourceCache()(Code) | | Constructor
|
createResource | protected Object createResource(Object key)(Code) | | Creates a new resource associated with the specified key.
Parameters: key - the key of the resource a newly created resource |
findResource | protected synchronized Object findResource(Object key)(Code) | | Finds a resource associated with the specified key.
Returns null if not found or already expired.
Parameters: key - the key of the resource the resource or null |
getResource | public Object getResource(Object key)(Code) | | Gets a resource associated with the specified key.
If the resource has been expired, a new one is created.
Parameters: key - the key of the resource a resource associated with the key |
invalidate | public synchronized void invalidate(Object key)(Code) | | Invalidate the resource associated with the specified key
|
reset | public synchronized void reset()(Code) | | Discard all cached resources
|
|
|
|