@Documented
@Target(value=FIELD)
public @interface ThreadLocal
Thread-local variables are typically used for passing data between snippets
inlined into different methods. By default, the thread-local variable is
initialized to the default value corresponding to its type. If the
inheritable
annotation parameter (optional) is set to
true
, the default value will be inherited from the parent thread.
This annotation can be only used with fields. The fields should be declared
static
, and if they are not shared between multiple instrumentation
classes, they should be kept private
.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
inheritable
Determines the default value for a thread-local variable.
|