public class AbstractQueryResultsCache extends Object implements QueryResultsCache
| Constructor and Description |
|---|
AbstractQueryResultsCache(NucleusContext nucleusCtx) |
| 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.
|
boolean |
isEmpty()
Accessor for whether the cache is empty.
|
void |
pin(Query query)
Method to pin the specified query in the cache, preventing garbage collection.
|
void |
pin(Query query,
Map params)
Method to pin the specified query in the cache, preventing garbage collection.
|
List<Object> |
put(String queryKey,
List<Object> results)
Method to put an object in the cache.
|
int |
size()
Accessor for the total number of results in the query cache.
|
void |
unpin(Query query)
Method to unpin the specified query from the cache, allowing garbage collection.
|
void |
unpin(Query query,
Map params)
Method to unpin the specified query from the cache, allowing garbage collection.
|
public AbstractQueryResultsCache(NucleusContext nucleusCtx)
public void close()
QueryResultsCacheclose in interface QueryResultsCachepublic boolean contains(String queryKey)
QueryResultsCachecontains in interface QueryResultsCachequeryKey - The query keypublic void evict(Class candidate)
QueryResultsCacheevict in interface QueryResultsCachecandidate - The candidatepublic void evictAll()
QueryResultsCacheevictAll in interface QueryResultsCachepublic void evict(Query query)
QueryResultsCacheevict in interface QueryResultsCachequery - The query to evict (evicts all use of this query, with any params)public void evict(Query query, Map params)
QueryResultsCacheevict in interface QueryResultsCachequery - The query to evictparams - The parameterspublic void pin(Query query, Map params)
QueryResultsCachepin in interface QueryResultsCachequery - The queryparams - Its paramspublic void pin(Query query)
QueryResultsCachepin in interface QueryResultsCachequery - The querypublic void unpin(Query query, Map params)
QueryResultsCacheunpin in interface QueryResultsCachequery - The queryparams - Its paramspublic void unpin(Query query)
QueryResultsCacheunpin in interface QueryResultsCachequery - The querypublic List<Object> get(String queryKey)
QueryResultsCacheget in interface QueryResultsCachequeryKey - The query keypublic boolean isEmpty()
QueryResultsCacheisEmpty in interface QueryResultsCachepublic List<Object> put(String queryKey, List<Object> results)
QueryResultsCacheput in interface QueryResultsCachequeryKey - The query keyresults - The results for this querypublic int size()
QueryResultsCachesize in interface QueryResultsCacheCopyright © 2017. All rights reserved.