Package org.hibernate.query.spi
Interface QueryInterpretationCache
-
- All Known Implementing Classes:
QueryInterpretationCacheDisabledImpl
,QueryInterpretationCacheStandardImpl
@Incubating public interface QueryInterpretationCache
Cache for various parts of translating or interpreting queries.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
QueryInterpretationCache.Key
-
Method Summary
-
-
-
Method Detail
-
getNumberOfCachedHqlInterpretations
int getNumberOfCachedHqlInterpretations()
-
getNumberOfCachedQueryPlans
int getNumberOfCachedQueryPlans()
-
resolveHqlInterpretation
@Deprecated(forRemoval=true) HqlInterpretation resolveHqlInterpretation(String queryString, Class<?> expectedResultType, Function<String,SqmStatement<?>> creator)
Deprecated, for removal: This API element is subject to removal in a future version.
-
resolveHqlInterpretation
default HqlInterpretation resolveHqlInterpretation(String queryString, Class<?> expectedResultType, HqlTranslator translator)
-
resolveSelectQueryPlan
<R> SelectQueryPlan<R> resolveSelectQueryPlan(QueryInterpretationCache.Key key, Supplier<SelectQueryPlan<R>> creator)
-
getNonSelectQueryPlan
NonSelectQueryPlan getNonSelectQueryPlan(QueryInterpretationCache.Key key)
-
cacheNonSelectQueryPlan
void cacheNonSelectQueryPlan(QueryInterpretationCache.Key key, NonSelectQueryPlan plan)
-
resolveNativeQueryParameters
ParameterInterpretation resolveNativeQueryParameters(String queryString, Function<String,ParameterInterpretation> creator)
-
isEnabled
boolean isEnabled()
-
close
void close()
Close the cache when the SessionFactory is closed.Note that depending on the cache strategy implementation chosen, clearing the cache might not reclaim all the memory.
Typically, when using LIRS, clearing the cache only invalidates the entries but the outdated entries are kept in memory until they are replaced by others. It is not considered a memory leak as the cache is bounded.
-
-