ManagedConcurrentValueMap (Groovy 5.0.7)

Package: org.codehaus.groovy.util

## [Java] Class ManagedConcurrentValueMap<K, V>

- org.codehaus.groovy.util.ManagedConcurrentValueMap

-     public class ManagedConcurrentValueMap<K, V>
      extends Object

  This is a basic implementation of a map able to forget its values. This map uses internally a ConcurrentHashMap, thus should be safe for concurrency. hashcode and equals are used to find the entries and should thus be implemented properly for the keys. This map does not support null keys.

  Type Parameters:
    `K` - the key type
    `V` - the value type

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ManagedConcurrentValueMap(ReferenceBundle bundle)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `finalizeReference()`
    `` | `public V` | `get(K key)` Returns the value stored for the given key at the point of call.
    `` | `public void` | `put(K key, V value)` Sets a new value for a given key. an older value is overwritten.
    `` | `public void` | `setBundle(ReferenceBundle bundle)` Sets a new bundle used for reference creation.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public ManagedConcurrentValueMap(ReferenceBundle bundle)

  - ### Method Detail

    - #### @Override
      public void finalizeReference()

    - #### public V get(K key)

      Returns the value stored for the given key at the point of call.

      Parameters:
        `key` - a non null key
      Returns:
        the value stored in the map for the given key

    - #### public void put(K key, V value)

      Sets a new value for a given key. an older value is overwritten.

      Parameters:
        `key` - a non null key
        `value` - the new value

    - #### public void setBundle(ReferenceBundle bundle)

      Sets a new bundle used for reference creation. Be warned that older entries will not be changed by this

      Parameters:
        `bundle` - - the ReferenceBundle