Package org.hibernate.cache

Examples of org.hibernate.cache.CacheException


     * {@link NonLockingDataVersion} to the invocation.
     */
    @Override
    public void evict(Object key) throws CacheException {
      if (!putValidator.invalidateKey(key)) {
        throw new CacheException("Failed to invalidate pending putFromLoad calls for key " + key + " from region " + region.getName());
      }
        region.ensureRegionRootExists();

        Option opt = NonLockingDataVersion.getInvocationOption();
        CacheHelper.remove(cache, regionFqn, key, opt);
View Full Code Here


    @Override
    public void evictAll() throws CacheException
    {
      if (!putValidator.invalidateRegion()) {
          throw new CacheException("Failed to invalidate pending putFromLoad calls for region " + region.getName());
        }       
      
       Transaction tx = region.suspend();
       try {       
          region.ensureRegionRootExists();
View Full Code Here

    @Override
    public void remove(Object key) throws CacheException {
      
      if (!putValidator.invalidateKey(key)) {
        throw new CacheException("Failed to invalidate pending putFromLoad calls for key " + key + " from region " + region.getName());
      }
       
        // We remove whether or not the region is valid. Other nodes
        // may have already restored the region so they need to
        // be informed of the change.
View Full Code Here

    }

    @Override
    public void removeAll() throws CacheException {
       if (!putValidator.invalidateRegion()) {
         throw new CacheException("Failed to invalidate pending putFromLoad calls for region " + region.getName());
       }
       Option opt = NonLockingDataVersion.getInvocationOption();
       CacheHelper.removeAll(cache, regionFqn, opt);
    }
View Full Code Here

            Option opt = getNonLockingDataVersionOption(false);
            // We ensure ASYNC semantics (JBCACHE-1175)
            opt.setForceAsynchronous(true);
            CacheHelper.put(getCacheInstance(), getRegionFqn(), key, value, opt);
        } catch (Exception e) {
            throw new CacheException(e);
        } finally {
            resume(tx);
        }
    }
View Full Code Here

               regionRoot.setResident(true);
            }
            establishInternalNodes();
        }
        catch (Exception e) {
            throw new CacheException(e.getMessage(), e);
        }
        finally {
            resume(tx);
        }
       
View Full Code Here

            }
            jbcCache.getInvocationContext().setOptionOverrides(option);
            jbcCache.removeNode(regionFqn);
            deactivateLocalNode();           
        } catch (Exception e) {
            throw new CacheException(e);
        }
        finally {
            jbcCache.removeCacheListener(this);
        }
    }
View Full Code Here

    }
    catch ( CacheException ce ) {
      throw ce;
    }
    catch ( Throwable t ) {
      throw new CacheException( t );
    }
  }
View Full Code Here

           }
       catch ( CacheException ce ) {
         throw ce;
       }
       catch (Exception e) {
               throw new CacheException(e);
           }
        }
        else {
           return 0;
        }          
View Full Code Here

               }
               return result;
           } catch (CacheException e) {
               throw e;
           } catch (Exception e) {
               throw new CacheException(e);
           }
        }
        else {
           return Collections.emptyMap();
        }
View Full Code Here

TOP

Related Classes of org.hibernate.cache.CacheException

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.