java.lang.Object | |
↳ | com.atlassian.jira.cache.JiraVCacheRequestContextSupplier |
Lenient request context supplier that may create request context for a thread if it hasn't been created. Normally in Cloud Vertigo context is initialised at the beginning of the request with a tenant that comes in request, therefore it is not allowed to call components that are tenant aware without request context. However, Server instance is always tenanted and sometimes components that use vcache are called from threads that do not have context initialised (e.g. in constructor during container initialisation); Since this behaviour is allowed in Jira Server 7.x we will just log it as a warning and create NoopRequestContext that will always compute value or return empty value.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs JiraVCacheRequestContextSupplier.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears the thread's RequestContext.
| |||||||||||
Initialises the thread's RequestContext.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object | |||||||||||||
From interface
java.util.function.Supplier
|
Constructs JiraVCacheRequestContextSupplier.
warnNoContext | if set to true, every time get() will be called on uninitialised thread request
context it will be logged as warning.
|
---|
Clears the thread's RequestContext.
Initialises the thread's RequestContext.
partitionId | the identifier for the partition. Will be validated using
requireValidPartitionIdentifier(String) .
|
---|