Class PersistentThreadLocal<T>
- java.lang.Object
-
- java.lang.ThreadLocal<T>
-
- org.eclipse.epsilon.common.concurrent.PersistentThreadLocal<T>
-
- Direct Known Subclasses:
DelegatePersistentThreadLocal
,ThreadLocalBatchData
public class PersistentThreadLocal<T> extends ThreadLocal<T>
Thread-local storage which retains values for all threads.- Since:
- 1.6
- Author:
- Sina Madani
-
-
Constructor Summary
Constructors Constructor Description PersistentThreadLocal(int numThreads, Supplier<? extends T> initialValue)
PersistentThreadLocal(Supplier<? extends T> initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<T>
getAll()
protected T
initialValue()
void
remove()
void
removeAll()
void
set(T value)
int
size()
-
Methods inherited from class java.lang.ThreadLocal
get, withInitial
-
-
-
-
Method Detail
-
initialValue
protected T initialValue()
- Overrides:
initialValue
in classThreadLocal<T>
-
set
public void set(T value)
- Overrides:
set
in classThreadLocal<T>
-
remove
public void remove()
- Overrides:
remove
in classThreadLocal<T>
-
getAll
public Collection<T> getAll()
-
size
public int size()
-
removeAll
public void removeAll()
-
-