类 EhCache3
java.lang.Object
net.oschina.j2cache.ehcache.EhCache3
- 所有已实现的接口:
Cache,Level1Cache,org.ehcache.event.CacheEventListener
EHCache 3.x 的缓存封装
该封装类实现了缓存操作以及对缓存数据失效的侦听
- 作者:
- Winter Lau(javayou@gmail.com)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclear()Clear the cachevoidRemove items from the cacheboolean判断缓存是否存在Get an item from the cache, nontransactionallyget(Collection<String> keys) 批量获取缓存对象keys()Return all keysvoidonEvent(org.ehcache.event.CacheEvent cacheEvent) voidAdd an item to the cache, nontransactionally, with failfast semanticsvoid批量插入数据longsize()返回该缓存区域中,内存存储对象的最大数量longttl()返回该缓存区域的 TTL 设置(单位:秒)
-
构造器详细资料
-
EhCache3
-
-
方法详细资料
-
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 -
put
从接口复制的说明:CacheAdd an item to the cache, nontransactionally, with failfast semantics -
get
从接口复制的说明:Cache批量获取缓存对象 -
exists
从接口复制的说明:Cache判断缓存是否存在 -
put
从接口复制的说明:Cache批量插入数据 -
keys
从接口复制的说明:CacheReturn all keys -
evict
从接口复制的说明:CacheRemove items from the cache -
clear
public void clear()从接口复制的说明:CacheClear the cache -
onEvent
public void onEvent(org.ehcache.event.CacheEvent cacheEvent) - 指定者:
onEvent在接口中org.ehcache.event.CacheEventListener
-