Examples of CacheException


Examples of org.shiftone.cache.CacheException

        {
            missHandler = (MissHandler) klass.newInstance();
        }
        catch (Exception e)
        {
            throw new CacheException("unable to create new MissHandler instance", e);
        }

        return missHandler;
    }
View Full Code Here

Examples of org.springmodules.cache.CacheException

  protected void onFlushCache(FlushingModel model) throws CacheException {
    GigaSpacesFlushingModel flushingModel = (GigaSpacesFlushingModel) model;
    String[] cacheNames = flushingModel.getCacheNames();

    if (!ObjectUtils.isEmpty(cacheNames)) {
      CacheException cacheException = null;
      int nameCount = cacheNames.length;

      try {
        for (int i = 0; i < nameCount; i++) {
          IMap cache = getCache(cacheNames[i]);
View Full Code Here

Examples of org.springmodules.cache.CacheException

  public void testCancelCacheUpdateWhenCacheAccessThrowsExceptionAndFailQuietlyIsFalse()
      throws Exception {
    cacheProviderFacade.setFailQuietlyEnabled(false);

    CacheException expected = expectOnCancelCacheUpdateToThrowException();

    cacheProviderFacadeControl.replay();

    try {
      cacheProviderFacade.cancelCacheUpdate(key);
View Full Code Here

Examples of org.springmodules.cache.CacheException

  }

  public void testFlushCacheWhenAccessToCacheThrowsExceptionAndFailQuietlyIsFalse()
      throws Exception {
    cacheProviderFacade.setFailQuietlyEnabled(false);
    CacheException expected = expectOnFlushCacheToThrowException();
    cacheProviderFacadeControl.replay();

    try {
      cacheProviderFacade.flushCache(flushingModel);
      fail();
View Full Code Here

Examples of org.springmodules.cache.CacheException

  }

  public void testGetFromCacheWhenAccessToCacheThrowsExceptionAndFailQuietlyIsFalse()
      throws Exception {
    cacheProviderFacade.setFailQuietlyEnabled(false);
    CacheException expectedException = expectOnGetFromCacheToThrowException();
    cacheProviderFacadeControl.replay();

    try {
      cacheProviderFacade.getFromCache(key, cachingModel);
      fail();
View Full Code Here

Examples of org.springmodules.cache.CacheException

    cacheProviderFacadeControl.verify();
  }

  public void testHandleCacheAccessExceptionWhenFailedQuietlyIsFalse() {
    cacheProviderFacade.setFailQuietlyEnabled(false);
    CacheException expectedException = createCacheException();

    try {
      cacheProviderFacade.handleCatchedException(expectedException);
      fail();
View Full Code Here

Examples of play.exceptions.CacheException

            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(bytes);
            oos.writeObject(o);
            return bytes.toByteArray();
        } catch (Exception e) {
            throw new CacheException("Cannot cache a non-serializable value of type " + o.getClass().getName(), e);
        }
    }
View Full Code Here

Examples of railo.commons.io.cache.exp.CacheException

        list.add(config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_TEMPLATE));
      else if(name.equalsIgnoreCase("object"))
        list.add(config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_OBJECT));
      else{
        CacheConnection cc= config.getCacheConnections().get(name);
        if(cc==null) throw new CacheException("there is no cache defined with name ["+name+"]");
        list.add(cc);
      }
    }
    return list.toArray(new CacheConnection[list.size()]);
  }
View Full Code Here

Examples of yalp.exceptions.CacheException

    /**
     * Utility that check that an object is serializable.
     */
    static void checkSerializable(Object value) {
        if (value != null && !(value instanceof Serializable)) {
            throw new CacheException("Cannot cache a non-serializable value of type " + value.getClass().getName(), new NotSerializableException(value.getClass().getName()));
        }
    }
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.