|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.query.cache.AbstractQueryResultsCache
public class AbstractQueryResultsCache
Abstract representation of a query results cache for the query.
| Constructor Summary | |
|---|---|
AbstractQueryResultsCache(OMFContext omfCtx)
|
|
| Method Summary | |
|---|---|
void |
close()
Method to close the cache when no longer needed. |
boolean |
contains(java.lang.String queryKey)
Accessor for whether the specified query is in the cache |
void |
evict(Query query)
Evict the query from the results cache. |
void |
evict(Query query,
java.util.Map params)
Evict the query with the specified params from the results cache. |
void |
evictAll()
Method to clear the cache. |
java.util.List<java.lang.Object> |
get(java.lang.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,
java.util.Map params)
Method to pin the specified query in the cache, preventing garbage collection. |
java.util.List<java.lang.Object> |
put(java.lang.String queryKey,
java.util.List<java.lang.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,
java.util.Map params)
Method to unpin the specified query from the cache, allowing garbage collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractQueryResultsCache(OMFContext omfCtx)
| Method Detail |
|---|
public void close()
QueryResultsCache
close in interface QueryResultsCachepublic boolean contains(java.lang.String queryKey)
QueryResultsCache
contains in interface QueryResultsCachequeryKey - The query key
public void evictAll()
QueryResultsCache
evictAll in interface QueryResultsCachepublic void evict(Query query)
QueryResultsCache
evict in interface QueryResultsCachequery - The query to evict (evicts all use of this query, with any params)
public void evict(Query query,
java.util.Map params)
QueryResultsCache
evict in interface QueryResultsCachequery - The query to evictparams - The parameters
public void pin(Query query,
java.util.Map params)
QueryResultsCache
pin in interface QueryResultsCachequery - The queryparams - Its paramspublic void pin(Query query)
QueryResultsCache
pin in interface QueryResultsCachequery - The query
public void unpin(Query query,
java.util.Map params)
QueryResultsCache
unpin in interface QueryResultsCachequery - The queryparams - Its paramspublic void unpin(Query query)
QueryResultsCache
unpin in interface QueryResultsCachequery - The querypublic java.util.List<java.lang.Object> get(java.lang.String queryKey)
QueryResultsCache
get in interface QueryResultsCachequeryKey - The query key
public boolean isEmpty()
QueryResultsCache
isEmpty in interface QueryResultsCache
public java.util.List<java.lang.Object> put(java.lang.String queryKey,
java.util.List<java.lang.Object> results)
QueryResultsCache
put in interface QueryResultsCachequeryKey - The query keyresults - The results for this query
public int size()
QueryResultsCache
size in interface QueryResultsCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||