Skip to content

Commit

Permalink
Merge branch 'release/0.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
cFrost-sun committed Jan 18, 2017
2 parents 6c82f51 + 371080e commit f3fac6c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 201 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Status

### latest (0.0.2)
### latest
[![Build Status](https://ci.eulerproject.io/job/euler-cache-latest-jdk7/badge/icon)](https://ci.eulerproject.io/job/euler-cache-latest-jdk7)

### stable (0.0.1)
### stable
[![Build Status](https://ci.eulerproject.io/job/euler-cache-stable-jdk7/badge/icon)](https://ci.eulerproject.io/job/euler-cache-stable-jdk7)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>euler-cache</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
<name>euler-cache</name>
<url>https://eulerproject.io</url>
<description>In Memory Object Cache</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -162,4 +163,22 @@ public DATA_T get(KEY_T key) {
* @return
*/
public abstract boolean isEnable();

protected class DataStore<T> {
private final T data;
private final long addTime;

public DataStore(T data) {
this.data = data;
this.addTime = new Date().getTime();
}

public T getData() {
return data;
}

public long getAddTime() {
return addTime;
}
}
}

This file was deleted.

145 changes: 0 additions & 145 deletions src/main/java/net/eulerframework/cache/inMemoryCache/ObjectCache.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* https://github.com/euler-projects/euler-framework
* http://cfrost.net
*/
package net.eulerframework.cache.inMemoryCache;
package net.eulerframework.cache.inMemoryCache.custom;

import java.util.ArrayList;
import java.util.HashMap;
Expand All @@ -37,6 +37,8 @@
import java.util.Map.Entry;
import java.util.Set;

import net.eulerframework.cache.inMemoryCache.DefaultObjectCache;

/**
* 带有模糊查询功能的对象缓存,缓存键值必须为<code>String</code>类型
* @author cFrost
Expand All @@ -50,15 +52,15 @@ public class FuzzyObjectCache<DATA_T> extends DefaultObjectCache<String, DATA_T>
/**
* 新建缓存对象,默认数据生命周期为0s
*/
protected FuzzyObjectCache() {
public FuzzyObjectCache() {
super();
}

/**
* 新建缓存对象并指定数据生命周期
* @param dataLife 数据生命周期,单位:毫秒,设为<code>&lt;=0</code>的值表示禁用缓存
*/
protected FuzzyObjectCache(long dataLife) {
public FuzzyObjectCache(long dataLife) {
super(dataLife);
}

Expand Down

0 comments on commit f3fac6c

Please sign in to comment.