Class EmpiricalWeigher

    • Constructor Detail

      • EmpiricalWeigher

        public EmpiricalWeigher()
    • Method Detail

      • weigh

        public int weigh​(CacheValue key,
                         CacheValue value)
        Description copied from interface: Weigher
        Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply relative to each other.
        Specified by:
        weigh in interface Weigher<CacheValue,​CacheValue>
        Returns:
        the weight of the entry; must be non-negative