org.apache.logging.log4j.ThreadContext .
Since 2.8, ThreadContextMap implementations that implement the ReadOnlyThreadContextMap interface
are accessible to applications via the ThreadContext#getThreadContextMap() method.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: True if the key is in the context, false otherwise.The key to locate. key)Determines if the key is in the context. |
| public String | |
| public Map | Returns: a mutable copy of the context.Gets a non- |
| public Map | Returns: an immutable context Map ornull.Returns an immutable view on the context Map or |
| public boolean | |
| public void | |
| public void |
| clear | back to summary |
|---|---|
| public void clear() Clears the context. | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(final String key) Determines if the key is in the context.
| |
| get | back to summary |
|---|---|
| public String get(final String key) Gets the context identified by the This method has no side effects. | |
| getCopy | back to summary |
|---|---|
| public Map Gets a non- | |
| getImmutableMapOrNull | back to summary |
|---|---|
| public Map Returns an immutable view on the context Map or | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the Map is empty.
| |
| put | back to summary |
|---|---|
| public void put(final String key, final String value) Puts a context value (the If the current thread does not have a context map it is created as a side effect. | |
| remove | back to summary |
|---|---|
| public void remove(final String key) Removes the context identified by the
| |