Interface Admittor.KeyOnlyAdmittor

  • All Superinterfaces:
    Admittor
    All Known Implementing Classes:
    TinyLfu
    Enclosing interface:
    Admittor

    public static interface Admittor.KeyOnlyAdmittor
    extends Admittor
    An admission policy that does not exploit external event metadata.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean admit​(long candidateKey, long victimKey)
      Returns if the candidate should be added to the cache and the page replacement policy's chosen victim should be removed.
      default boolean admit​(AccessEvent candidate, AccessEvent victim)
      Returns if the candidate should be added to the cache and the page replacement policy's chosen victim should be removed.
      void record​(long key)
      Records the access to the entry.
      default void record​(AccessEvent event)
      Records the access to the entry.
    • Method Detail

      • record

        void record​(long key)
        Description copied from interface: Admittor
        Records the access to the entry.
        Specified by:
        record in interface Admittor
      • admit

        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
        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
      • record

        default void record​(AccessEvent event)
        Description copied from interface: Admittor
        Records the access to the entry.
        Specified by:
        record in interface Admittor
      • admit

        default boolean admit​(AccessEvent candidate,
                              AccessEvent victim)
        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
        Parameters:
        candidate - the event of the newly added entry
        victim - the event of the entry the policy recommends removing
        Returns:
        if the candidate should be added and the victim removed due to eviction