Interface ContextManager<T>

    • Method Detail

      • initializeNewContext

        Context<T> initializeNewContext​(T value)
        Initialize a new context containing the specified value.

        Whether the value is allowed to be null is up to the implementation.

        Parameters:
        value - The value to initialize a new context for.
        Returns:
        The new active context containing the specified value which should be closed by the caller at the end of its lifecycle from the same thread.
      • getActiveContext

        Context<T> getActiveContext()
        The currently active context, or null if no context is active.
        Returns:
        The active context or null if there is none.