Code example for CacheException

Methods: getLocalizedMessage

0
      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 { 
        CacheManager.logger.info( Messages.getInstance().getString(
            "CacheManager.INFO_0001_CACHE_DOES_NOT_EXIST", region ) ); //$NON-NLS-1$
      } 
    } else { 
      CacheManager.logger.warn( Messages.getInstance().getString( "CacheManager.WARN_0001_CACHE_NOT_ENABLED" ) ); //$NON-NLS-1$
    } 
  } 
 
  public void removeRegionCache( String region ) {
    if ( cacheEnabled ) {
      if ( cacheEnabled( region ) ) {
        clearRegionCache( region );