Class TinyLfu

    • Method Detail

      • frequency

        public int frequency​(long key)
      • admit

        public boolean admit​(long candidateKey,
                             long victimKey)
        Description copied from interface: Admittor
        Returns if the candidate should be added to the cache and the page replacement policy's chosen victim should be removed.
        Specified by:
        admit in interface Admittor
        Specified by:
        admit in interface Admittor.KeyOnlyAdmittor
        Parameters:
        candidateKey - the key to the newly added entry
        victimKey - the key to the entry the policy recommends removing
        Returns:
        if the candidate should be added and the victim removed due to eviction