Package io.smallrye.context
Interface FastThreadContextProvider
- All Superinterfaces:
org.eclipse.microprofile.context.spi.ThreadContextProvider
- All Known Subinterfaces:
FastStorageThreadContextProvider<Declaration>
public interface FastThreadContextProvider
extends org.eclipse.microprofile.context.spi.ThreadContextProvider
Subtype of ThreadContextProvider which bypasses all the
ThreadContextProvider.currentContext(Map) and
ThreadContextProvider.clearedContext(Map) and ThreadContextSnapshot and just works on the
ThreadLocal and cleared value we designate.-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectclearedValue(Map<String, String> props) The cleared value.ThreadLocal<?> threadLocal(Map<String, String> props) Designates the ThreadLocal that we should capture/restore.Methods inherited from interface org.eclipse.microprofile.context.spi.ThreadContextProvider
clearedContext, currentContext, getThreadContextType
-
Method Details
-
threadLocal
Designates the ThreadLocal that we should capture/restore. Must always be the same returned ThreadLocal.- Parameters:
props- properties- Returns:
- the ThreadLocal to capture/restore
-
clearedValue
The cleared value. Defaults to null. Override this if your cleared value is not null.- Parameters:
props- properties- Returns:
- the cleared value for the ThreadLocal
-