Package org.datanucleus.cache
Interface Level1Cache
- All Superinterfaces:
Map<Object,
DNStateManager>
- All Known Implementing Classes:
SoftRefCache
,StrongRefCache
,WeakRefCache
Provides an interface for Level 1 caches.
Currently we just require a Map, but interfacing this provides the flexibility to being able to add requirements in the future.
-
Nested Class Summary
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetUnique
(CacheUniqueKey key) Method to retrieve StateManager for the specified unique key.putUnique
(CacheUniqueKey key, DNStateManager sm) Method to store a StateManager for this unique key.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
-
Field Details
-
NONE_NAME
- See Also:
-
-
Method Details
-
getUnique
Method to retrieve StateManager for the specified unique key.- Parameters:
key
- Unique key- Returns:
- StateManager if one is cached for this unique key
-
putUnique
Method to store a StateManager for this unique key.- Parameters:
key
- The unique keysm
- StateManager- Returns:
- The previous StateManager for this unique key if one was present, otherwise null
-