Interface ThreadContext

    • Method Detail

      • currentContext

        static ThreadContext currentContext()
        Returns the current thread context.
        Returns:
        The current thread context or null if no context exists.
      • isCurrentContext

        default boolean isCurrentContext()
        Returns a boolean indicating whether the current thread is in this context.
        Returns:
        Indicates whether the current thread is in this context.
      • checkThread

        default void checkThread()
        Checks that the current thread is the correct context thread.
      • isBlocked

        boolean isBlocked()
        Returns whether the thread context is currently marked blocked.
        Returns:
        whether the thread context is currently marked blocked
      • block

        void block()
        Marks the thread context as blocked.
      • unblock

        void unblock()
        Marks the thread context as unblocked.
      • close

        void close()
        Closes the context.
        Specified by:
        close in interface AutoCloseable