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 |
---|---|
void |
clearThread()
Clears the thread's
RequestContext . |
com.atlassian.vcache.internal.RequestContext |
get() |
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
.Copyright © 2002-2015 Atlassian. All Rights Reserved.