public class StrongCacheStorage extends java.lang.Object implements ConcurrentCacheStorage, CacheStorageWithGetSize
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 always
thread-safe since 2.3.24, before that if we are running on Java 5 or later.| Constructor and Description |
|---|
StrongCacheStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
java.lang.Object |
get(java.lang.Object key) |
int |
getSize()
Returns a close approximation of the number of cache entries.
|
boolean |
isConcurrent()
Always returns
true. |
void |
put(java.lang.Object key,
java.lang.Object value) |
void |
remove(java.lang.Object key) |
public boolean isConcurrent()
true.isConcurrent in interface ConcurrentCacheStoragepublic java.lang.Object get(java.lang.Object key)
get in interface CacheStoragepublic void put(java.lang.Object key,
java.lang.Object value)
put in interface CacheStoragepublic void remove(java.lang.Object key)
remove in interface CacheStoragepublic int getSize()
getSize in interface CacheStorageWithGetSizepublic void clear()
clear in interface CacheStorage