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 voidclear()Removes all of the elements from this cache.Vget(K key)Gets an entry from the cache.booleanisEmpty()Returnstrueif this cache contains no key-value mappings.java.util.Set<K>keySet()Returns aSetview of the keys contained in this cache.voidremove(K key)Removes the specified element from this cache if it is present.intsize()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:CacheRemoves the specified element from this cache if it is present.
-
clear
public void clear()
Description copied from interface:CacheRemoves all of the elements from this cache.
-
keySet
public java.util.Set<K> keySet()
Description copied from interface:CacheReturns aSetview of the keys contained in this cache.
-
size
public int size()
Description copied from interface:CacheReturns the number of elements in this cache.
-
-