Class EntryCacheDefaultEvictionPolicy
java.lang.Object
org.apache.bookkeeper.mledger.impl.cache.EntryCacheDefaultEvictionPolicy
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddoEviction(List<EntryCache> caches, long sizeToFree) Perform the cache eviction of at least sizeToFree bytes on the supplied list of caches.
-
Constructor Details
-
EntryCacheDefaultEvictionPolicy
public EntryCacheDefaultEvictionPolicy()
-
-
Method Details
-
doEviction
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
-