removeCurrentContext
to unbind context from the thread.
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadLocal | |
| private Hashtable | |
| private final ContextMap | |
| private transient boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | bind(final ContextMap
the context map (may be null) context)Bind a particular ContextMap to current thread. |
| private void | |
| public void | |
| public Object | |
| public Object | |
| public static ContextMap | |
| public static ContextMap | Returns: the current ContextMaptrue if a ContextMap is to be created if it doesn't exist autocreate)Get current ContextMap. |
| public int | |
| public boolean | Returns: true if Context is read only, false otherwiseDetermine if context is read-only. |
| public void | |
| private Object | Returns: the corrected object versionHelper method that sets context to read-only after de-serialization. |
| public static void | |
| public void |
| c_localContext | back to summary |
|---|---|
| private static final ThreadLocal<T> c_localContext | |
| m_map | back to summary |
|---|---|
| private Hashtable<K, V> m_map | |
| m_parent | back to summary |
|---|---|
| private final ContextMap m_parent | |
| m_readOnly | back to summary |
|---|---|
| private transient boolean m_readOnly | |
| ContextMap | back to summary |
|---|---|
| public ContextMap() Default constructor. | |
| ContextMap | back to summary |
|---|---|
| public ContextMap(final ContextMap parent) Constructor that sets parent contextMap.
| |
| bind | back to summary |
|---|---|
| public static void bind(final ContextMap context) Bind a particular ContextMap to current thread.
| |
| checkReadable | back to summary |
|---|---|
| private void checkReadable() Utility method to verify that Context is read-only. | |
| clear | back to summary |
|---|---|
| public void clear() Empty the context map. | |
| get | back to summary |
|---|---|
| public Object get(final String key, final Object defaultObject) Get an entry from the context. | |
| get | back to summary |
|---|---|
| public Object get(final String key) Get an entry from the context. | |
| getCurrentContext | back to summary |
|---|---|
| public static ContextMap getCurrentContext() Get current ContextMap. This method returns a ContextMap associated with current thread. If the thread doesn't have a ContextMap associated with it then a new ContextMap is created.
| |
| getCurrentContext | back to summary |
|---|---|
| public static ContextMap getCurrentContext(final boolean autocreate) Get current ContextMap. This method returns a ContextMap associated with current thread. If the thread doesn't have a ContextMap associated with it and autocreate is true then a new ContextMap is created.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Get the number of contexts in map.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Determine if context is read-only.
| |
| makeReadOnly | back to summary |
|---|---|
| public void makeReadOnly() Make the context read-only. This makes it safe to allow untrusted code reference to ContextMap. | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Helper method that sets context to read-only after de-serialization.
| |
| removeCurrentContext | back to summary |
|---|---|
| public static void removeCurrentContext() Remove current ContextMap. This method removes a ContextMap associated with current thread, if there is any. | |
| set | back to summary |
|---|---|
| public void set(final String key, final Object value) Set a value in context | |