Package com.aspectran.core.util.cache
Class ConcurrentReferenceCache<K,V>
- java.lang.Object
-
- com.aspectran.core.util.cache.ConcurrentReferenceCache<K,V>
-
-
Constructor Summary
Constructors Constructor Description ConcurrentReferenceCache(ConcurrentReferenceHashMap.ReferenceType referenceType, java.util.function.Function<K,V> generator)
ConcurrentReferenceCache(java.util.function.Function<K,V> generator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all of the elements from this cache.V
get(K key)
Gets an entry from the cache.boolean
isEmpty()
Returnstrue
if this cache contains no key-value mappings.java.util.Set<K>
keySet()
Returns aSet
view of the keys contained in this cache.void
remove(K key)
Removes the specified element from this cache if it is present.int
size()
Returns the number of elements in this cache.
-
-
-
Constructor Detail
-
ConcurrentReferenceCache
public ConcurrentReferenceCache(java.util.function.Function<K,V> generator)
-
ConcurrentReferenceCache
public ConcurrentReferenceCache(ConcurrentReferenceHashMap.ReferenceType referenceType, java.util.function.Function<K,V> generator)
-
-
Method Detail
-
remove
public void remove(K key)
Description copied from interface:Cache
Removes the specified element from this cache if it is present.
-
clear
public void clear()
Description copied from interface:Cache
Removes all of the elements from this cache.
-
keySet
public java.util.Set<K> keySet()
Description copied from interface:Cache
Returns aSet
view of the keys contained in this cache.
-
size
public int size()
Description copied from interface:Cache
Returns the number of elements in this cache.
-
-