类 EntryCacheDefaultEvictionPolicy

java.lang.Object
org.apache.bookkeeper.mledger.impl.cache.EntryCacheDefaultEvictionPolicy
所有已实现的接口:
EntryCacheEvictionPolicy

public class EntryCacheDefaultEvictionPolicy extends 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.

  • 构造器详细资料

    • EntryCacheDefaultEvictionPolicy

      public EntryCacheDefaultEvictionPolicy()
  • 方法详细资料

    • doEviction

      public void doEviction(List<EntryCache> caches, long sizeToFree)
      从接口复制的说明: EntryCacheEvictionPolicy
      Perform the cache eviction of at least sizeToFree bytes on the supplied list of caches.
      指定者:
      doEviction 在接口中 EntryCacheEvictionPolicy
      参数:
      caches - the list of caches to consider
      sizeToFree - the minimum size in bytes to be freed