/*
* Created on Mar 2, 2006
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*
* Copyright @2006 the original author or authors.
*/
package samples.calculation;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
/**
* <p>
* Unit Tests for <code>{@link ComplexCalculation}</code>.
* </p>
*
* @author Alex Ruiz
*/
public abstract class AbstractComplexCalculationTest extends
AbstractDependencyInjectionSpringContextTests {
/**
* Constructor.
*
* @param name
* the name of the test case
*/
public AbstractComplexCalculationTest(String name) {
super(name);
}
public final void testCalculationWithAndWithoutCaching() {
logger.info("Calculation (without caching) took "
+ measureCalculationExecutionTime() + " ms");
logger.info("Calculation (with caching) took "
+ measureCalculationExecutionTime() + " ms");
}
private long getCurrentTime() {
return System.currentTimeMillis();
}
private long measureCalculationExecutionTime() {
ComplexCalculation calculation = (ComplexCalculation) applicationContext
.getBean("calculation");
long start = getCurrentTime();
calculation.calculate();
long end = getCurrentTime();
return end - start;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
spring二级缓存
共63个文件
jar:10个
gif:10个
js:8个
5星 · 超过95%的资源 需积分: 16 51 下载量 116 浏览量
2008-05-27
09:43:56
上传
评论 1
收藏 3.13MB RAR 举报
温馨提示
一个关于spring二级缓存的例子和一点讲解
资源推荐
资源详情
资源评论
收起资源包目录
caching.rar (63个子文件)
Hibernate+ehcache二级缓存配置 - 王贵伟 - JavaEye技术网站.htm 18KB
spring中配置二级缓存.htm 16KB
spring中配置二级缓存.files
blue.css 2KB
logo_small.gif 2KB
rss_google.gif 701B
blog.css 28KB
se_hilite.js 3KB
shCoreCommon.js 23KB
rss_zhuaxia.gif 723B
SyntaxHighlighter.css 2KB
559a6d44-4e39-4092-9088-8ed7b6297806.jpg 8KB
offline.gif 682B
application.js 151KB
rss_xianguo.jpg 2KB
rss.png 534B
ui.css 2KB
compress.js 16KB
caching
src
main
java
samples
calculation
ComplexCalculation.java 1KB
test
resources
ehCacheCacheProxyFactoryBeanContext.xml 767B
ehcache.xml 4KB
ehCacheAnnotationContext.xml 712B
ehCacheBeanNameAutoproxyCreatorContext.xml 1KB
java
samples
calculation
AbstractComplexCalculationTest.java 2KB
AnnotationsComplexCalculationTest.java 1KB
PerBeanComplexCalculationTest.java 1KB
BeanNameAutoproxyCreatorComplexCalculationTest.java 1KB
bin
ehCacheCacheProxyFactoryBeanContext.xml 767B
ehcache.xml 4KB
samples
calculation
PerBeanComplexCalculationTest.class 628B
ComplexCalculation.class 723B
BeanNameAutoproxyCreatorComplexCalculationTest.class 679B
AbstractComplexCalculationTest.class 2KB
AnnotationsComplexCalculationTest.class 626B
ehCacheAnnotationContext.xml 712B
ehCacheBeanNameAutoproxyCreatorContext.xml 1KB
.classpath 947B
.project 383B
lib
junit.jar 118KB
commons-lang.jar 203KB
commons-logging.jar 37KB
cglib-nodep.jar 317KB
ehcache-1.1.jar 46KB
springmodules-cache.jar 163KB
spring.jar 1.9MB
spring-mock.jar 71KB
commons-collections.jar 546KB
jakarta-oro-2.0.8.jar 64KB
Hibernate+ehcache二级缓存配置 - 王贵伟 - JavaEye技术网站.files
blue.css 2KB
logo_small.gif 2KB
rss_google.gif 701B
blog.css 28KB
user-logo.gif 2KB
se_hilite.js 3KB
shCoreCommon.js 23KB
rss_zhuaxia.gif 723B
SyntaxHighlighter.css 2KB
offline.gif 682B
application.js 151KB
rss_xianguo.jpg 2KB
icon_minigender_1.gif 143B
rss.png 534B
ui.css 2KB
compress.js 16KB
共 63 条
- 1
资源评论
- ustcutsc2012-05-21检索的速度更快 效率大大提高了,易于配置
- muamomo2011-12-14二级缓存 区别于 一级缓存 以及查询缓存 概念清晰
- boddot2014-01-14通过这个了解了二级缓存!感谢
sxpyrgz
- 粉丝: 21
- 资源: 59
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功