move DEFAULT_QUERY_PLAN_MAX_COUNT to QueryEngine
which helps clean up the Javadoc for AvailableSettings
This commit is contained in:
parent
1ce86ee7e7
commit
b3b8ef6073
|
@ -1257,21 +1257,23 @@ public interface AvailableSettings {
|
|||
|
||||
/**
|
||||
* The maximum number of entries in the
|
||||
* {@linkplain org.hibernate.query.spi.QueryPlanCache query plan cache}.
|
||||
* {@linkplain org.hibernate.query.spi.QueryPlanCache query plan cache} or
|
||||
* {@linkplain org.hibernate.query.spi.QueryInterpretationCache
|
||||
* query interpretation cache}.
|
||||
* <p>
|
||||
* The default maximum is
|
||||
* {@value org.hibernate.query.internal.QueryInterpretationCacheStandardImpl#DEFAULT_QUERY_PLAN_MAX_COUNT}.
|
||||
* {@value org.hibernate.query.spi.QueryEngine#DEFAULT_QUERY_PLAN_MAX_COUNT}.
|
||||
*
|
||||
* @see org.hibernate.query.spi.QueryPlanCache
|
||||
*/
|
||||
String QUERY_PLAN_CACHE_MAX_SIZE = "hibernate.query.plan_cache_max_size";
|
||||
|
||||
/**
|
||||
* The maximum number of {@link org.hibernate.query.internal.ParameterMetadataImpl}
|
||||
* The maximum number of {@link org.hibernate.query.ParameterMetadata} instances
|
||||
* maintained by the {@link org.hibernate.query.spi.QueryInterpretationCache}.
|
||||
* <p>
|
||||
* The default maximum is
|
||||
* {@value org.hibernate.query.internal.QueryInterpretationCacheStandardImpl#DEFAULT_PARAMETER_METADATA_MAX_COUNT}.
|
||||
* {@value org.hibernate.query.spi.QueryEngine#DEFAULT_PARAMETER_METADATA_MAX_COUNT}.
|
||||
*
|
||||
* @deprecated this setting is not currently used
|
||||
*/
|
||||
|
|
|
@ -34,19 +34,6 @@ import org.jboss.logging.Logger;
|
|||
public class QueryInterpretationCacheStandardImpl implements QueryInterpretationCache {
|
||||
private static final Logger log = QueryLogging.subLogger( "plan.cache" );
|
||||
|
||||
/**
|
||||
* The default strong reference count.
|
||||
*
|
||||
* @deprecated No longer used
|
||||
*/
|
||||
@Deprecated
|
||||
public static final int DEFAULT_PARAMETER_METADATA_MAX_COUNT = 128;
|
||||
|
||||
/**
|
||||
* The default soft reference count.
|
||||
*/
|
||||
public static final int DEFAULT_QUERY_PLAN_MAX_COUNT = 2048;
|
||||
|
||||
/**
|
||||
* the cache of the actual plans...
|
||||
*/
|
||||
|
|
|
@ -56,6 +56,20 @@ import org.jboss.logging.Logger;
|
|||
*/
|
||||
@Incubating
|
||||
public class QueryEngine {
|
||||
|
||||
/**
|
||||
* The default soft reference count.
|
||||
*/
|
||||
public static final int DEFAULT_QUERY_PLAN_MAX_COUNT = 2048;
|
||||
|
||||
/**
|
||||
* The default strong reference count.
|
||||
*
|
||||
* @deprecated No longer used
|
||||
*/
|
||||
@Deprecated
|
||||
public static final int DEFAULT_PARAMETER_METADATA_MAX_COUNT = 128;
|
||||
|
||||
private static final Logger LOG_HQL_FUNCTIONS = CoreLogging.logger( "org.hibernate.HQL_FUNCTIONS" );
|
||||
|
||||
public static QueryEngine from(SessionFactoryImplementor sessionFactory, MetadataImplementor metadata) {
|
||||
|
@ -356,7 +370,7 @@ public class QueryEngine {
|
|||
if ( explicitUseCache || ( explicitMaxPlanSize != null && explicitMaxPlanSize > 0 ) ) {
|
||||
final int size = explicitMaxPlanSize != null
|
||||
? explicitMaxPlanSize
|
||||
: QueryInterpretationCacheStandardImpl.DEFAULT_QUERY_PLAN_MAX_COUNT;
|
||||
: DEFAULT_QUERY_PLAN_MAX_COUNT;
|
||||
|
||||
return new QueryInterpretationCacheStandardImpl( size, statisticsSupplier );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue