V - value type of the mappublic class WeakReferenceThreadMap<V> extends WeakReferenceMap<java.lang.Long,V>
| Constructor | Description |
|---|---|
WeakReferenceThreadMap(java.util.function.Function<? super java.lang.Long,? extends V> factory,
java.util.function.Consumer<? super java.lang.Long> referenceLost) |
| Modifier and Type | Method | Description |
|---|---|---|
long |
currentThreadId() |
Get the current thread ID.
|
V |
getForCurrentThread() |
Get the value for the current thread, creating if needed.
|
V |
removeForCurrentThread() |
Remove the reference for the current thread.
|
V |
setForCurrentThread(V newVal) |
Set the new value for the current thread.
|
clear, containsKey, create, get, getEntriesCreatedCount, getReferenceLostCount, lookup, prune, put, remove, resolve, size, toStringpublic WeakReferenceThreadMap(java.util.function.Function<? super java.lang.Long,? extends V> factory, @Nullable java.util.function.Consumer<? super java.lang.Long> referenceLost)
public V getForCurrentThread()
public V removeForCurrentThread()
public long currentThreadId()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.