Examples of QueryCache


Examples of org.hibernate.cache.spi.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.spi.QueryCache

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

    QueryCache currentQueryCache = queryCaches.get( regionName );
    if ( currentQueryCache == null ) {
      synchronized ( allCacheRegions ) {
        currentQueryCache = 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() );
        } else {
          return currentQueryCache;
        }
      }
    }
View Full Code Here

Examples of org.infinispan.query.dsl.embedded.impl.QueryCache

      user.setId(1);
      user.setName("John");
      cache.put("user_" + user.getId(), user);

      // spy on the query cache
      QueryCache queryCache = TestingUtil.extractGlobalComponent(cacheManager, QueryCache.class);
      QueryCache queryCacheSpy = spy(queryCache);
      TestingUtil.replaceComponent(cacheManager, QueryCache.class, queryCacheSpy, true);

      // obtain the query factory and create a query builder
      QueryFactory qf = Search.getQueryFactory(cache);
      QueryBuilder<Query> queryQueryBuilder = qf.from(UserHS.class)
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.