Uses of Class
io.smallrye.context.SmallRyeThreadContext
Packages that use SmallRyeThreadContext
-
Uses of SmallRyeThreadContext in io.smallrye.context
Fields in io.smallrye.context declared as SmallRyeThreadContextModifier and TypeFieldDescriptionprotected final SmallRyeThreadContextCompletableFutureWrapper.contextprotected final SmallRyeThreadContextCompletionStageWrapper.contextMethods in io.smallrye.context that return SmallRyeThreadContextModifier and TypeMethodDescriptionSmallRyeContextManager.allClearedThreadContext()Returns aSmallRyeThreadContextinstance which clears all thread contexts.SmallRyeContextManager.allPropagatedThreadContext()Returns aSmallRyeThreadContextinstance which propagates all thread contexts.SmallRyeThreadContext.Builder.build()SmallRyeContextManager.defaultThreadContext()Returns aSmallRyeThreadContextinstance which propagates default contexts, possibly configured via MP Config.static SmallRyeThreadContextSmallRyeThreadContext.getCurrentThreadContext()Returns the current thread's @{link SmallRyeThreadContext} if set, or null.static SmallRyeThreadContextSmallRyeThreadContext.getCurrentThreadContext(SmallRyeThreadContext defaultValue) Returns the current thread's @{link SmallRyeThreadContext} if set, or the given @{link SmallRyeThreadContext} default value.static SmallRyeThreadContextSmallRyeThreadContext.getCurrentThreadContextOrClearedContexts()Returns the current thread's @{link SmallRyeThreadContext} if set, or a @{link SmallRyeThreadContext} which clears all contexts.static SmallRyeThreadContextSmallRyeThreadContext.getCurrentThreadContextOrDefaultContexts()Returns the current thread's @{link SmallRyeThreadContext} if set, or a @{link SmallRyeThreadContext} with default contexts, possibly configured via MP Config.static SmallRyeThreadContextSmallRyeThreadContext.getCurrentThreadContextOrPropagatedContexts()Returns the current thread's @{link SmallRyeThreadContext} if set, or a @{link SmallRyeThreadContext} which propagates all contexts.SmallRyeManagedExecutor.getThreadContext()Returns aThreadContextwhich has the same propagation settings as thisManagedExecutor, which uses thisManagedExecutoras its default executor.Methods in io.smallrye.context with parameters of type SmallRyeThreadContextModifier and TypeMethodDescriptionstatic SmallRyeThreadContextSmallRyeThreadContext.getCurrentThreadContext(SmallRyeThreadContext defaultValue) Returns the current thread's @{link SmallRyeThreadContext} if set, or the given @{link SmallRyeThreadContext} default value.<T> CompletableFuture<T> JdkSpecific.Contract.newCompletableFutureWrapper(SmallRyeThreadContext threadContext, CompletableFuture<T> future, Executor executor, int flags) static <T> CompletableFuture<T> JdkSpecific.newCompletableFutureWrapper(SmallRyeThreadContext threadContext, CompletableFuture<T> future, Executor executor, int flags) <T> CompletionStage<T> JdkSpecific.Contract.newCompletionStageWrapper(SmallRyeThreadContext threadContext, CompletionStage<T> future, Executor executor) static <T> CompletionStage<T> JdkSpecific.newCompletionStageWrapper(SmallRyeThreadContext threadContext, CompletionStage<T> future, Executor executor) static CleanAutoCloseableSmallRyeThreadContext.withThreadContext(SmallRyeThreadContext threadContext) Updates the current @{link SmallRyeThreadContext} in use by the current thread, and returns an object suitable for use in try-with-resource to restore the previous value.static voidSmallRyeThreadContext.withThreadContext(SmallRyeThreadContext threadContext, Runnable f) Invokes the given @{link Runnable} with the current @{link SmallRyeThreadContext} updated to the given value for the current thread.static <T> TSmallRyeThreadContext.withThreadContext(SmallRyeThreadContext threadContext, Supplier<T> f) Invokes the given @{link Supplier} with the current @{link SmallRyeThreadContext} updated to the given value for the current thread.Constructors in io.smallrye.context with parameters of type SmallRyeThreadContextModifierConstructorDescriptionCompletableFutureWrapper(SmallRyeThreadContext context, CompletableFuture<T> f, Executor executor, int flags) CompletionStageWrapper(SmallRyeThreadContext context, CompletionStage<T> f, Executor executor) SmallRyeManagedExecutor(int maxAsync, int maxQueued, SmallRyeThreadContext threadContext, ExecutorService executor, String injectionPointName) -
Uses of SmallRyeThreadContext in io.smallrye.context.impl
Methods in io.smallrye.context.impl with parameters of type SmallRyeThreadContextModifier and TypeMethodDescription<T> CompletableFuture<T> JdkSpecificImpl.newCompletableFutureWrapper(SmallRyeThreadContext threadContext, CompletableFuture<T> future, Executor executor, int flags) <T> CompletionStage<T> JdkSpecificImpl.newCompletionStageWrapper(SmallRyeThreadContext threadContext, CompletionStage<T> future, Executor executor) voidThreadContextProviderPlan.takeThreadContextSnapshotsFast(SmallRyeThreadContext threadContext, ThreadLocal<SmallRyeThreadContext> tcTl, ContextHolder contextHolder) Use this if @{linkThreadContextProviderPlan.isFast()is true (it will throw otherwise) when you want to capture the current context using the fast-path, and feed the captured context in the given @{link ContextHolder}, which must have a size compatible with @{linkThreadContextProviderPlan.size().Method parameters in io.smallrye.context.impl with type arguments of type SmallRyeThreadContextModifier and TypeMethodDescriptionvoidThreadContextProviderPlan.takeThreadContextSnapshotsFast(SmallRyeThreadContext threadContext, ThreadLocal<SmallRyeThreadContext> tcTl, ContextHolder contextHolder) Use this if @{linkThreadContextProviderPlan.isFast()is true (it will throw otherwise) when you want to capture the current context using the fast-path, and feed the captured context in the given @{link ContextHolder}, which must have a size compatible with @{linkThreadContextProviderPlan.size().Constructors in io.smallrye.context.impl with parameters of type SmallRyeThreadContextModifierConstructorDescriptionSlowActiveContextState(SmallRyeThreadContext threadContext, List<org.eclipse.microprofile.context.spi.ThreadContextSnapshot> threadContextSnapshots) Restores a previously captured context.SlowCapturedContextState(SmallRyeThreadContext threadContext) Captures the current context according to the given ThreadContext