public class JiraThreadLocalUtilImpl extends Object implements JiraThreadLocalUtil
JiraThreadLocalUtil
so that plugin
developers can have an API route into the JiraThreadLocalUtils
cleanup code.JiraThreadLocalUtil.WarningCallback
Constructor and Description |
---|
JiraThreadLocalUtilImpl() |
Modifier and Type | Method and Description |
---|---|
void |
postCall(org.apache.log4j.Logger log)
This convenience method is equivalent to
postCall(log, null) . |
void |
postCall(org.apache.log4j.Logger log,
JiraThreadLocalUtil.WarningCallback warningCallback)
This should be called in a
finally block to clear up ThreadLocal s
once the runnable stuff has been done. |
void |
preCall()
This should be called before any "runnable code" is called.
|
public void preCall()
JiraThreadLocalUtil
ThreadLocal
environment for the runnable
code to execute in.preCall
in interface JiraThreadLocalUtil
public void postCall(@Nonnull org.apache.log4j.Logger log)
JiraThreadLocalUtil
postCall(log, null)
.postCall
in interface JiraThreadLocalUtil
log
- as for JiraThreadLocalUtil.postCall(Logger, WarningCallback)
public void postCall(@Nonnull org.apache.log4j.Logger log, @Nullable JiraThreadLocalUtil.WarningCallback warningCallback)
JiraThreadLocalUtil
finally
block to clear up ThreadLocal
s
once the runnable stuff has been done.postCall
in interface JiraThreadLocalUtil
log
- the log to write error messages to in case of any problemswarningCallback
- the callback to invoke in case where problems are
detected after the runnable code is done running and its not cleaned up properly.
This may be null
, in which case those problems are logged as errors.Copyright © 2002-2018 Atlassian. All Rights Reserved.