com.atlassian.jira.util.thread
Class JiraThreadLocalUtilImpl
java.lang.Object
com.atlassian.jira.util.thread.JiraThreadLocalUtilImpl
- All Implemented Interfaces:
- JiraThreadLocalUtil
public class JiraThreadLocalUtilImpl
- extends Object
- implements JiraThreadLocalUtil
A concrete implementation of JiraThreadLocalUtil
so that plugin
developers can have an API route into the JiraThreadLocalUtils
cleanup code.
- Since:
- v6.0
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JiraThreadLocalUtilImpl
public JiraThreadLocalUtilImpl()
preCall
public void preCall()
- Description copied from interface:
JiraThreadLocalUtil
- This should be called before any "runnable code" is called.
This will setup a clean
ThreadLocal
environment for the runnable
code to execute in.
- Specified by:
preCall
in interface JiraThreadLocalUtil
postCall
public void postCall(org.apache.log4j.Logger log)
- Description copied from interface:
JiraThreadLocalUtil
- This convenience method is equivalent to
postCall(log, null)
.
- Specified by:
postCall
in interface JiraThreadLocalUtil
- Parameters:
log
- as for JiraThreadLocalUtil.postCall(Logger, WarningCallback)
postCall
public void postCall(org.apache.log4j.Logger log,
JiraThreadLocalUtil.WarningCallback warningCallback)
- Description copied from interface:
JiraThreadLocalUtil
- This should be called in a
finally
block to clear up ThreadLocal
s
once the runnable stuff has been done.
- Specified by:
postCall
in interface JiraThreadLocalUtil
- Parameters:
log
- the log to write error messages to in casse 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-2013 Atlassian. All Rights Reserved.