public class ThreadContextDataInjector extends Object
ThreadContextDataInjector contains a number of strategies for copying key-value pairs from the various
ThreadContext map implementations into a StringMap. In the case of duplicate keys,
thread context values overwrite configuration Property values.
These are the default ContextDataInjector objects returned by the ContextDataInjectorFactory.
ThreadContext,
Property,
ReadOnlyStringMap,
ContextDataInjector,
ContextDataInjectorFactory| Modifier and Type | Class | Description |
|---|---|---|
static class |
ThreadContextDataInjector.ForCopyOnWriteThreadContextMap |
The
ContextDataInjector used when the ThreadContextMap implementation is a copy-on-write
StringMap-based data structure. |
static class |
ThreadContextDataInjector.ForDefaultThreadContextMap |
Default
ContextDataInjector for the legacy Map<String, String>-based ThreadContext (which is
also the ThreadContext implementation used for web applications). |
static class |
ThreadContextDataInjector.ForGarbageFreeThreadContextMap |
The
ContextDataInjector used when the ThreadContextMap implementation is a garbage-free
StringMap-based data structure. |
| Constructor | Description |
|---|---|
ThreadContextDataInjector() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
copyProperties(List<Property> properties,
StringMap result) |
Copies key-value pairs from the specified property list into the specified
StringMap. |
public static void copyProperties(List<Property> properties, StringMap result)
StringMap.properties - list of configuration properties, may be nullresult - the StringMap object to add the key-values to. Must be non-null.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.