Package org.apache.jackrabbit.oak.cache
Class EmpiricalWeigher
- java.lang.Object
 - 
- org.apache.jackrabbit.oak.cache.EmpiricalWeigher
 
 
- 
- All Implemented Interfaces:
 Weigher<CacheValue,CacheValue>
public class EmpiricalWeigher extends java.lang.Object implements Weigher<CacheValue,CacheValue>
Determines the weight of object based on the memory taken by them. The memory estimates are based on empirical data and not exact 
- 
- 
Constructor Summary
Constructors Constructor Description EmpiricalWeigher() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intweigh(CacheValue key, CacheValue value)Returns the weight of a cache entry. 
 - 
 
- 
- 
Method Detail
- 
weigh
public int weigh(CacheValue key, CacheValue value)
Description copied from interface:WeigherReturns the weight of a cache entry. There is no unit for entry weights; rather they are simply relative to each other.- Specified by:
 weighin interfaceWeigher<CacheValue,CacheValue>- Returns:
 - the weight of the entry; must be non-negative
 
 
 - 
 
 -