Package org.apache.cassandra.concurrent
Interface ExecutorLocal<T>
-
- All Known Implementing Classes:
ClientWarn
,Tracing
public interface ExecutorLocal<T>
-
-
Field Summary
Fields Modifier and Type Field Description static ExecutorLocal[]
all
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
get()
This is called when scheduling the task, and also before callingset(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.
-
-
-
Field Detail
-
all
static final ExecutorLocal[] all
-
-
Method Detail
-
get
T get()
This is called when scheduling the task, and also before callingset(Object)
when running on a executor thread.- Returns:
- The thread-local value that we want to copy across executor boundaries; may be null if not set.
-
set
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.- Parameters:
value
- Value to use for the executor local state; may be null.
-
-