K - 键类型V - 值类型public class ReferenceConcurrentMap<K,V> extends Object implements ConcurrentMap<K,V>, Iterable<Map.Entry<K,V>>, Serializable
| Constructor and Description |
|---|
ReferenceConcurrentMap(ConcurrentMap<Reference<K>,V> raw,
ReferenceUtil.ReferenceType referenceType)
Deprecated.
构造
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
|
V |
compute(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
|
V |
computeIfAbsent(K key,
Func0<? extends V> supplier)
Deprecated.
从缓存中获得对象,当对象不在缓存中或已经过期返回Func0回调产生的对象
|
V |
computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfPresent(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
|
boolean |
containsKey(Object key)
Deprecated.
|
boolean |
containsValue(Object value)
Deprecated.
|
Set<Map.Entry<K,V>> |
entrySet()
Deprecated.
|
void |
forEach(BiConsumer<? super K,? super V> action)
Deprecated.
|
V |
get(Object key)
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
Iterator<Map.Entry<K,V>> |
iterator()
Deprecated.
|
Set<K> |
keySet()
Deprecated.
|
V |
merge(K key,
V value,
BiFunction<? super V,? super V,? extends V> remappingFunction)
Deprecated.
|
V |
put(K key,
V value)
Deprecated.
|
void |
putAll(Map<? extends K,? extends V> m)
Deprecated.
|
V |
putIfAbsent(K key,
V value)
Deprecated.
|
V |
remove(Object key)
Deprecated.
|
boolean |
remove(Object key,
Object value)
Deprecated.
|
V |
replace(K key,
V value)
Deprecated.
|
boolean |
replace(K key,
V oldValue,
V newValue)
Deprecated.
|
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function)
Deprecated.
|
void |
setPurgeListener(BiConsumer<Reference<? extends K>,V> purgeListener)
Deprecated.
设置对象回收清除监听
|
int |
size()
Deprecated.
|
Collection<V> |
values()
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOrDefaultforEach, spliteratorpublic ReferenceConcurrentMap(ConcurrentMap<Reference<K>,V> raw, ReferenceUtil.ReferenceType referenceType)
raw - ConcurrentMap实现referenceType - Reference类型public void setPurgeListener(BiConsumer<Reference<? extends K>,V> purgeListener)
purgeListener - 监听函数public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public V putIfAbsent(K key, V value)
putIfAbsent in interface ConcurrentMap<K,V>putIfAbsent in interface Map<K,V>public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
replaceAll in interface ConcurrentMap<K,V>replaceAll in interface Map<K,V>public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
computeIfAbsent in interface ConcurrentMap<K,V>computeIfAbsent in interface Map<K,V>public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
computeIfPresent in interface ConcurrentMap<K,V>computeIfPresent in interface Map<K,V>public V computeIfAbsent(K key, Func0<? extends V> supplier)
key - 键supplier - 如果不存在回调方法,用于生产值对象public void forEach(BiConsumer<? super K,? super V> action)
public V compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
Copyright © 2025. All rights reserved.