Package org.springmodules.cache.provider.ehcache

Examples of org.springmodules.cache.provider.ehcache.EhCacheCachingModel


    Element element = new DomElementStub("caching");
    element.setAttribute("cacheName", cacheName);

    CachingModel actual = parser.parseCachingModel(element);
    CachingModel expected = new EhCacheCachingModel(cacheName);

    assertEquals(expected, actual);
  }
View Full Code Here


    if (cacheManager != null) cacheManager.shutdown();
  }

  private Element getCacheElement(int keyAndModelIndex) throws Exception {
    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    EhCacheCachingModel model = (EhCacheCachingModel)keyAndModel.model;
    Cache cache = cacheManager.getCache(model.getCacheName());
    return cache.get(keyAndModel.key);
  }
View Full Code Here

   *
   * @see CacheModelParser#parseCachingModel(Element)
   */
  public CachingModel parseCachingModel(Element element) {
    String cacheName = element.getAttribute("cacheName");
    EhCacheCachingModel model = new EhCacheCachingModel(cacheName);
    return model;
  }
View Full Code Here

    /* (non-Javadoc)
     * @see org.jasig.portal.utils.cache.ICacheModelFactory#getCachingModel(java.lang.String)
     */
    public CachingModel getCachingModel(String cacheName) {
        return new EhCacheCachingModel(cacheName);
    }
View Full Code Here

     *           if the cache does not exist
     * @throws CacheAccessException
     *           wrapping any unexpected exception thrown by the cache
     */
    protected Cache getCache(CachingModel model) throws CacheNotFoundException, CacheAccessException {
        final EhCacheCachingModel ehCacheCachingModel = (EhCacheCachingModel) model;
        final String cacheName = ehCacheCachingModel.getCacheName();
        return this.getCache(cacheName);
    }
View Full Code Here

TOP

Related Classes of org.springmodules.cache.provider.ehcache.EhCacheCachingModel

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.