public class Maps extends Object
Modifier and Type | Method and Description |
---|---|
static <K,V> ConcurrentMap<K,V> |
createIdentityWeakKeyConcurrentMap(int initialSize,
int concurrencyLevel)
Creates a ConcurrentMap using weak references to keys, so that garbage collection
of the key allows to remove the value from the map.
|
public static <K,V> ConcurrentMap<K,V> createIdentityWeakKeyConcurrentMap(int initialSize, int concurrencyLevel)
K
- the key type in the mapV
- the value type in the mapinitialSize
- for tuning of the initial size of the MapconcurrencyLevel
- the estimated number of concurrently
updating threads. The implementation performs internal sizing
to try to accommodate this many threads.Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved