Package org.openjdk.jmc.common.util
Class FormatThreadLocal<T extends Format>
java.lang.Object
java.lang.ThreadLocal<T>
org.openjdk.jmc.common.util.FormatThreadLocal<T>
- Type Parameters:
T
- the type of formatter to provide
Thread local implementation to use prototypes of
Format
subclasses that are not thread
safe by themselves. Use ThreadLocal.get()
on an instance of this class to get a thread
local formatter instance.-
Constructor Summary
ConstructorsConstructorDescriptionFormatThreadLocal
(T prototype) Create a new thread local formatter generator. -
Method Summary
Methods inherited from class java.lang.ThreadLocal
get, remove, set, withInitial
-
Constructor Details
-
FormatThreadLocal
Create a new thread local formatter generator.- Parameters:
prototype
- prototype to use when getting a formatter
-
-
Method Details
-
initialValue
- Overrides:
initialValue
in classThreadLocal<T extends Format>
-