T - Type of the thread local valuepublic class IterableThreadLocal<T> extends ThreadLocal<T> implements Iterable<Map.Entry<Thread,T>>
ThreadLocal that allows to iterate over all available Thread-value pairs.
Note that this is not strongly consistent and may differ from actual current state in moment of change.| Constructor and Description |
|---|
IterableThreadLocal(Supplier<? extends T> initialValue) |
| Modifier and Type | Method and Description |
|---|---|
protected T |
initialValue() |
Iterator<Map.Entry<Thread,T>> |
iterator() |
void |
remove() |
void |
set(T value) |
get, withInitialclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected T initialValue()
initialValue in class ThreadLocal<T>public void set(T value)
set in class ThreadLocal<T>public void remove()
remove in class ThreadLocal<T>Copyright © 2019. All rights reserved.