public class JavaxCacheQueryResultCache extends AbstractQueryResultsCache
cacheName, clearAtClose, expiryMillis, maxSize, nucleusCtx
Constructor and Description |
---|
JavaxCacheQueryResultCache(NucleusContext nucleusCtx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Method to close the cache when no longer needed.
|
boolean |
contains(String queryKey)
Accessor for whether the specified query is in the cache
|
void |
evict(Class candidate)
Method to evict all queries that use the provided class as candidate.
|
void |
evict(Query query)
Evict the query from the results cache.
|
void |
evict(Query query,
Map params)
Evict the query with the specified params from the results cache.
|
void |
evictAll()
Method to clear the cache.
|
List<Object> |
get(String queryKey)
Accessor for the results from the cache.
|
List<Object> |
put(String queryKey,
List<Object> results)
Method to put an object in the cache.
|
public JavaxCacheQueryResultCache(NucleusContext nucleusCtx)
nucleusCtx
- Contextpublic void close()
QueryResultsCache
public boolean contains(String queryKey)
QueryResultsCache
queryKey
- The query keypublic void evict(Class candidate)
QueryResultsCache
candidate
- The candidatepublic void evict(Query query)
QueryResultsCache
query
- The query to evict (evicts all use of this query, with any params)public void evict(Query query, Map params)
QueryResultsCache
query
- The query to evictparams
- The parameterspublic void evictAll()
QueryResultsCache
public List<Object> get(String queryKey)
QueryResultsCache
queryKey
- The query keypublic List<Object> put(String queryKey, List<Object> results)
QueryResultsCache
queryKey
- The query keyresults
- The results for this queryCopyright © 2019. All rights reserved.