Package org.hibernate.query.internal
Class QueryInterpretationCacheDisabledImpl
java.lang.Object
org.hibernate.query.internal.QueryInterpretationCacheDisabledImpl
- All Implemented Interfaces:
QueryInterpretationCache
public class QueryInterpretationCacheDisabledImpl
extends Object
implements QueryInterpretationCache
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.query.spi.QueryInterpretationCache
QueryInterpretationCache.Key -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> voidcacheHqlInterpretation(Object cacheKey, HqlInterpretation<R> hqlInterpretation) voidvoidclose()Close the cache when the SessionFactory is closed.intintboolean<R> HqlInterpretation<R> resolveHqlInterpretation(String queryString, Class<R> expectedResultType, HqlTranslator translator) resolveNativeQueryParameters(String queryString, Function<String, ParameterInterpretation> creator) <K extends QueryInterpretationCache.Key,R>
SelectQueryPlan<R> resolveSelectQueryPlan(K key, Function<K, SelectQueryPlan<R>> creator) <R> SelectQueryPlan<R> resolveSelectQueryPlan(QueryInterpretationCache.Key key, Supplier<SelectQueryPlan<R>> creator)
-
Constructor Details
-
QueryInterpretationCacheDisabledImpl
-
-
Method Details
-
getNumberOfCachedHqlInterpretations
public int getNumberOfCachedHqlInterpretations()- Specified by:
getNumberOfCachedHqlInterpretationsin interfaceQueryInterpretationCache
-
getNumberOfCachedQueryPlans
public int getNumberOfCachedQueryPlans()- Specified by:
getNumberOfCachedQueryPlansin interfaceQueryInterpretationCache
-
resolveSelectQueryPlan
public <R> SelectQueryPlan<R> resolveSelectQueryPlan(QueryInterpretationCache.Key key, Supplier<SelectQueryPlan<R>> creator) - Specified by:
resolveSelectQueryPlanin interfaceQueryInterpretationCache
-
resolveSelectQueryPlan
public <K extends QueryInterpretationCache.Key,R> SelectQueryPlan<R> resolveSelectQueryPlan(K key, Function<K, SelectQueryPlan<R>> creator) - Specified by:
resolveSelectQueryPlanin interfaceQueryInterpretationCache
-
getNonSelectQueryPlan
- Specified by:
getNonSelectQueryPlanin interfaceQueryInterpretationCache
-
cacheNonSelectQueryPlan
- Specified by:
cacheNonSelectQueryPlanin interfaceQueryInterpretationCache
-
resolveHqlInterpretation
public <R> HqlInterpretation<R> resolveHqlInterpretation(String queryString, Class<R> expectedResultType, HqlTranslator translator) - Specified by:
resolveHqlInterpretationin interfaceQueryInterpretationCache
-
cacheHqlInterpretation
- Specified by:
cacheHqlInterpretationin interfaceQueryInterpretationCache
-
resolveNativeQueryParameters
public ParameterInterpretation resolveNativeQueryParameters(String queryString, Function<String, ParameterInterpretation> creator) - Specified by:
resolveNativeQueryParametersin interfaceQueryInterpretationCache
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceQueryInterpretationCache
-
close
public void close()Description copied from interface:QueryInterpretationCacheClose 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.
- Specified by:
closein interfaceQueryInterpretationCache
-