Class ConcurrentSoftCache
java.lang.Object
com.j_spaces.jdbc.QueryCache
com.gigaspaces.internal.utils.collections.ConcurrentSoftCache
Deprecated.
Since 10.1.0 - use ConcurrentBoundedSoftCache instead
Soft reference concurrent cache. It uses a ConcurrentHashMap and a soft reference for the
values.
An entry in a ConcurrentSoftCache will be removed on JVM memory shortage.
A double-reference is used to store the values, so that the finalize() method can be used to
remove the entry from cache when it is collected by the garbage collector.
Note The entry will be removed even if there is a hard reference to it somewhere, since
the double-reference is used.
- Since:
- 5.1
- Version:
- 1.0
- Author:
- anna
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentHashMap<String,SoftReference<com.gigaspaces.internal.utils.collections.ConcurrentSoftCache.DoubleRef<String, Query>>> Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQueryToCache(String statement, Query query) Deprecated.voidclear()Deprecated.getQueryFromCache(String statement) Deprecated.Methods inherited from class com.j_spaces.jdbc.QueryCache
create
-
Field Details
-
_map
protected final ConcurrentHashMap<String,SoftReference<com.gigaspaces.internal.utils.collections.ConcurrentSoftCache.DoubleRef<String, _mapQuery>>> Deprecated.
-
-
Constructor Details
-
ConcurrentSoftCache
public ConcurrentSoftCache()Deprecated.
-
-
Method Details
-
addQueryToCache
Deprecated.- Specified by:
addQueryToCachein classQueryCache
-
getQueryFromCache
Deprecated.- Specified by:
getQueryFromCachein classQueryCache
-
clear
public void clear()Deprecated.- Specified by:
clearin classQueryCache
-