Examples of EhCacheCachingModel


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

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

    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

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

   *
   * @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

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

    /* (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

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

     *           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
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.