Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.lib.util
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

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry<K,V>`

Field Summary
`static int` | `HARD`
`static int` | `SOFT`
`static int` | `WEAK`

Method Summary
`void` | `keyExpired(Object value)` Overridable callback for when a key reference expires.
`void` | `removeExpired()` Purge stale entries.
`void` | `valueExpired(Object key)` Overridable callback for when a value reference expires.

Methods inherited from interface java.util.Map
`clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

Field Detail

### HARD

    static final int HARD

See Also:
  Constant Field Values

### WEAK

    static final int WEAK

See Also:
  Constant Field Values

### SOFT

    static final int SOFT

See Also:
  Constant Field Values

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.