Package org.hibernate.cache.spi

Examples of org.hibernate.cache.spi.QueryCache


      final SessionImplementor session,
      final QueryParameters queryParameters,
      final Set<Serializable> querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
View Full Code Here


    public void evictQueryRegion(String regionName) {
            if (regionName == null) throw new NullPointerException(
                                                                   "Region-name cannot be null (use Cache#evictDefaultQueryRegion to evict the default query cache)");
            if (settings.isQueryCacheEnabled()) {
                QueryCache namedQueryCache = queryCaches.get(regionName);
                // TODO : cleanup entries in queryCaches + allCacheRegions ?
                if (namedQueryCache != null) namedQueryCache.clear();
      }
    }
View Full Code Here

    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

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

    QueryCache 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() );
    }

    return currentQueryCache;
  }
View Full Code Here

      final SessionImplementor session,
      final QueryParameters queryParameters,
      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
View Full Code Here

    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

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

    QueryCache 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() );
    }

    return currentQueryCache;
  }
View Full Code Here

    public void evictQueryRegion(String regionName) {
            if (regionName == null) throw new NullPointerException(
                                                                   "Region-name cannot be null (use Cache#evictDefaultQueryRegion to evict the default query cache)");
            if (settings.isQueryCacheEnabled()) {
                QueryCache namedQueryCache = queryCaches.get(regionName);
                // TODO : cleanup entries in queryCaches + allCacheRegions ?
                if (namedQueryCache != null) namedQueryCache.clear();
      }
    }
View Full Code Here

      final SessionImplementor session,
      final QueryParameters queryParameters,
      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

        if (querySpaces == null || querySpaces.size() == 0) LOG.trace("Unexpected querySpaces is "
                                                                      + (querySpaces == null ? querySpaces : "empty"));
View Full Code Here

      final SessionImplementor session,
      final QueryParameters queryParameters,
      final Set<Serializable> querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
View Full Code Here

TOP

Related Classes of org.hibernate.cache.spi.QueryCache

Copyright © 2018 www.massapicom. 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.