Interface ReferenceMap

All Superinterfaces:
Map
All Known Implementing Classes:
ConcurrentReferenceHashMap, ReferenceHashMap

public interface ReferenceMap extends Map
A Map type that can hold its keys, values, or both with weak or soft references.
Author:
Abe White
  • Method Details

    • removeExpired

      void removeExpired()
      Purge stale entries.
    • keyExpired

      void keyExpired(Object value)
      Overridable callback for when a key reference expires.
      Parameters:
      value - the value for the expired key
    • valueExpired

      void valueExpired(Object key)
      Overridable callback for when a value reference expires.
      Parameters:
      key - the key for the expired value