| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clear the entire cache.
|
V |
get(K key)
Take the corresponding value from the cache according to the cache key.
|
V |
get(K key,
Callable<? extends V> call)
Get the value in the cache according to the primary key, and put it into the cache after processing by the function.
|
int |
getSize()
Returns the number of key-value pairs in the cache.
|
void |
put(K key,
V val)
Cache a pair of key value.
|
V |
remove(K key)
Take the corresponding value from the cache according to the cache key, and remove this record from the cache.
|
void |
setSize(int size) |
public int getSize()
Cachepublic void setSize(int size)
public void put(K key, V val)
Cachepublic V get(K key)
Cachepublic V get(K key, Callable<? extends V> call) throws Exception
Cachepublic V remove(K key)
CacheCopyright © 2018–2024 Alibaba Group. All rights reserved.