List of usage examples for org.hibernate.engine.query.spi QueryPlanCache DEFAULT_QUERY_PLAN_MAX_COUNT
int DEFAULT_QUERY_PLAN_MAX_COUNT
To view the source code for org.hibernate.engine.query.spi QueryPlanCache DEFAULT_QUERY_PLAN_MAX_COUNT.
Click Source Link
From source file:com.blazebit.persistence.integration.hibernate.base.HibernateExtendedQuerySupport.java
License:Apache License
private BoundedConcurrentHashMap<QueryPlanCacheKey, HQLQueryPlan> getQueryPlanCache( SessionFactoryImplementor sfi) { BoundedConcurrentHashMap<QueryPlanCacheKey, HQLQueryPlan> queryPlanCache = queryPlanCachesCache.get(sfi); if (queryPlanCache == null) { queryPlanCache = new BoundedConcurrentHashMap<QueryPlanCacheKey, HQLQueryPlan>( QueryPlanCache.DEFAULT_QUERY_PLAN_MAX_COUNT, 20, BoundedConcurrentHashMap.Eviction.LIRS); BoundedConcurrentHashMap<QueryPlanCacheKey, HQLQueryPlan> oldQueryPlanCache = queryPlanCachesCache .putIfAbsent(sfi, queryPlanCache); if (oldQueryPlanCache != null) { queryPlanCache = oldQueryPlanCache; }//w w w . j a va 2 s .c o m } return queryPlanCache; }