public class ThreadLocalStorageImpl extends Object implements ThreadLocalStorage
ThreadLocalStorage.
The code was pasted from the Hivemnind container written by
Howard Lewis Ship and Harish Krishnaswamy| Constructor and Description |
|---|
ThreadLocalStorageImpl() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ThreadLocalStorageImpl()
public Object get(String key)
ThreadLocalStorageget in interface ThreadLocalStoragekey - the key for the lookuppublic void put(String key, Object value)
ThreadLocalStorageput in interface ThreadLocalStoragekey - the key of the object to storevalue - the value of the object to storepublic boolean containsKey(String key)
ThreadLocalStoragecontainsKey in interface ThreadLocalStoragekey - the key for the lookuppublic void clear()
ThreadLocalStorageclear in interface ThreadLocalStorageCopyright © 2004–1970 The Apache Software Foundation. All rights reserved.