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 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.
    • Method Detail

      • get

        T get()
        This is called when scheduling the task, and also before calling set(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.