提交 bc404eb6 编写于 作者: C Calvin

little updates

上级 06b41be5
......@@ -40,7 +40,7 @@ import com.google.common.collect.Maps;
@RequestMapping(value = "/task")
public class TaskController {
private static final int PAGE_SIZE = 3;
private static final String PAGE_SIZE = "3";
private static Map<String, String> sortTypes = Maps.newLinkedHashMap();
static {
......@@ -52,12 +52,14 @@ public class TaskController {
private TaskService taskService;
@RequestMapping(value = "")
public String list(@RequestParam(value = "sortType", defaultValue = "auto") String sortType,
@RequestParam(value = "page", defaultValue = "1") int pageNumber, Model model, ServletRequest request) {
public String list(@RequestParam(value = "page", defaultValue = "1") int pageNumber,
@RequestParam(value = "page.size", defaultValue = PAGE_SIZE) int pageSize,
@RequestParam(value = "sortType", defaultValue = "auto") String sortType, Model model,
ServletRequest request) {
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
Long userId = getCurrentUserId();
Page<Task> tasks = taskService.getUserTask(userId, searchParams, pageNumber, PAGE_SIZE, sortType);
Page<Task> tasks = taskService.getUserTask(userId, searchParams, pageNumber, pageSize, sortType);
model.addAttribute("tasks", tasks);
model.addAttribute("sortType", sortType);
......
......@@ -23,7 +23,7 @@ import com.google.common.cache.LoadingCache;
/**
* 本地缓存演示,使用GuavaCache.
*
* @author hzl7652
* @author calvin
*/
@ContextConfiguration(locations = { "/applicationContext.xml" })
public class GuavaCacheDemo extends SpringTransactionalTestCase {
......
......@@ -456,7 +456,6 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
<!-- log4j 实际调用slf4j -->
......
......@@ -53,6 +53,9 @@ public abstract class BenchmarkBase {
onFinish();
}
/**
* Must be invoked after each thread finish the prepare job, return the startTime.
*/
protected Date onThreadStart() {
startLock.countDown();
//wait for all threads ready
......@@ -64,6 +67,9 @@ public abstract class BenchmarkBase {
return new Date();
}
/**
* Must be invoked after the loop finish.
*/
protected void onThreadFinish(Date threadStartTime) {
// notify test finish
finishLock.countDown();
......@@ -74,13 +80,13 @@ public abstract class BenchmarkBase {
}
/**
* Override to do some data prepare job.
* Override to do some global data prepare job.
*/
protected void onStart() {
}
/**
* Override to do some data cleanup and verify job.
* Override to do some global data cleanup and verify job.
*/
protected void onFinish() {
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册