All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.util.ThreadLocal

java.lang.Object
   |
   +----sun.server.util.ThreadLocal

public class ThreadLocal
extends Object
A simple class that implements thread local variables.


Constructor Index

 o ThreadLocal()

Method Index

 o get(String)
Get the thread local object that has been associated with the key specified for this thread.
 o put(String, Object)
Store a thread local object for this thread.

Constructors

 o ThreadLocal
 public ThreadLocal()

Methods

 o put
 public static void put(String key,
                        Object local)
Store a thread local object for this thread. The thread local object is stored based on a String key for the local storage. So a thread can have many different thread local objects associated with different keys.

Parameters:
key - - an application specified string key for the object. It is strongly advised that the key be the package name followed by the class name followed by the application specific string. This way, name space collisions are avoided.
local - - a thread local object.
 o get
 public static Object get(String key)
Get the thread local object that has been associated with the key specified for this thread.

Parameters:
key - - a string identified for the object.
Returns:
- the object that was stored together with this key for this thread.

All Packages  Class Hierarchy  This Package  Previous  Next  Index