| |
|
| java.lang.Object java.lang.ThreadLocal org.codehaus.aspectwerkz.util.SerializableThreadLocal
SerializableThreadLocal | public class SerializableThreadLocal extends java.lang.ThreadLocal implements Serializable(Code) | | Extends the java.lang.ThreadLocal to be able to add additional functionality. This classes
enhances the base implementation by: making it serializable making it wrap an unwrap the values in a
java.lang.ref.WeakReference to avoid potential memory leaks
author: Jonas BonŽr |
Method Summary | |
public Object | get() Overrides the java.lang.ThreadLocal#get() method. | public void | set(Object value) Overrides the java.lang.ThreadLoca#set(Object value) method. |
SerializableThreadLocal | public SerializableThreadLocal()(Code) | | Constructor. Simply calls the base class constructor.
|
get | public Object get()(Code) | | Overrides the java.lang.ThreadLocal#get() method. Retrieves and returns the value wrapped up in a
java.lang.ref.WeakReference by the SerializableThreadLocal#set(Object value) method
the value wrapped up in a weak reference |
set | public void set(Object value)(Code) | | Overrides the java.lang.ThreadLoca#set(Object value) method. Wraps the value in a
java.lang.ref.WeakReference before passing it on to the java.lang.ThreadLocal#set(Object
value)
method
Parameters: value - the value that should be wrapped up in a weak reference |
|
|
|