@ParametersAreNonnullByDefault public class JiraVCacheRequestContextSupplier extends Object implements java.util.function.Supplier<com.atlassian.vcache.internal.RequestContext>
| Constructor and Description |
|---|
JiraVCacheRequestContextSupplier(boolean warnNoContext)
Constructs JiraVCacheRequestContextSupplier.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearStaticContext()
Clears the static context for current thread.
|
void |
clearThread()
Clears the thread's
RequestContext. |
com.atlassian.vcache.internal.RequestContext |
get() |
static void |
initStaticContext(String partitionId)
Initialises per thread static context that might be used by
JiraVCacheRequestContextSupplier if
no tenant context is available. |
void |
initThread(String partitionId)
Initialises the thread's
RequestContext. |
boolean |
isInitilised() |
public JiraVCacheRequestContextSupplier(boolean warnNoContext)
warnNoContext - if set to true, every time get() will be called on uninitialised thread request
context it will be logged as warning.@Nonnull public com.atlassian.vcache.internal.RequestContext get()
get in interface java.util.function.Supplier<com.atlassian.vcache.internal.RequestContext>public boolean isInitilised()
public void initThread(String partitionId)
RequestContext.partitionId - the identifier for the partition. Will be validated using
NameValidator.requireValidPartitionIdentifier(String).public void clearThread()
RequestContext.public static void initStaticContext(String partitionId)
JiraVCacheRequestContextSupplier if
no tenant context is available.partitionId - unique name of the partition.public static void clearStaticContext()
Copyright © 2002-2023 Atlassian. All Rights Reserved.