Examples of CacheException


Examples of br.com.caelum.vraptor.cache.CacheException

    try {
      ActionCacheEntry entry = valueProvider.call();
      return write(key, entry);
    } catch (Exception e) {
      Throwables.propagateIfPossible(e);
      throw new CacheException("Error computing the value", e);
    }
  }
View Full Code Here

Examples of com.eatle.exception.CacheException

                         ehcache = new EhCache(cache);
                         _CacheManager.put(name, ehcache);
                         return ehcache;
                    }
               } catch (net.sf.ehcache.CacheException e) {
                    throw new CacheException(e);
               }
          }
          return ehcache;
     }
View Full Code Here

Examples of com.impetus.kundera.cache.CacheException

    }
   
    @Test
    public void testCacheException()
    {
        CacheException exception = new CacheException("Error with string");
        Assert.assertNotNull(exception);
       
        exception = new CacheException("Error with string", new RuntimeException());
        Assert.assertNotNull(exception);
       
        exception = new CacheException(new RuntimeException());
        Assert.assertNotNull(exception);
       
      
    }
View Full Code Here

Examples of com.rackspacecloud.blueflood.exceptions.CacheException

                return null;
            } else {
                return result;
            }
        } catch (ExecutionException ex) {
            throw new CacheException(ex);
        } finally {
            cacheGetTimerContext.stop();
        }
    }
View Full Code Here

Examples of javax.cache.CacheException

   static RuntimeException launderCacheWriterException(Exception e) {
      if (!(e instanceof CacheWriterException)) {
         return new CacheWriterException("Exception in CacheWriter", e);
      } else {
         return new CacheException("Error in CacheWriter", e);
      }
   }
View Full Code Here

Examples of javax.util.jcache.CacheException

      if(acc.isPresent(key)) {
      prev = acc.get(key);
      }
      boolean success = acc.put(key, value);
      if(!success) {
          CacheException ex = acc.getException(true);
          if(ex instanceof CacheFullException) {
              throw new IllegalArgumentException(ex.getMessage());
          }
          if(ex!=null) {
              throw new IllegalStateException(ex.getMessage());
          }
          throw new IllegalStateException("Unknown error.");
      }
        return prev;
    }
View Full Code Here

Examples of javax.util.jcache.CacheException

    public CacheException getException(boolean cached) {
        if (lastException == null) {
            return null;
        }
        try {
            CacheException ex = (CacheException) lastException.newInstance();
            ex.setMessage(lastMessage);
            this.lastException = null;
            this.lastMessage = null;
            return ex;
        } catch (InstantiationException e) {
            throw new IllegalStateException(e.getMessage() + ":" + lastMessage);
View Full Code Here

Examples of javax.util.jcache.CacheException

     */
    private CacheLogger parseLogger(final String logger) throws CacheException {
        try {
            return (CacheLogger) Class.forName(logger).newInstance();
        } catch (ClassNotFoundException e) {
            throw new CacheException("The CacheLogger " + logger + " could not be found.");
        } catch (InstantiationException e) {
            throw new CacheException("The CacheLogger " + logger + " could not be loaded.");
        } catch (IllegalAccessException e) {
            throw new CacheException("The CacheLogger " + logger + " is appearently not a CacheLogger.");
        }
    }
View Full Code Here

Examples of net.sf.cache4j.CacheException

        }
        if(cacheConfig.getCacheId()==null) {
            throw new NullPointerException("config.getCacheId() is null");
        }
        if(!(cache instanceof Cache)) {
            throw new CacheException("cache not instance of "+ManagedCache.class.getName());
        }

        synchronized(_cacheMap){
            if(_cacheMap.containsKey(cacheConfig.getCacheId())) {
                throw new CacheException("Cache id:"+cacheConfig.getCacheId()+" exists");
            }

            _cacheMap.put(cacheConfig.getCacheId(), cache);
        }
    }
View Full Code Here

Examples of net.sf.ehcache.CacheException

   
    static CacheManager createCacheManager() throws CacheException {
        try {
            return (CacheManager)cacheManagerCreateMethodNoArg.invoke(null, (Object[])null);
        } catch (Exception e) {
            throw new CacheException(e);
        }
    }
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.