public class SecondCacheService extends java.lang.Object implements CacheService
构造器和说明 |
---|
SecondCacheService(CacheService cache1,
CacheService cache2) |
SecondCacheService(CacheService cache1,
CacheService cache2,
int bufferSeconds) |
限定符和类型 | 方法和说明 |
---|---|
<T> T |
get(java.lang.String key,
java.lang.reflect.Type type)
获取
|
void |
remove(java.lang.String key)
移除
|
void |
store(java.lang.String key,
java.lang.Object obj,
int seconds)
保存
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getOrStore
public SecondCacheService(CacheService cache1, CacheService cache2)
cache1
- 一级缓存cache2
- 二级缓存public SecondCacheService(CacheService cache1, CacheService cache2, int bufferSeconds)
cache1
- 一级缓存cache2
- 二级缓存bufferSeconds
- 缓冲秒数public void store(java.lang.String key, java.lang.Object obj, int seconds)
CacheService
store
在接口中 CacheService
key
- 缓存键obj
- 对象seconds
- 秒数public <T> T get(java.lang.String key, java.lang.reflect.Type type)
CacheService
get
在接口中 CacheService
key
- 缓存键public void remove(java.lang.String key)
CacheService
remove
在接口中 CacheService
key
- 缓存键