Interface Weigher<V>
- Type Parameters:
V- 值类型 ben.manes@gmail.com (Ben Manes)
public interface Weigher<V>
A class that can determine the selector of a value. The total selector threshold
is used to determine when an eviction is required.
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Method Summary
-
Method Details
-
weightOf
Measures an object's selector to determine how many units of capacity that the value consumes. A value must consume a minimum of one unit.- Parameters:
value- the object to weigh- Returns:
- the object's selector
-