Class WeakConcurrentMap.WithInlinedExpunction<K,V>
java.lang.Object
java.lang.ref.ReferenceQueue<K>
io.opentelemetry.context.internal.shaded.AbstractWeakConcurrentMap<K,V,WeakConcurrentMap.LookupKey<K>>
io.opentelemetry.context.internal.shaded.WeakConcurrentMap<K,V>
io.opentelemetry.context.internal.shaded.WeakConcurrentMap.WithInlinedExpunction<K,V>
- Enclosing class:
WeakConcurrentMap<K,V>
A
WeakConcurrentMap where stale entries are removed as a side effect of interacting
with this map.-
Nested Class Summary
Nested classes/interfaces inherited from class io.opentelemetry.context.internal.shaded.WeakConcurrentMap
WeakConcurrentMap.LookupKey<K>, WeakConcurrentMap.WithInlinedExpunction<K,V> Nested classes/interfaces inherited from class io.opentelemetry.context.internal.shaded.AbstractWeakConcurrentMap
AbstractWeakConcurrentMap.WeakKey<K> -
Field Summary
Fields inherited from class io.opentelemetry.context.internal.shaded.AbstractWeakConcurrentMap
target -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.opentelemetry.context.internal.shaded.WeakConcurrentMap
getCleanerThread, getLookupKey, resetLookupKeyMethods inherited from class io.opentelemetry.context.internal.shaded.AbstractWeakConcurrentMap
clear, defaultValue, expungeStaleEntries, getIfPresent, putIfAbsent, putIfProbablyAbsent, run, toStringMethods inherited from class java.lang.ref.ReferenceQueue
poll, remove, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WithInlinedExpunction
public WithInlinedExpunction()
-
-
Method Details
-
get
- Overrides:
getin classAbstractWeakConcurrentMap<K,V, WeakConcurrentMap.LookupKey<K>> - Parameters:
key- The key of the entry.- Returns:
- The value of the entry or the default value if it did not exist.
-
containsKey
- Overrides:
containsKeyin classAbstractWeakConcurrentMap<K,V, WeakConcurrentMap.LookupKey<K>> - Parameters:
key- The key of the entry.- Returns:
trueif the key already defines a value.
-
put
- Overrides:
putin classAbstractWeakConcurrentMap<K,V, WeakConcurrentMap.LookupKey<K>> - Parameters:
key- The key of the entry.value- The value of the entry.- Returns:
- The previous entry or
nullif it does not exist.
-
remove
- Overrides:
removein classAbstractWeakConcurrentMap<K,V, WeakConcurrentMap.LookupKey<K>> - Parameters:
key- The key of the entry.- Returns:
- The removed entry or
nullif it does not exist.
-
iterator
- Specified by:
iteratorin interfaceIterable<K>- Overrides:
iteratorin classAbstractWeakConcurrentMap<K,V, WeakConcurrentMap.LookupKey<K>>
-
approximateSize
public int approximateSize()Description copied from class:AbstractWeakConcurrentMapReturns the approximate size of this map where the returned number is at least as big as the actual number of entries.- Overrides:
approximateSizein classAbstractWeakConcurrentMap<K,V, WeakConcurrentMap.LookupKey<K>> - Returns:
- The minimum size of this map.
-