Package org.apache.logging.log4j.spi
Interface ThreadContextMap2
- All Superinterfaces:
ThreadContextMap
- All Known Subinterfaces:
CleanableThreadContextMap
,ObjectThreadContextMap
Extension service provider interface to implement additional custom MDC behavior for
ThreadContext
.
Consider implementing CleanableThreadContextMap
instead.- Since:
- 2.7
- See Also:
-
Method Summary
Methods inherited from interface org.apache.logging.log4j.spi.ThreadContextMap
clear, containsKey, get, getCopy, getImmutableMapOrNull, isEmpty, put, remove
-
Method Details
-
putAll
Puts all given context map entries into the current thread's context map.If the current thread does not have a context map it is created as a side effect.
- Parameters:
map
- The map.- Since:
- 2.7
-
getReadOnlyContextData
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.- Returns:
- the
StringMap
-