Class LFUCache<K,V>

java.lang.Object
org.apache.dubbo.common.utils.LFUCache<K,V>

public class LFUCache<K,V> extends Object
  • 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 with IllegalArgumentException.
      Parameters:
      maxCapacity - cache max capacity
      evictionFactor - cache proceedEviction factor
  • Method Details

    • getCapacity

      public int getCapacity()
    • put

      public V put(K key, V value)
    • remove

      public V remove(K key)
    • get

      public V get(K key)
    • getSize

      public int getSize()
      Returns cache current size.
      Returns:
      cache size