Package org.g4studio.core.resource

Examples of org.g4studio.core.resource.CacheException


        manager.addCache(G4_RESOURCE_GROUP);
        ehcache = manager.getCache(G4_RESOURCE_GROUP);
        logger.debug("started EHCache region: " + G4_RESOURCE_GROUP);
      }
    } catch (net.sf.ehcache.CacheException e) {
      throw new CacheException(e);
    }

  }
View Full Code Here


  public void put(Object key, Object pValue) throws CacheException {
    try {
      Element element = new Element((Serializable) key, (Serializable) pValue);
      ehcache.put(element);
    } catch (IllegalArgumentException e) {
      throw new CacheException(e);
    } catch (IllegalStateException e) {
      throw new CacheException(e);
    }
  }
View Full Code Here

        } else {
          return element.getValue();
        }
      }
    } catch (net.sf.ehcache.CacheException e) {
      throw new CacheException(e);
    }
  }
View Full Code Here

  public void remove(Object key) throws CacheException {
    try {
      ehcache.remove((Serializable) key);
    } catch (ClassCastException e) {
      throw new CacheException(e);
    } catch (IllegalStateException e) {
      throw new CacheException(e);
    }
  }
View Full Code Here

  public void clear() throws CacheException {
    try {
      ehcache.removeAll();
    } catch (IllegalStateException e) {
      throw new CacheException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.g4studio.core.resource.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.