|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxinmy.weixin4j.cache.RedisCacheStorager<T>
public class RedisCacheStorager<T extends Cacheable>
用Redis保存缓存对象(推荐使用)
| Field Summary |
|---|
| Fields inherited from interface com.foxinmy.weixin4j.cache.CacheStorager |
|---|
ALLKEY, CUTMS |
| Constructor Summary | |
|---|---|
RedisCacheStorager()
|
|
RedisCacheStorager(redis.clients.jedis.JedisPoolConfig poolConfig)
|
|
RedisCacheStorager(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
|
|
RedisCacheStorager(String host,
int port,
int timeout)
|
|
RedisCacheStorager(String host,
int port,
int timeout,
String password)
|
|
RedisCacheStorager(String host,
int port,
int timeout,
String password,
redis.clients.jedis.JedisPoolConfig poolConfig)
|
|
| Method Summary | |
|---|---|
void |
caching(String key,
T cache)
缓存新的对象 |
void |
clear()
清除所有缓存对象(请慎重) |
T |
evict(String key)
移除缓存对象 |
T |
lookup(String key)
查找缓存中的对象 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RedisCacheStorager()
public RedisCacheStorager(String host,
int port,
int timeout)
public RedisCacheStorager(String host,
int port,
int timeout,
String password)
public RedisCacheStorager(redis.clients.jedis.JedisPoolConfig poolConfig)
public RedisCacheStorager(String host,
int port,
int timeout,
String password,
redis.clients.jedis.JedisPoolConfig poolConfig)
public RedisCacheStorager(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
| Method Detail |
|---|
public T lookup(String key)
CacheStorager
lookup in interface CacheStorager<T extends Cacheable>key - 缓存key
public void caching(String key,
T cache)
CacheStorager
caching in interface CacheStorager<T extends Cacheable>key - 缓存keycache - 将要缓存的对象public T evict(String key)
CacheStorager
evict in interface CacheStorager<T extends Cacheable>key - 缓存key
public void clear()
CacheStorager
clear in interface CacheStorager<T extends Cacheable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||