org.hibernate.search.util.impl

## Class Maps

- java.lang.Object
- - org.hibernate.search.util.impl.Maps

-     public class Maps
      extends Object

  Helper class to create maps with commonly needed constructors.
  Author:
    Sanne Grinovero

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createIdentityWeakKeyConcurrentMap

          public 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. Comparison on the keys is based on identity reference.
      Type Parameters:
        `K` - the key type in the map
        `V` - the value type in the map
      Parameters:
        `initialSize` - for tuning of the initial size of the Map
        `concurrencyLevel` - the estimated number of concurrently updating threads. The implementation performs internal sizing to try to accommodate this many threads.
      Returns:
        a new concurrent map with the properties described above.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved