Package org.springmodules.cache.provider.oscache

Examples of org.springmodules.cache.provider.oscache.OsCacheCachingModel


   */
  public CachingModel parseCachingModel(Element element) {
    String cronExpression = element.getAttribute("cronExpression");
    String groups = element.getAttribute("groups");

    OsCacheCachingModel model = new OsCacheCachingModel(groups, cronExpression);

    String refreshPeriodAttr = element.getAttribute("refreshPeriod");
    if (StringUtils.hasText(refreshPeriodAttr)) {
      try {
        int refreshPeriod = Integer.parseInt(refreshPeriodAttr);
        model.setRefreshPeriod(refreshPeriod);

      } catch (NumberFormatException exception) {
        // ignore exception;
      }
    }
View Full Code Here


    element.setAttribute("cronExpression", cronExpression);
    element.setAttribute("groups", groups);
    element.setAttribute("refreshPeriod", refreshPeriod);

    CachingModel actual = parser.parseCachingModel(element);
    CachingModel expected = new OsCacheCachingModel(groups, Integer
        .parseInt(refreshPeriod), cronExpression);

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

    Element element = createCachingElement(cronExpression, groups,
        refreshPeriod);

    CachingModel actual = parser.parseCachingModel(element);
    CachingModel expected = new OsCacheCachingModel(groups, cronExpression);

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

    String groups = "pojos,web";

    Element element = createCachingElement(cronExpression, groups);

    CachingModel actual = parser.parseCachingModel(element);
    CachingModel expected = new OsCacheCachingModel(groups, cronExpression);

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

TOP

Related Classes of org.springmodules.cache.provider.oscache.OsCacheCachingModel

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.