类 NullCache
java.lang.Object
net.oschina.j2cache.NullCache
- 所有已实现的接口:
Cache,Level1Cache,Level2Cache
空的缓存Provider
- 作者:
- Winter Lau(javayou@gmail.com)
-
字段概要
从接口继承的字段 net.oschina.j2cache.Level2Cache
log -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclear()Clear the cachevoidRemove items from the cacheboolean判断缓存是否存在Get an item from the cache, nontransactionallyget(Collection<String> keys) 批量获取缓存对象byte[]读取缓存数据字节数组List<byte[]>getBytes(Collection<String> key) 同时读取多个 Keykeys()Return all keysvoidAdd an item to the cache, nontransactionally, with failfast semanticsvoid设置缓存数据的有效期void批量插入数据void设置缓存数据字节数组void同时设置多个数据longsize()返回该缓存区域中,内存存储对象的最大数量longttl()返回该缓存区域的 TTL 设置(单位:秒)从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 net.oschina.j2cache.Level2Cache
put, setBytes, setBytes, supportTTL
-
构造器详细资料
-
NullCache
public NullCache()
-
-
方法详细资料
-
ttl
public long ttl()从接口复制的说明:Level1Cache返回该缓存区域的 TTL 设置(单位:秒)- 指定者:
ttl在接口中Level1Cache- 返回:
- true if cache support ttl setting
-
size
public long size()从接口复制的说明:Level1Cache返回该缓存区域中,内存存储对象的最大数量- 指定者:
size在接口中Level1Cache- 返回:
- cache size in memory
-
get
从接口复制的说明:CacheGet an item from the cache, nontransactionally- 指定者:
get在接口中Cache- 指定者:
get在接口中Level2Cache- 参数:
key- cache key- 返回:
- the cached object or null
-
put
从接口复制的说明:CacheAdd an item to the cache, nontransactionally, with failfast semantics- 指定者:
put在接口中Cache- 指定者:
put在接口中Level2Cache- 参数:
key- cache keyvalue- cache value
-
put
从接口复制的说明:Level2Cache设置缓存数据的有效期- 指定者:
put在接口中Level2Cache- 参数:
key- cache keyvalue- cache valuetimeToLiveInSeconds- cache ttl
-
keys
从接口复制的说明:CacheReturn all keys- 指定者:
keys在接口中Cache- 指定者:
keys在接口中Level2Cache- 返回:
- 返回键的集合
-
get
从接口复制的说明:Cache批量获取缓存对象- 指定者:
get在接口中Cache- 指定者:
get在接口中Level2Cache- 参数:
keys- cache keys- 返回:
- return key-value objects
-
exists
从接口复制的说明:Cache判断缓存是否存在- 指定者:
exists在接口中Cache- 指定者:
exists在接口中Level2Cache- 参数:
key- cache key- 返回:
- true if key exists
-
put
从接口复制的说明:Cache批量插入数据- 指定者:
put在接口中Cache- 指定者:
put在接口中Level2Cache- 参数:
elements- objects to be put in cache
-
getBytes
从接口复制的说明:Level2Cache读取缓存数据字节数组- 指定者:
getBytes在接口中Level2Cache- 参数:
key- cache key- 返回:
- cache data
-
getBytes
从接口复制的说明:Level2Cache同时读取多个 Key- 指定者:
getBytes在接口中Level2Cache- 参数:
key- multiple cache key- 返回:
- cache values
-
setBytes
从接口复制的说明:Level2Cache设置缓存数据字节数组- 指定者:
setBytes在接口中Level2Cache- 参数:
key- cache keybytes- cache data
-
setBytes
从接口复制的说明:Level2Cache同时设置多个数据- 指定者:
setBytes在接口中Level2Cache- 参数:
bytes- cache data
-
evict
从接口复制的说明:CacheRemove items from the cache- 指定者:
evict在接口中Cache- 指定者:
evict在接口中Level2Cache- 参数:
keys- Cache key
-
clear
public void clear()从接口复制的说明:CacheClear the cache- 指定者:
clear在接口中Cache- 指定者:
clear在接口中Level2Cache
-