Package org.apache.solr.common.util
Interface ExecutorUtil.InheritableThreadLocalProvider
-
- Enclosing class:
- ExecutorUtil
public static interface ExecutorUtil.InheritableThreadLocalProvider
Any class which wants to carry forward the threadlocal values to the threads run by threadpools must implement this interface and the implementation should be registered here
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clean(AtomicReference<Object> ctx)
This method is invoked in the threadpool thread after the execution clean all the variables set in the set methodvoid
set(AtomicReference<Object> ctx)
This is invoked in the Threadpool thread.void
store(AtomicReference<Object> ctx)
This is invoked in the parent thread which submitted a task.
-
-
-
Method Detail
-
store
void store(AtomicReference<Object> ctx)
This is invoked in the parent thread which submitted a task. copy the necessary Objects to the ctx. The object that is passed is same across all three methods
-
set
void set(AtomicReference<Object> ctx)
This is invoked in the Threadpool thread. set the appropriate values in the threadlocal of this thread.
-
clean
void clean(AtomicReference<Object> ctx)
This method is invoked in the threadpool thread after the execution clean all the variables set in the set method
-
-