public class ConcurrentSoftCache<K, V> extends ConcurrentCommonCache
Represents concurrent cache holding SoftReference instance as value
K - key typeV - real value type| Constructor and description |
|---|
ConcurrentSoftCache()Constructs a cache with unlimited size |
ConcurrentSoftCache(int initialCapacity, int maxSize, EvictionStrategy evictionStrategy)Constructs a cache with limited size |
ConcurrentSoftCache(int initialCapacity, int maxSize)Constructs an LRU cache with the specified initial capacity and max size. |
ConcurrentSoftCache(int maxSize)Constructs an LRU cache with the default initial capacity(16) |
ConcurrentSoftCache(Map<K, SoftReference<V>> map)Constructs a cache backed by the specified Map instance |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
convertValue(SoftReference<V> value){@inheritDoc} |
| Methods inherited from class | Name |
|---|---|
class ConcurrentCommonCache |
cleanUpNullReferences, clearAll, containsKey, containsValue, convertValue, entrySet, get, getAndPut, getAndPut, isEmpty, keySet, keys, put, putAll, remove, size, values |
Constructs a cache with unlimited size
Constructs a cache with limited size
initialCapacity - initial capacity of the cachemaxSize - max size of the cacheevictionStrategy - LRU or FIFO, see org.codehaus.groovy.runtime.memoize.EvictableCache.EvictionStrategyConstructs an LRU cache with the specified initial capacity and max size. The LRU cache is slower than LRUCache
initialCapacity - initial capacity of the LRU cachemaxSize - max size of the LRU cacheConstructs an LRU cache with the default initial capacity(16)
maxSize - max size of the LRU cacheConstructs a cache backed by the specified Map instance
map - the Map instance{@inheritDoc}
Copyright © 2003-2022 The Apache Software Foundation. All rights reserved.