|
Project Wonder 5.0.0.8795 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecter.extensions.foundation.ERXThreadStorage
public class ERXThreadStorage
ERXThreadStorage provides a way to store objects for
a particular thread. This can be especially handy for storing objects
like the current actor or the current form name within the scope of
a thread handling a particular request.
The system property er.extensions.ERXThreadStorage.useInheritableThreadLocal
defines if the thread storage can be either inherited by client threads (default)
or get used only by the current thread.
| Nested Class Summary | |
|---|---|
protected static class |
ERXThreadStorage.ERXThreadStorageCloneableThreadLocal
|
| Field Summary | |
|---|---|
static String |
KEYS_ADDED_IN_CURRENT_THREAD_KEY
|
static String |
WAS_CLONED_MARKER
|
| Constructor Summary | |
|---|---|
ERXThreadStorage()
|
|
| Method Summary | |
|---|---|
static Map |
map()
Gets the storage map from the current thread. |
static Set<String> |
problematicKeys()
Retrieve the Set of keys for which a warning is issued when the storageMap was inherited from another Thread and the key is accessed. |
static Set<Class<?>> |
problematicTypes()
Retrieve the Set of classes for which a warning is issued when the storageMap was inherited from another Thread and the object retrieved from the map is a subclass of one of the classes in the set. |
static Object |
removeValueForKey(String key)
Removes the value in the map for a given key. |
static void |
reset()
Removes all of the keys from the current Map. |
static void |
setProblematicKeys(Set<String> problematicKeys)
Set the Set of keys for which a warning is issued when the storageMap was inherited from another Thread and the key is accessed. |
static void |
setProblematicTypes(NSSet<Class<?>> problematicTypes)
Set the Set of classes for which a warning is issued when the storageMap was inherited from another Thread and the object retrieved from the map is a subclass of one of the classes in the set. |
static void |
takeValueForKey(Object object,
String key)
Sets a value for a particular key for a particular thread. |
static Object |
valueForKey(EOEditingContext ec,
String key)
Gets the object associated with the key in the storage map off of the current thread in the given editing context. |
static Object |
valueForKey(String key)
Gets the object associated with the key in the storage map off of the current thread. |
static Object |
valueForKeyPath(String keyPath)
Gets the object associated with the keypath in the storage map off of the current thread. |
static boolean |
wasInheritedFromParentThread()
Checks if the storageMap was inherited from the parent thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String KEYS_ADDED_IN_CURRENT_THREAD_KEY
public static final String WAS_CLONED_MARKER
| Constructor Detail |
|---|
public ERXThreadStorage()
| Method Detail |
|---|
public static void takeValueForKey(Object object,
String key)
object - valuekey - keypublic static Object removeValueForKey(String key)
key - key to be removed from the map.
public static Object valueForKeyPath(String keyPath)
keyPath - key path to be used to retrieve value from map.
public static Object valueForKey(String key)
key - key to be used to retrieve value from map.
public static Object valueForKey(EOEditingContext ec,
String key)
ec - editing context to retrieve the value intokey - key to be used to retrieve value from map.
public static Map map()
public static void reset()
public static boolean wasInheritedFromParentThread()
public static void setProblematicTypes(NSSet<Class<?>> problematicTypes)
problematicTypes - a set of classes to checkpublic static Set<Class<?>> problematicTypes()
public static void setProblematicKeys(Set<String> problematicKeys)
problematicKeys - a set of keys to checkpublic static Set<String> problematicKeys()
|
Last updated: Fri, Jan 9, 2009 04:35 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||