Class ConfluenceThreadLocalContextManager
java.lang.Object
com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager
- All Implemented Interfaces:
ScopesRequestCacheDelegate.Registrar
,com.atlassian.sal.api.executor.ThreadLocalContextManager<com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext>
public class ConfluenceThreadLocalContextManager
extends Object
implements com.atlassian.sal.api.executor.ThreadLocalContextManager<com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext>, ScopesRequestCacheDelegate.Registrar
Manages all thread local state for Confluence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the thread local context on the current threadcom.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext
Get the thread local context of the current threadvoid
register
(ScopesRequestCacheDelegate scopesRequestCacheDelegate) void
setThreadLocalContext
(com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext context) Set the thread local context on the current thread
-
Constructor Details
-
ConfluenceThreadLocalContextManager
public ConfluenceThreadLocalContextManager(brave.Tracing tracing)
-
-
Method Details
-
getThreadLocalContext
public com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext getThreadLocalContext()Get the thread local context of the current thread- Specified by:
getThreadLocalContext
in interfacecom.atlassian.sal.api.executor.ThreadLocalContextManager<com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext>
- Returns:
- The thread local context
-
setThreadLocalContext
public void setThreadLocalContext(com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext context) Set the thread local context on the current thread- Specified by:
setThreadLocalContext
in interfacecom.atlassian.sal.api.executor.ThreadLocalContextManager<com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext>
- Parameters:
context
- The context to set
-
clearThreadLocalContext
public void clearThreadLocalContext()Clear the thread local context on the current thread- Specified by:
clearThreadLocalContext
in interfacecom.atlassian.sal.api.executor.ThreadLocalContextManager<com.atlassian.confluence.api.impl.sal.ConfluenceThreadLocalContextManager.ThreadLocalContext>
-
register
- Specified by:
register
in interfaceScopesRequestCacheDelegate.Registrar
-