public interface ExecutorLocal<T>
Modifier and Type | Field and Description |
---|---|
static ExecutorLocal[] |
all |
Modifier and Type | Method and Description |
---|---|
T |
get()
This is called when scheduling the task, and also before calling
set(Object) when running on a
executor thread. |
void |
set(T value)
Before a task has been run, this will be called with the value from the thread that scheduled the task, and after
the task is finished, the value that was previously retrieved from this thread is restored.
|
static final ExecutorLocal[] all
T get()
set(Object)
when running on a
executor thread.void set(T value)
value
- Value to use for the executor local state; may be null.Copyright © 2009-2021 The Apache Software Foundation