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 org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache |
org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#remove(java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#get(java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#put(java.lang.Object, java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#values(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#isEmpty(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#size(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#entrySet(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#putAll(java.util.Map), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#keySet(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#keys(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#containsKey(java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#containsValue(java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#convertValue(java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#cleanUpNullReferences(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#getAndPut(java.lang.Object, org.codehaus.groovy.runtime.memoize.MemoizeCache$ValueProvider, boolean), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#getAndPut(java.lang.Object, org.codehaus.groovy.runtime.memoize.MemoizeCache$ValueProvider), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#clearAll(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#wait(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#wait(long, int), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#wait(long), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#equals(java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#toString(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#hashCode(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#getClass(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#notify(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#notifyAll(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#clear(), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#remove(java.lang.Object, java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#replace(java.lang.Object, java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#replace(java.lang.Object, java.lang.Object, java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#replaceAll(java.util.function.BiFunction), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#putIfAbsent(java.lang.Object, java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#compute(java.lang.Object, java.util.function.BiFunction), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#computeIfAbsent(java.lang.Object, java.util.function.Function), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#computeIfPresent(java.lang.Object, java.util.function.BiFunction), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#forEach(java.util.function.BiConsumer), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#getOrDefault(java.lang.Object, java.lang.Object), org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache#merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction) |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
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 org.codehaus.groovy.runtime.memoize.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-2018 The Apache Software Foundation. All rights reserved.