Represents concurrent cache holding SoftReference instance as value
- key type
- real value typeConstructor 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 a LRU cache with the specified initial capacity and max size. |
ConcurrentSoftCache
(int maxSize) Constructs a 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 |
---|---|---|
|
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 a 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 a 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-2020 The Apache Software Foundation. All rights reserved.