Package org.datanucleus.cache
Interface Level1Cache
-
- All Superinterfaces:
Map<Object,DNStateManager>
- All Known Implementing Classes:
SoftRefCache,StrongRefCache,WeakRefCache
public interface Level1Cache extends Map<Object,DNStateManager>
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DNStateManagergetUnique(CacheUniqueKey key)Method to retrieve StateManager for the specified unique key.ObjectputUnique(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 Detail
-
NONE_NAME
static final String NONE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUnique
DNStateManager getUnique(CacheUniqueKey key)
Method to retrieve StateManager for the specified unique key.- Parameters:
key- Unique key- Returns:
- StateManager if one is cached for this unique key
-
putUnique
Object putUnique(CacheUniqueKey key, DNStateManager sm)
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
-
-