Package org.apache.openjpa.lib.util
Interface ReferenceMap
- All Superinterfaces:
Map
- All Known Implementing Classes:
ConcurrentReferenceHashMap
,ReferenceHashMap
A
Map
type that can hold its keys, values, or both with
weak or soft references.- Author:
- Abe White
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
keyExpired
(Object value) Overridable callback for when a key reference expires.void
Purge stale entries.void
valueExpired
(Object key) Overridable callback for when a value reference expires.Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
removeExpired
void removeExpired()Purge stale entries. -
keyExpired
Overridable callback for when a key reference expires.- Parameters:
value
- the value for the expired key
-
valueExpired
Overridable callback for when a value reference expires.- Parameters:
key
- the key for the expired value
-