Class ThreadContexts

    • Constructor Detail

      • ThreadContexts

        public ThreadContexts()
        Creates a new collection instance.
    • Method Detail

      • add

        public ThreadContexts add​(ThreadContext<?> threadContext)
        Adds the context to the current collection.
        Parameters:
        threadContext - the thread context to add
        Returns:
        this instance
      • getThreadContexts

        public Collection<ThreadContext<Object>> getThreadContexts()
        Returns a collection of the current thread contexts. This is a snapshot of what is currently in the collection sorted by priority.
        Returns:
        an immutable collection of the curren thread contexts
      • clear

        public ThreadContexts clear()
        Clears the current contexts.
        Returns:
        this instance