public class CaffeineCache<K,V> extends Object implements Cache<K,V>
because maximumSize can't be combined with maximumWeight, CaffeineCache would not support maximumWeight parameter.
| 构造器和说明 |
|---|
CaffeineCache(CaffeineCacheOptions<K,V> options) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
V |
computeIfAbsent(K key,
CacheLoader<K,V> loader,
Duration expire) |
boolean |
containsKey(K key) |
void |
destroy() |
V |
get(K key) |
Iterator<K> |
hotKeyIterator(int n) |
Iterator<K> |
keyIterator() |
String |
name() |
void |
put(K key,
V value) |
void |
put(K key,
V value,
Duration expire) |
void |
remove(K key) |
void |
removeAll(Iterable<K> keys) |
long |
size() |
void |
stats(io.micrometer.core.instrument.MeterRegistry registry) |
boolean |
supportNullKey() |
boolean |
supportNullValue() |
public CaffeineCache(CaffeineCacheOptions<K,V> options)
public boolean containsKey(K key)
containsKey 在接口中 Cache<K,V>public V computeIfAbsent(K key, CacheLoader<K,V> loader, Duration expire)
computeIfAbsent 在接口中 Cache<K,V>public boolean supportNullKey()
supportNullKey 在接口中 Cache<K,V>public boolean supportNullValue()
supportNullValue 在接口中 Cache<K,V>public void stats(io.micrometer.core.instrument.MeterRegistry registry)
Copyright © 2021. All rights reserved.