|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThreadLocalStorage
Provides a service which can temporarily store thread-local data. This is useful in a multithreaded environment, such as a servlet or Tapestry application. ThreadLocalStorage acts like a map around thread local data. The code was pasted from the Hivemind container written by Howard Lewis Ship.
Method Summary | |
---|---|
void |
clear()
Clears all keys. |
boolean |
containsKey(String key)
Checks if the thread-local object for the given key exists |
Object |
get(String key)
Returns the thread-local object for the given key, or null if no such object exists. |
void |
put(String key,
Object value)
Stores the value object at the given key, overwriting any prior value that may have been stored at that key. |
Method Detail |
---|
Object get(String key)
key
- the key for the lookup
void put(String key, Object value)
key
- the key of the object to storevalue
- the value of the object to storeboolean containsKey(String key)
key
- the key for the lookup
void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |