public interface Cache
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache
|
void |
evict(String... keys)
Remove items from the cache
|
default boolean |
exists(String key)
判断缓存是否存在
|
Map<String,Object> |
get(Collection<String> keys)
批量获取缓存对象
|
Object |
get(String key)
Get an item from the cache, nontransactionally
|
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
|
Object get(String key)
key
- cache keyMap<String,Object> get(Collection<String> keys)
keys
- cache keysdefault boolean exists(String key)
key
- cache keyvoid put(String key, Object value)
key
- cache keyvalue
- cache valueCollection<String> keys()
void evict(String... keys)
keys
- Cache keyvoid clear()
Copyright © 2018. All rights reserved.