Package cn.sliew.milky.common.cache.lfu
Class LFUCache<K,V>
- java.lang.Object
-
- cn.sliew.milky.common.cache.lfu.LFUCache<K,V>
-
public class LFUCache<K,V> extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget(K key)intgetCapacity()intgetSize()Returns cache current size.Vput(K key, V value)Vremove(K key)
-
-
-
Constructor Detail
-
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
-
-