public class NullCache extends Object implements Level1Cache, Level2Cache
log| 构造器和说明 |
|---|
NullCache() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clear the cache
|
void |
evict(String... keys)
Remove items from the cache
|
boolean |
exists(String key)
判断缓存是否存在
|
Map |
get(Collection<String> keys)
批量获取缓存对象
|
Object |
get(String key)
Get an item from the cache, nontransactionally
|
List<byte[]> |
getBytes(Collection<String> key)
同时读取多个 Key
|
byte[] |
getBytes(String key)
读取缓存数据字节数组
|
Collection<String> |
keys()
Return all keys
|
void |
put(Map<String,Object> elements)
批量插入数据
|
void |
put(String key,
Object value)
Add an item to the cache, nontransactionally, with
failfast semantics
|
void |
setBytes(Map<String,byte[]> bytes)
同时设置多个数据
|
void |
setBytes(String key,
byte[] bytes)
设置缓存数据字节数组
|
long |
size()
返回该缓存区域中,内存存储对象的最大数量
|
long |
ttl()
返回该缓存区域的 TTL 设置(单位:秒)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitput, put, setBytes, setBytes, supportTTLpublic long ttl()
Level1Cachettl 在接口中 Level1Cachepublic long size()
Level1Cachesize 在接口中 Level1Cachepublic Object get(String key)
Cacheget 在接口中 Cacheget 在接口中 Level2Cachekey - cache keypublic void put(String key, Object value)
Cacheput 在接口中 Cacheput 在接口中 Level2Cachekey - cache keyvalue - cache valuepublic Collection<String> keys()
Cachekeys 在接口中 Cachekeys 在接口中 Level2Cachepublic Map get(Collection<String> keys)
Cacheget 在接口中 Cacheget 在接口中 Level2Cachekeys - cache keyspublic boolean exists(String key)
Cacheexists 在接口中 Cacheexists 在接口中 Level2Cachekey - cache keypublic void put(Map<String,Object> elements)
Cacheput 在接口中 Cacheput 在接口中 Level2Cacheelements - objects to be put in cachepublic byte[] getBytes(String key)
Level2CachegetBytes 在接口中 Level2Cachekey - cache keypublic List<byte[]> getBytes(Collection<String> key)
Level2CachegetBytes 在接口中 Level2Cachekey - 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 void evict(String... keys)
Cacheevict 在接口中 Cacheevict 在接口中 Level2Cachekeys - Cache keypublic void clear()
Cacheclear 在接口中 Cacheclear 在接口中 Level2CacheCopyright © 2018. All rights reserved.