ConcurrentReferenceHashMap.ReferenceManager (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.util

## Class ConcurrentReferenceHashMap.ReferenceManager

- java.lang.Object
- - org.springframework.util.ConcurrentReferenceHashMap.ReferenceManager

- Enclosing class:
    ConcurrentReferenceHashMap<K,V>

      protected class ConcurrentReferenceHashMap.ReferenceManager
      extends Object

  Strategy class used to manage `ConcurrentReferenceHashMap.Reference`s. This class can be overridden if alternative reference types need to be supported.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ConcurrentReferenceHashMap.ReferenceManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConcurrentReferenceHashMap.Reference<K,V>` | `createReference(ConcurrentReferenceHashMap.Entry<K,V> entry, int hash, ConcurrentReferenceHashMap.Reference<K,V> next)` Factory method used to create a new `ConcurrentReferenceHashMap.Reference`.
    `ConcurrentReferenceHashMap.Reference<K,V>` | `pollForPurge()` Return any reference that has been garbage collected and can be purged from the underlying structure or `null` if no references need purging.

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

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

- - ### Constructor Detail

    - #### ConcurrentReferenceHashMap.ReferenceManager

          protected ConcurrentReferenceHashMap.ReferenceManager()

  - ### Method Detail

    - #### createReference

          public ConcurrentReferenceHashMap.Reference<K,V> createReference(ConcurrentReferenceHashMap.Entry<K,V> entry,
                                                                  int hash,
                                                                  ConcurrentReferenceHashMap.Reference<K,V> next)

      Factory method used to create a new `ConcurrentReferenceHashMap.Reference`.
      Parameters:
        `entry` - the entry contained in the reference
        `hash` - the hash
        `next` - the next reference in the chain or `null`
      Returns:
        a new `ConcurrentReferenceHashMap.Reference`

    - #### pollForPurge

          public ConcurrentReferenceHashMap.Reference<K,V> pollForPurge()

      Return any reference that has been garbage collected and can be purged from the underlying structure or `null` if no references need purging. This method must be thread safe and ideally should not block when returning `null`. References should be returned once and only once.
      Returns:
        a reference to purge or `null`