forked from hacxer/codeFactory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCache.java
More file actions
38 lines (22 loc) · 863 Bytes
/
Copy pathCache.java
File metadata and controls
38 lines (22 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package cn.org.rapid_framework.cache;
import java.util.Map;
/**
* A cache interface
* @see CacheHolder.cache
*/
public interface Cache {
public void add(String key, Object value, int expiration);
public boolean safeAdd(String key, Object value, int expiration);
public void set(String key, Object value, int expiration);
public boolean safeSet(String key, Object value, int expiration);
public void replace(String key, Object value, int expiration);
public boolean safeReplace(String key, Object value, int expiration);
public Object get(String key);
public Map<String, Object> get(String[] keys);
public long incr(String key, int by);
public long decr(String key, int by);
public void clear();
public void delete(String key);
public boolean safeDelete(String key);
public void stop();
}