[Java] Interface Weigher<V>

@ThreadSafe
public interface Weigher<V>

A class that can determine the weight of a value. The total weight threshold is used to determine when an eviction is required.

See Also:
http://code.google.com/p/concurrentlinkedhashmap/

Methods Summary

Methods
Type Params Return Type Name and description
public int weightOf(V value)
Measures an object's weight to determine how many units of capacity that the value consumes.

Method Detail

public int weightOf(V value)

Measures an object's weight 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 weight

© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/Weigher.html