|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.driver.ThreadGroupLocal
public abstract class ThreadGroupLocal
Class implementing ThreadGroup local storage. Associates variables with all threads in a ThreadGroup.
Method Summary | |
---|---|
static void |
cleanup()
Cleanup all storage associated with the effective ThreadGroup's ThreadGroupLocal storage. |
static Object |
get(Object key)
Get the value for the key for the current ThreadGroup |
static ThreadGroup |
getThreadProxyGroup()
Get this thread's proxy group. |
static Object |
put(Object key,
Object value)
Set the key value pair for the current ThreadGroup |
static Object |
remove(Object key)
Remove the key and associated value for the specified ThreadGroup |
static void |
removeAll()
Remove all keys and associated value for the current ThreadGroup |
static ThreadGroup |
setThreadProxyGroup(ThreadGroup proxy)
Set this thread's proxy group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ThreadGroup getThreadProxyGroup()
setThreadProxyGroup(java.lang.ThreadGroup)
public static ThreadGroup setThreadProxyGroup(ThreadGroup proxy)
A proxy ThreadGroup is useful if your code is called on a thread over which you have no control (and may not have been created in the same ThreadGroup as other threads that need to put and get shared variables.
To use a proxy group, do the following:
...
ThreadGroup oldProxy = ThreadGroupLocal.setThreadProxyGroup(proxyGroup);
...
//get variable values using ThreadGroupLocal.get()
...
ThreadGroupLocal.setThreadProxyGroup(oldProxy);
...
Note that the DirXML Subscriber and Publisher threads are members of the same ThreadGroup.
proxy
- The ThreadGroup to use instead of the current Thread's actual ThreadGroup
public static Object put(Object key, Object value)
key
- value
-
null
otherwisepublic static Object get(Object key)
key
-
null
otherwisepublic static Object remove(Object key)
key
-
null
otherwisepublic static void removeAll()
public static void cleanup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |