public class

JiraThreadLocalUtilImpl

extends Object
implements JiraThreadLocalUtil
java.lang.Object
   ↳ com.atlassian.jira.util.thread.JiraThreadLocalUtilImpl

Class Overview

A concrete implementation of JiraThreadLocalUtil so that plugin developers can have an API route into the JiraThreadLocalUtils cleanup code.

Summary

Public Constructors
JiraThreadLocalUtilImpl()
Public Methods
void postCall(Logger log)
This convenience method is equivalent to postCall(log, null).
void postCall(Logger log, JiraThreadLocalUtil.WarningCallback warningCallback)
This should be called in a finally block to clear up ThreadLocals once the runnable stuff has been done.
void preCall()
This should be called before any "runnable code" is called.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.thread.JiraThreadLocalUtil

Public Constructors

public JiraThreadLocalUtilImpl ()

Public Methods

public void postCall (Logger log)

This convenience method is equivalent to postCall(log, null).

Parameters
log as for postCall(Logger, WarningCallback)

public void postCall (Logger log, JiraThreadLocalUtil.WarningCallback warningCallback)

This should be called in a finally block to clear up ThreadLocals once the runnable stuff has been done.

Parameters
log the log to write error messages to in casse of any problems
warningCallback 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.

public void preCall ()

This should be called before any "runnable code" is called. This will setup a clean ThreadLocal environment for the runnable code to execute in.