Class EmpiricalWeigher

  • All Implemented Interfaces:
    Weigher<CacheValue,​CacheValue>

    @Deprecated(since="2022-12-01")
    public class EmpiricalWeigher
    extends java.lang.Object
    implements Weigher<CacheValue,​CacheValue>
    Deprecated.
    The Jackrabbit Oak Cache library is designed for Oak-internal use only and thus deprecated. It will not be part of the AEM SDK after April 2023.
    Determines the weight of object based on the memory taken by them. The memory estimates are based on empirical data and not exact
    • Constructor Detail

      • EmpiricalWeigher

        public EmpiricalWeigher()
        Deprecated.
    • Method Detail

      • weigh

        public int weigh​(CacheValue key,
                         CacheValue value)
        Deprecated.
        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