|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.cache.StrongCacheStorage
MruCacheStorage
instead.
public class StrongCacheStorage
Strong cache storage is a cache storage that simply wraps a HashMap
.
It holds a strong reference to all objects it was passed, therefore prevents
the cache from being purged during garbage collection.
This class is NOT thread-safe. If it is accessed from multiple
threads concurrently, proper synchronization must be provided by the callers.
Note that TemplateCache
, the natural user of this class provides the
necessary synchronizations when it uses the class.
Constructor Summary | |
---|---|
StrongCacheStorage()
Deprecated. |
Method Summary | |
---|---|
void |
clear()
Deprecated. |
java.lang.Object |
get(java.lang.Object key)
Deprecated. |
void |
put(java.lang.Object key,
java.lang.Object value)
Deprecated. |
void |
remove(java.lang.Object key)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrongCacheStorage()
Method Detail |
---|
public java.lang.Object get(java.lang.Object key)
get
in interface CacheStorage
public void put(java.lang.Object key, java.lang.Object value)
put
in interface CacheStorage
public void remove(java.lang.Object key)
remove
in interface CacheStorage
public void clear()
clear
in interface CacheStorage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |