public interface Cache
null).| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Remove all mappings from the cache.
|
void |
evict(Object key)
Evict the mapping for this key from this cache if it is present.
|
<T> T |
get(Object key,
Class<T> type) |
String |
getName() |
void |
put(Object key,
Object value)
Associate the specified value with the specified key in this cache.
|
String getName()
<T> T get(Object key, Class<T> type)
T - 泛型key - 对象唯一标识type - 对象的类型void put(Object key, Object value)
If the cache previously contained a mapping for this key, the old value is replaced by the specified value.
key - the key with which the specified value is to be associatedvalue - the value to be associated with the specified keyvoid evict(Object key)
key - the key whose mapping is to be removed from the cachevoid clear()
Copyright © 2020. All rights reserved.