Examples of QueryCache


Examples of org.hibernate.cache.QueryCache

      throw new NullPointerException("use the zero-argument form to evict the default query cache");
    }
    else {
      synchronized (allCacheRegions) {
        if ( settings.isQueryCacheEnabled() ) {
          QueryCache currentQueryCache = (QueryCache) queryCaches.get(cacheRegion);
          if ( currentQueryCache != null ) {
            currentQueryCache.clear();
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.hibernate.cache.QueryCache

    if ( settings.isQueryCacheEnabled() )  {
      queryCache.destroy();

      iter = queryCaches.values().iterator();
      while ( iter.hasNext() ) {
        QueryCache cache = (QueryCache) iter.next();
        cache.destroy();
      }
      updateTimestampsCache.destroy();
    }

    settings.getRegionFactory().stop();
View Full Code Here

Examples of org.hibernate.cache.QueryCache

    if ( !settings.isQueryCacheEnabled() ) {
      return null;
    }

    synchronized ( allCacheRegions ) {
      QueryCache currentQueryCache = ( QueryCache ) queryCaches.get( regionName );
      if ( currentQueryCache == null ) {
        currentQueryCache = settings.getQueryCacheFactory().getQueryCache( regionName, updateTimestampsCache, settings, properties );
        queryCaches.put( regionName, currentQueryCache );
        allCacheRegions.put( currentQueryCache.getRegion().getName(), currentQueryCache.getRegion() );
      }
      return currentQueryCache;
    }
  }
View Full Code Here

Examples of org.hibernate.cache.QueryCache

      final SessionImplementor session,
      final QueryParameters queryParameters,
      final Set querySpaces,
      final Type[] resultTypes) {
 
    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );
   
    Set filterKeys = FilterKey.createFilterKeys(
        session.getEnabledFilters(),
        session.getEntityMode()
      );
View Full Code Here

Examples of org.hibernate.cache.QueryCache

    if ( settings.isQueryCacheEnabled() )  {
      queryCache.destroy();

      iter = queryCaches.values().iterator();
      while ( iter.hasNext() ) {
        QueryCache cache = (QueryCache) iter.next();
        cache.destroy();
      }
      updateTimestampsCache.destroy();
    }

    settings.getCacheProvider().stop();
View Full Code Here

Examples of org.hibernate.cache.QueryCache

    if ( !settings.isQueryCacheEnabled() ) {
      return null;
    }

    synchronized (allCacheRegions) {
      QueryCache currentQueryCache = (QueryCache) queryCaches.get(cacheRegion);
      if (currentQueryCache==null) {
        currentQueryCache = settings.getQueryCacheFactory()
          .getQueryCache(cacheRegion, updateTimestampsCache, settings, properties);
        queryCaches.put(cacheRegion, currentQueryCache);
        allCacheRegions.put( currentQueryCache.getRegionName(), currentQueryCache.getCache() );
      }
      return currentQueryCache;
    }
  }
View Full Code Here

Examples of org.hibernate.cache.QueryCache

      throw new NullPointerException("use the zero-argument form to evict the default query cache");
    }
    else {
      synchronized (allCacheRegions) {
        if ( settings.isQueryCacheEnabled() ) {
          QueryCache currentQueryCache = (QueryCache) queryCaches.get(cacheRegion);
          if ( currentQueryCache != null ) {
            currentQueryCache.clear();
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.hibernate.cache.QueryCache

    if ( settings.isQueryCacheEnabled() )  {
      queryCache.destroy();

      iter = queryCaches.values().iterator();
      while ( iter.hasNext() ) {
        QueryCache cache = (QueryCache) iter.next();
        cache.destroy();
      }
      updateTimestampsCache.destroy();
    }

    settings.getRegionFactory().stop();
View Full Code Here

Examples of org.hibernate.cache.QueryCache

    if ( !settings.isQueryCacheEnabled() ) {
      return null;
    }

    synchronized ( allCacheRegions ) {
      QueryCache currentQueryCache = ( QueryCache ) queryCaches.get( regionName );
      if ( currentQueryCache == null ) {
        currentQueryCache = settings.getQueryCacheFactory().getQueryCache( regionName, updateTimestampsCache, settings, properties );
        queryCaches.put( regionName, currentQueryCache );
        allCacheRegions.put( currentQueryCache.getRegion().getName(), currentQueryCache.getRegion() );
      }
      return currentQueryCache;
    }
  }
View Full Code Here

Examples of org.hibernate.cache.QueryCache

      throw new NullPointerException("use the zero-argument form to evict the default query cache");
    }
    else {
      synchronized (allCacheRegions) {
        if ( settings.isQueryCacheEnabled() ) {
          QueryCache currentQueryCache = (QueryCache) queryCaches.get(cacheRegion);
          if ( currentQueryCache != null ) {
            currentQueryCache.clear();
          }
        }
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.