Class EntryCacheDefaultEvictionPolicy
- java.lang.Object
-
- org.apache.bookkeeper.mledger.impl.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.
-
-
Constructor Summary
Constructors Constructor Description EntryCacheDefaultEvictionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoEviction(java.util.List<EntryCache> caches, long sizeToFree)Perform the cache eviction of at least sizeToFree bytes on the supplied list of caches.
-
-
-
Method Detail
-
doEviction
public void doEviction(java.util.List<EntryCache> caches, long sizeToFree)
Description copied from interface:EntryCacheEvictionPolicyPerform the cache eviction of at least sizeToFree bytes on the supplied list of caches.- Specified by:
doEvictionin interfaceEntryCacheEvictionPolicy- Parameters:
caches- the list of caches to considersizeToFree- the minimum size in bytes to be freed
-
-