Package org.hibernate.cache

Examples of org.hibernate.cache.Cache.clear()


  public void clearRegionCache( String region ) {
    if ( cacheEnabled ) {
      Cache cache = regionCache.get( region );
      if ( cache != null ) {
        try {
          cache.clear();
        } catch ( CacheException e ) {
          CacheManager.logger.error( Messages.getInstance().getString(
            "CacheManager.ERROR_0006_CACHE_EXCEPTION", e.getLocalizedMessage() ) ); //$NON-NLS-1$
        }
      } else {
View Full Code Here


      while ( it.hasNext() ) {
        Map.Entry entry = (Map.Entry) it.next();
        String key = ( entry.getKey() != null ) ? entry.getKey().toString() : ""; //$NON-NLS-1$
        if ( key != null ) {
          Cache cache = regionCache.get( key );
          cache.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.