org.apache.logging.log4j.ThreadContext .
ThreadContextMap implementations that also implement this interface can be accessed
by applications via the ThreadContext#getThreadContextMap() method.
ThreadContext#getThreadContextMap()
| 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 StringMap | Returns: aStringMap containing context data key-value pairsReturns the context data for reading. |
| public boolean |
| 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 | |
| getReadOnlyContextData | back to summary |
|---|---|
| public StringMap getReadOnlyContextData() Returns the context data for reading. Note that regardless of whether the returned context data has been frozen (made read-only) or not, callers should not attempt to modify the returned data structure. Thread safety note:
If this
Otherwise, if this
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the Map is empty.
| |