Package org.datanucleus.api.jdo
Class JDOQueryCache
java.lang.Object
org.datanucleus.api.jdo.JDOQueryCache
- All Implemented Interfaces:
Serializable
Implementation of the JDO QueryCache.
Provides a wrapper and hands off calls to the underlying query cache.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.datanucleus.store.query.cache.QueryResultsCache
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionJDOQueryCache
(org.datanucleus.store.query.cache.QueryResultsCache cache) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
evict
(javax.jdo.Query query) Evict all cached results for the provided query.void
Evict the cached results for the provided query and params.void
evictAll()
Evict the parameter instances from the second-level cache.org.datanucleus.store.query.cache.QueryResultsCache
Accessor for the underlying query cache.void
pin
(javax.jdo.Query query) Method to pin the specified query in the cache, preventing garbage collection.void
Method to pin the specified query in the cache, preventing garbage collection.void
unpin
(javax.jdo.Query query) Method to unpin the specified query from the cache, allowing garbage collection.void
Method to unpin the specified query from the cache, allowing garbage collection.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
resultsCache
org.datanucleus.store.query.cache.QueryResultsCache resultsCache
-
-
Constructor Details
-
JDOQueryCache
public JDOQueryCache(org.datanucleus.store.query.cache.QueryResultsCache cache) Constructor.- Parameters:
cache
- Query results cache
-
-
Method Details
-
getQueryCache
public org.datanucleus.store.query.cache.QueryResultsCache getQueryCache()Accessor for the underlying query cache.- Returns:
- Underlying query cache.
-
evict
public void evict(javax.jdo.Query query) Evict all cached results for the provided query.- Parameters:
query
- The JDO query
-
evict
Evict the cached results for the provided query and params.- Parameters:
query
- The JDO queryparams
- The input params
-
evictAll
public void evictAll()Evict the parameter instances from the second-level cache. All instances in the PersistenceManager's cache are evicted from the second-level cache. -
pin
public void pin(javax.jdo.Query query) Method to pin the specified query in the cache, preventing garbage collection.- Parameters:
query
- The query
-
pin
Method to pin the specified query in the cache, preventing garbage collection.- Parameters:
query
- The queryparams
- Its params
-
unpin
public void unpin(javax.jdo.Query query) Method to unpin the specified query from the cache, allowing garbage collection.- Parameters:
query
- The query
-
unpin
Method to unpin the specified query from the cache, allowing garbage collection.- Parameters:
query
- The queryparams
- Its params
-