#include <AbstractThreadLocal.h>
Inheritance diagram for AbstractThreadLocal:
Public Methods | |
AbstractThreadLocal () | |
Create a new AbstractThreadLocal. | |
virtual | ~AbstractThreadLocal () throw () |
Destroy this AbstractThreadLocal. | |
virtual void * | initialValue () const=0 throw () |
virtual void * | childValue (void *parentValue) const throw () |
virtual bool | propogateValue () const throw () |
virtual void | destroyValue (void *currentValue) const throw () |
Protected Methods | |
void * | get () const throw () |
void * | set (void *) const throw () |
|
Invoked by the framework whenever the value associated with current thread and object is about to propogate to a child thread. This method is not invoked if there is no value associated with the current thread and this object.
Reimplemented in InheritableThreadLocal. |
|
Invoked by the framework when a thread that has set a value for a ThreadLocal is about to exit. The initialValue() or childValue() methods will set values implicitly and therefore cause this method to be invoked. This acts as a point to insert some some last chance operation for a ThreadLocal, and is often useful as a cleanup point.
|
|
Get the value associated with the current thread and this object via fetch(). If no association exists, then initialValue() is invoked.
Reimplemented in ThreadLocal. |
|
Invoked by the framework the first time get() is invoked by the current thread, if no child value has been propgated. The value return is associated with the current thread and this object. Implemented in ThreadLocal. |
|
Invoked by the framework whenever it needs to be determined wether or not this object should propogate values to child threads.
Reimplemented in InheritableThreadLocal. |
|
Set the value associated with the current thread and this object. This value can only be retrieved from the current thread.
|