public class RedisHashCache extends Object implements Level2Cache
log| 构造器和说明 |
|---|
RedisHashCache(String namespace,
String region,
RedisClient client)
缓存构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clear the cache
|
void |
evict(String... keys)
Remove items from the cache
|
boolean |
exists(String key)
判断缓存数据是否存在
|
List<byte[]> |
getBytes(Collection<String> keys)
同时读取多个 Key
|
byte[] |
getBytes(String key)
读取缓存数据字节数组
|
Collection<String> |
keys()
Return all keys
|
void |
setBytes(Map<String,byte[]> bytes)
同时设置多个数据
|
void |
setBytes(String key,
byte[] bytes)
设置缓存数据字节数组
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, get, put, put, put, put, setBytes, setBytes, supportTTLpublic RedisHashCache(String namespace, String region, RedisClient client)
namespace - 命名空间,用于在多个实例中避免 key 的重叠region - 缓存区域的名称client - 缓存客户端接口public byte[] getBytes(String key)
Level2CachegetBytes 在接口中 Level2Cachekey - cache keypublic List<byte[]> getBytes(Collection<String> keys)
Level2CachegetBytes 在接口中 Level2Cachekeys - multiple cache keypublic void setBytes(String key, byte[] bytes)
Level2CachesetBytes 在接口中 Level2Cachekey - cache keybytes - cache datapublic void setBytes(Map<String,byte[]> bytes)
Level2CachesetBytes 在接口中 Level2Cachebytes - cache datapublic boolean exists(String key)
Level2Cacheexists 在接口中 Cacheexists 在接口中 Level2Cachekey - cache keypublic void evict(String... keys)
Level2Cacheevict 在接口中 Cacheevict 在接口中 Level2Cachekeys - Cache keypublic Collection<String> keys()
Level2Cachekeys 在接口中 Cachekeys 在接口中 Level2Cachepublic void clear()
Level2Cacheclear 在接口中 Cacheclear 在接口中 Level2CacheCopyright © 2018. All rights reserved.