Class ContextTracker<CtxT extends TrackableContext<CtxT>>


  • public class ContextTracker<CtxT extends TrackableContext<CtxT>>
    extends Object
    Allows to track which thread is running within which context.
    • Constructor Detail

      • ContextTracker

        public ContextTracker()
    • Method Detail

      • getActiveContexts

        public static List<TrackableContext<?>> getActiveContexts​(List<ContextTracker<?>> trackers)
        Retrieves all active contexts from trackers. The returned list can be then used as an argument to TrackableContext.executeWithinAll(List, Runnable) to transfer the contexts when switching to another thread.

        Deriving libs should bind List<ContextTracker<?>> to an instance containing all possible trackers for use as an argument for this method.