|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.cache.SoftCacheStorage
MruCacheStorage
instead.
public class SoftCacheStorage
Strong cache storage is a cache storage that uses SoftReference
objects to hold the objects it was passed, therefore allows the garbage
collector to purge the cache when it determines that it wants to free up
memory.
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 | |
---|---|
SoftCacheStorage()
Deprecated. |
|
SoftCacheStorage(java.util.Map backingMap)
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 SoftCacheStorage()
public SoftCacheStorage(java.util.Map backingMap)
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 |