Package org.apache.dubbo.common.utils
Class LFUCache<K,V>
java.lang.Object
org.apache.dubbo.common.utils.LFUCache<K,V>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LFUCache
public LFUCache() -
LFUCache
public LFUCache(int maxCapacity, float evictionFactor) Constructs and initializes cache with specified capacity and eviction factor. Unacceptable parameter values followed withIllegalArgumentException.- Parameters:
maxCapacity- cache max capacityevictionFactor- cache proceedEviction factor
-
-
Method Details
-
getCapacity
public int getCapacity() -
put
-
remove
-
get
-
getSize
public int getSize()Returns cache current size.- Returns:
- cache size
-