|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ThreadLocal<T>
net.sf.ehcache.util.lang.VicariousThreadLocal<T>
public class VicariousThreadLocal<T>
A drop-in replacement ThreadLocal
implementation that does not leak
when thread-local values reference the ThreadLocal
object.
The code is optimised to cope with frequently changing values.
ThreadLocal
, this implementation:ThreadLocal
Constructor Summary | |
---|---|
VicariousThreadLocal()
Creates a new VicariousThreadLocal . |
Method Summary | |
---|---|
T |
get()
|
void |
poll()
Check if any strong references need should be removed due to thread exit. |
void |
remove()
|
void |
set(T value)
|
Methods inherited from class java.lang.ThreadLocal |
---|
initialValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VicariousThreadLocal()
VicariousThreadLocal
.
Method Detail |
---|
public T get()
get
in class java.lang.ThreadLocal<T>
public void set(T value)
set
in class java.lang.ThreadLocal<T>
public void remove()
remove
in class java.lang.ThreadLocal<T>
public void poll()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |