Class RandomEviction

    • Method Detail

      • updateWeight

        public boolean updateWeight​(Entry e)
        Description copied from interface: Eviction
        Updates the weight on the entry and recalculates the total weight if needed.

        Expected not to hold the entry lock, which means, that this does not run in sync with the actual update. That is okay as long as it runs after every update.

        Since we need to lock the eviction structure, this can happen in a separate thread.

        Specified by:
        updateWeight in interface Eviction
        Overrides:
        updateWeight in class AbstractEviction
        Returns:
        hint whether eviction should be run. for a bulk operation we want to do eviction once, so not do it within this method
      • findEvictionCandidate

        protected Entry findEvictionCandidate()
        Description copied from class: AbstractEviction
        Find a candidate for eviction. The method may return the identical if called many times but not sufficient more candidates are available. In any situation, subsequent calls must iterate all entries.
        Specified by:
        findEvictionCandidate in class AbstractEviction
      • checkIntegrity

        public void checkIntegrity​(IntegrityState integrityState)