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 java.lang.ThreadLocal<T>Thread-local storage which retains values for all threads.- Since:
- 1.6
- Author:
- Sina Madani
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Thread,T>allValuesprotected java.util.function.Supplier<? extends T>valueGetter
-
Constructor Summary
Constructors Constructor Description PersistentThreadLocal(int numThreads, java.util.function.Supplier<? extends T> initialValue)PersistentThreadLocal(java.util.function.Supplier<? extends T> initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<T>getAll()protected TinitialValue()voidremove()voidremoveAll()voidset(T value)intsize()
-