Class EntryCacheDefaultEvictionPolicy

  • All Implemented Interfaces:
    EntryCacheEvictionPolicy

    public class EntryCacheDefaultEvictionPolicy
    extends java.lang.Object
    implements EntryCacheEvictionPolicy
    Default eviction policy.

    This policy consider only the bigger caches for doing eviction.

    The PercentOfSizeToConsiderForEviction parameter should always be bigger than the cacheEvictionWatermak, otherwisethe eviction cycle will free less memory than what was required.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doEviction​(java.util.List<EntryCache> caches, long sizeToFree)
      Perform the cache eviction of at least sizeToFree bytes on the supplied list of caches.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EntryCacheDefaultEvictionPolicy

        public EntryCacheDefaultEvictionPolicy()
    • Method Detail

      • doEviction

        public void doEviction​(java.util.List<EntryCache> caches,
                               long sizeToFree)
        Description copied from interface: EntryCacheEvictionPolicy
        Perform the cache eviction of at least sizeToFree bytes on the supplied list of caches.
        Specified by:
        doEviction in interface EntryCacheEvictionPolicy
        Parameters:
        caches - the list of caches to consider
        sizeToFree - the minimum size in bytes to be freed