er.extensions.concurrency
Class ERXCloneableThreadLocal
java.lang.Object
java.lang.ThreadLocal<T>
java.lang.InheritableThreadLocal
er.extensions.concurrency.ERXCloneableThreadLocal
- Direct Known Subclasses:
- ERXThreadStorage.ERXThreadStorageCloneableThreadLocal
public class ERXCloneableThreadLocal
- extends InheritableThreadLocal
ERXClonableThreadLocal extends InheritableThreadLocal
to bequeath a cloned copy of the parent object to the child thread.
Note: Objects used with this thread local must implement the Cloneable
interface and have a public clone method.
|
Field Summary |
protected static Logger |
log
logging support |
|
Method Summary |
protected Object |
childValue(Object parentValue)
Clones a copy of the parent object for the child thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final Logger log
- logging support
ERXCloneableThreadLocal
public ERXCloneableThreadLocal()
childValue
protected Object childValue(Object parentValue)
- Clones a copy of the parent object for the child thread.
The parentValue must implement the
Cloneable
interface and have a public clone method.
- Overrides:
childValue in class InheritableThreadLocal
- Parameters:
parentValue - local object to the parent thread.
- Returns:
- a cloned value of the parent if not null.
Copyright © 2002 – 2007 Project Wonder.