Class QueryCache
- java.lang.Object
-
- org.infinispan.query.dsl.embedded.impl.QueryCache
-
@ThreadSafe public class QueryCache extends Object
A local cache for 'parsed' queries. Each cache manager has at most one QueryCache which is backed by a lazily created Cache.- Since:
- 7.0
- Author:
- anistor@redhat.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
QueryCache.QueryCreator<Q>
-
Field Summary
Fields Modifier and Type Field Description static String
QUERY_CACHE_NAME
Users can define a cache configuration with this name if they need to fine tune query caching.
-
Constructor Summary
Constructors Constructor Description QueryCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
<T> T
get(String queryString, List<org.infinispan.objectfilter.impl.aggregation.FieldAccumulator> accumulators, Object queryTypeDiscriminator, QueryCache.QueryCreator<T> queryCreator)
Gets the cached query object.
-
-
-
Field Detail
-
QUERY_CACHE_NAME
public static final String QUERY_CACHE_NAME
Users can define a cache configuration with this name if they need to fine tune query caching. If they do not do so a default config is used (seegetQueryCacheConfig()
).- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public <T> T get(String queryString, List<org.infinispan.objectfilter.impl.aggregation.FieldAccumulator> accumulators, Object queryTypeDiscriminator, QueryCache.QueryCreator<T> queryCreator)
Gets the cached query object. The key used for lookup is an object pair containing the query string and a discriminator value which is usually the Class of the cached query object and an optionalList
ofFieldAccumulator
s.
-
clear
public void clear()
-
-