public class ThreadLocalStorageImpl extends java.lang.Object implements ThreadLocalStorage
ThreadLocalStorage
.
The code was pasted from the Hivemnind container written by
Howard Lewis Ship and Harish KrishnaswamyConstructor and Description |
---|
ThreadLocalStorageImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all keys.
|
boolean |
containsKey(java.lang.String key)
Checks if the thread-local object for the given key exists
|
java.lang.Object |
get(java.lang.String key)
Returns the thread-local object for the given key, or null
if no such object exists.
|
void |
put(java.lang.String key,
java.lang.Object value)
Stores the value object at the given key, overwriting
any prior value that may have been stored at that key.
|
public java.lang.Object get(java.lang.String key)
ThreadLocalStorage
get
in interface ThreadLocalStorage
key
- the key for the lookuppublic void put(java.lang.String key, java.lang.Object value)
ThreadLocalStorage
put
in interface ThreadLocalStorage
key
- the key of the object to storevalue
- the value of the object to storepublic boolean containsKey(java.lang.String key)
ThreadLocalStorage
containsKey
in interface ThreadLocalStorage
key
- the key for the lookuppublic void clear()
ThreadLocalStorage
clear
in interface ThreadLocalStorage
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.