freemarker.cache
Class StrongCacheStorage
java.lang.Object
freemarker.cache.StrongCacheStorage
- CacheStorage, ConcurrentCacheStorage
public class StrongCacheStorage
extends java.lang.Object
Strong cache storage is a cache storage that simply wraps a Map
.
It holds a strong reference to all objects it was passed, therefore prevents
the cache from being purged during garbage collection.
This class is thread-safe to the extent that its underlying map is. The
default implementation uses a concurrent map on Java 5 and above, so it is
thread-safe in that case.
$Id: StrongCacheStorage.java,v 1.3 2003/09/22 20:47:03 ddekany Exp $ void | clear()
|
Object | get(Object key)
|
boolean | isConcurrent() - Returns true if the underlying Map is a
ConcurrentMap .
|
void | put(Object key, Object value)
|
void | remove(Object key)
|