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 thread local values to the threads run by thread
pools must implement this interface and the implementation should be registered here
-
Method Summary
Modifier and TypeMethodDescriptionvoidclean(AtomicReference<Object> ctx) This method is invoked in the thread pool thread after the execution clean all the variables set in the set methodvoidset(AtomicReference<Object> ctx) This is invoked in the thread pool thread.voidstore(AtomicReference<Object> ctx) This is invoked in the parent thread which submitted a task.
-
Method Details
-
store
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
This is invoked in the thread pool thread. set the appropriate values in the thread local of this thread. -
clean
This method is invoked in the thread pool thread after the execution clean all the variables set in the set method
-