Top Fields Constructors Methods
org.hibernate.query.internal

public Class QueryInterpretationCacheDisabledImpl

extends Object
implements QueryInterpretationCache
Class Inheritance
All Implemented Interfaces
org.hibernate.query.spi.QueryInterpretationCache
Imports
java.util.concurrent.TimeUnit, java.util.function.Function, .Supplier, org.hibernate.query.spi.HqlInterpretation, .NonSelectQueryPlan, .ParameterMetadataImplementor, .QueryInterpretationCache, .SelectQueryPlan, org.hibernate.query.sql.spi.ParameterInterpretation, org.hibernate.query.sqm.internal.DomainParameterXref, org.hibernate.query.sqm.tree.SqmStatement, org.hibernate.stat.spi.StatisticsImplementor

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Supplier<StatisticsImplementor>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
close()

Implements org.hibernate.query.spi.QueryInterpretationCache.close.

Close the cache when the SessionFactory is closed.
public NonSelectQueryPlan
public int
public int
public boolean
public HqlInterpretation
public ParameterInterpretation
public <R> SelectQueryPlan<R>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

statisticsSupplierback to summary
private final Supplier<StatisticsImplementor> statisticsSupplier

Constructor Detail

QueryInterpretationCacheDisabledImplback to summary
public QueryInterpretationCacheDisabledImpl(Supplier<StatisticsImplementor> statisticsSupplier)

Method Detail

cacheNonSelectQueryPlanback to summary
public void cacheNonSelectQueryPlan(QueryInterpretationCache.Key key, NonSelectQueryPlan plan)

Implements org.hibernate.query.spi.QueryInterpretationCache.cacheNonSelectQueryPlan.

Annotations
@Override
closeback to summary
public void close()

Implements org.hibernate.query.spi.QueryInterpretationCache.close.

Doc from org.hibernate.query.spi.QueryInterpretationCache.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.

Annotations
@Override
getNonSelectQueryPlanback to summary
public NonSelectQueryPlan getNonSelectQueryPlan(QueryInterpretationCache.Key key)

Implements org.hibernate.query.spi.QueryInterpretationCache.getNonSelectQueryPlan.

Annotations
@Override
getNumberOfCachedHqlInterpretationsback to summary
public int getNumberOfCachedHqlInterpretations()

Implements org.hibernate.query.spi.QueryInterpretationCache.getNumberOfCachedHqlInterpretations.

Annotations
@Override
getNumberOfCachedQueryPlansback to summary
public int getNumberOfCachedQueryPlans()

Implements org.hibernate.query.spi.QueryInterpretationCache.getNumberOfCachedQueryPlans.

Annotations
@Override
isEnabledback to summary
public boolean isEnabled()

Implements org.hibernate.query.spi.QueryInterpretationCache.isEnabled.

Annotations
@Override
resolveHqlInterpretationback to summary
public HqlInterpretation resolveHqlInterpretation(String queryString, Class<?> expectedResultType, Function<String, SqmStatement<?>> creator)

Implements org.hibernate.query.spi.QueryInterpretationCache.resolveHqlInterpretation.

Annotations
@Override
resolveNativeQueryParametersback to summary
public ParameterInterpretation resolveNativeQueryParameters(String queryString, Function<String, ParameterInterpretation> creator)

Implements org.hibernate.query.spi.QueryInterpretationCache.resolveNativeQueryParameters.

Annotations
@Override
resolveSelectQueryPlanback to summary
public <R> SelectQueryPlan<R> resolveSelectQueryPlan(QueryInterpretationCache.Key key, Supplier<SelectQueryPlan<R>> creator)

Implements org.hibernate.query.spi.QueryInterpretationCache.resolveSelectQueryPlan.

Annotations
@Override