public abstract class AbstractQueryDatastoreCompilationCache extends Object implements QueryDatastoreCompilationCache
Constructor and Description |
---|
AbstractQueryDatastoreCompilationCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Method to clear the cache.
|
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(String queryKey)
Evict the query from the compilation cache.
|
Object |
get(String queryKey)
Accessor for a (generic) compilation from the cache.
|
boolean |
isEmpty()
Accessor for whether the cache is empty.
|
Object |
put(String queryKey,
Object compilation)
Method to put an object in the cache.
|
int |
size()
Accessor for the total number of compilations in the query cache.
|
public AbstractQueryDatastoreCompilationCache()
public void clear()
QueryDatastoreCompilationCache
clear
in interface QueryDatastoreCompilationCache
public void close()
QueryDatastoreCompilationCache
close
in interface QueryDatastoreCompilationCache
public boolean contains(String queryKey)
QueryDatastoreCompilationCache
contains
in interface QueryDatastoreCompilationCache
queryKey
- The query keypublic void evict(String queryKey)
QueryDatastoreCompilationCache
evict
in interface QueryDatastoreCompilationCache
queryKey
- Key for the query to evict.public Object get(String queryKey)
QueryDatastoreCompilationCache
get
in interface QueryDatastoreCompilationCache
queryKey
- The query keypublic boolean isEmpty()
QueryDatastoreCompilationCache
isEmpty
in interface QueryDatastoreCompilationCache
public Object put(String queryKey, Object compilation)
QueryDatastoreCompilationCache
put
in interface QueryDatastoreCompilationCache
queryKey
- The query keycompilation
- The compilation for this datastorepublic int size()
QueryDatastoreCompilationCache
size
in interface QueryDatastoreCompilationCache
Copyright © 2018. All rights reserved.