Package org.datanucleus.cache
Interface Level1Cache
-
- All Superinterfaces:
Map<Object,ObjectProvider>
- All Known Implementing Classes:
SoftRefCache
,StrongRefCache
,WeakRefCache
public interface Level1Cache extends Map<Object,ObjectProvider>
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 ObjectProvider
getUnique(CacheUniqueKey key)
Method to retrieve the ObjectProvider for the specified unique key.Object
putUnique(CacheUniqueKey key, ObjectProvider op)
Method to store an ObjectProvider 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
ObjectProvider getUnique(CacheUniqueKey key)
Method to retrieve the ObjectProvider for the specified unique key.- Parameters:
key
- Unique key- Returns:
- The ObjectProvider if one is cached for this unique key
-
putUnique
Object putUnique(CacheUniqueKey key, ObjectProvider op)
Method to store an ObjectProvider for this unique key.- Parameters:
key
- The unique keyop
- The ObjectProvider- Returns:
- The previous ObjectProvider for this unique key if one was present, otherwise null
-
-