org.tinyjee.maven.dim.sh
Class HighlighterThreadLocal

java.lang.Object
  extended by java.lang.ThreadLocal<SoftReference<HighlighterScriptFacade>>
      extended by org.tinyjee.maven.dim.sh.HighlighterThreadLocal

public class HighlighterThreadLocal
extends ThreadLocal<SoftReference<HighlighterScriptFacade>>

Implements a thread local that is capable of caching the thread bound script facade in a thread safe way.

Version:
1.0
Author:
Juergen_Kellerer, 2010-09-03

Constructor Summary
HighlighterThreadLocal()
           
 
Method Summary
 HighlighterScriptFacade getHighlighter()
          Returns a thread bound, script facade.
protected  SoftReference<HighlighterScriptFacade> initialValue()
          
 
Methods inherited from class java.lang.ThreadLocal
get, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighlighterThreadLocal

public HighlighterThreadLocal()
Method Detail

initialValue

protected SoftReference<HighlighterScriptFacade> initialValue()

Overrides:
initialValue in class ThreadLocal<SoftReference<HighlighterScriptFacade>>

getHighlighter

public HighlighterScriptFacade getHighlighter()
Returns a thread bound, script facade.

Returns:
a thread bound, script facade.