Package org.springmodules.cache.integration.KeyAndModelListCachingListener

Examples of org.springmodules.cache.integration.KeyAndModelListCachingListener.KeyAndModel


    Object actual = getCachedObject(keyAndModelIndex);
    assertEquals(expectedCachedObject, actual);
  }

  private Object getCachedObject(int keyAndModelIndex) throws Exception {
    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    JbossCacheCachingModel model = (JbossCacheCachingModel) keyAndModel.model;
    return cacheManager.get(model.getNode(), keyAndModel.key);
  }
View Full Code Here


    ICacheElement cacheElement = getCacheElement(keyAndModelIndex);
    assertEquals(expectedCachedObject, cacheElement.getVal());
  }

  private ICacheElement getCacheElement(int keyAndModelIndex) {
    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    JcsCachingModel model = (JcsCachingModel) keyAndModel.model;

    String cacheName = model.getCacheName();
    CompositeCache cache = cacheManager.getCache(cacheName);
    GroupId groupId = new GroupId(cacheName, model.getGroup());
View Full Code Here

    return cachingListener;
  }

  protected final KeyAndModel getKeyAndModel(int index) {
    List keyAndModelPairs = cachingListener.getKeyAndModelPairs();
    KeyAndModel keyModel = (KeyAndModel)keyAndModelPairs.get(index);
    return keyModel;
  }
View Full Code Here

    return configLocations;
  }

  protected final KeyAndModel getKeyAndModel(int index) {
    List keyAndModelPairs = cachingListener.getKeyAndModelPairs();
    KeyAndModel keyModel = (KeyAndModel) keyAndModelPairs.get(index);
    return keyModel;
  }
View Full Code Here

   * @see AbstractIntegrationTests#assertCacheWasFlushed()
   */
  protected void assertCacheWasFlushed() {
    setUpCacheManager();

    KeyAndModel keyAndModel = getKeyAndModel(0);
    Serializable key = keyAndModel.key;

    try {
      cacheAdministrator.getFromCache(key.toString());
      fail("There should not be any object cached under the key <"
View Full Code Here

   */
  protected void assertObjectWasCached(Object expectedCachedObject,
      int keyAndModelIndex) throws Exception {
    setUpCacheManager();

    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    Object actual = cacheAdministrator.getFromCache(keyAndModel.key.toString());
    assertEquals(expectedCachedObject, actual);
  }
View Full Code Here

    Object entry = getCacheElement(keyAndModelIndex);
    assertEquals(expectedCachedObject, entry);
  }

  private Object getCacheElement(int keyAndModelIndex) throws Exception {
    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    GigaSpacesCachingModel model = (GigaSpacesCachingModel) keyAndModel.model;
    IMap cache = (IMap) CacheFinder.find(model.getCacheName());
    return cache.get(keyAndModel.key);
  }
View Full Code Here

    //if (cacheManager == null) setUpCacheManager();
    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

    Object entry = getCacheElement(keyAndModelIndex);
    assertEquals(expectedCachedObject, entry);
  }

  private Object getCacheElement(int keyAndModelIndex) throws Exception {
    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    CoherenceCachingModel model = (CoherenceCachingModel) keyAndModel.model;
    NamedCache cache = TangosolUtils.getNamedCache(model.getCacheName());
    return cache.get(keyAndModel.key);
  }
View Full Code Here

TOP

Related Classes of org.springmodules.cache.integration.KeyAndModelListCachingListener.KeyAndModel

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.