Top Description Methods
org.apache.groovy.util.concurrent.concurrentlinkedhashmap

public Interface EntryWeigher<K, V>

Known Direct Implementers
org.apache.groovy.util.concurrent.concurrentlinkedhashmap.Weighers.EntryWeigherView, org.apache.groovy.util.concurrent.concurrentlinkedhashmap.Weighers.SingletonEntryWeigher, org.apache.groovy.util.concurrent.concurrentlinkedhashmap.ConcurrentLinkedHashMap.BoundedEntryWeigher
Annotations
@ThreadSafe
Imports
javax.annotation.concurrent.ThreadSafe

A class that can determine the weight of an entry. The total weight threshold is used to determine when an eviction is required.
See Also
http://code.google.com/p/concurrentlinkedhashmap/

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the entry's weight
weightOf
(K
the key to weigh
key
,
V
the value to weigh
value
)

Measures an entry's weight to determine how many units of capacity that the key and value consumes.

Method Detail

weightOfback to summary
public int weightOf(K key, V value)

Measures an entry's weight to determine how many units of capacity that the key and value consumes. An entry must consume a minimum of one unit.

Parameters
key:K

the key to weigh

value:V

the value to weigh

Returns:int

the entry's weight