public class PaxContext extends Object
InheritableThreadLocal child inherits the same references). That behavior can be switched
off by setting the system property org.ops4j.pax.logging.threadContextMapInheritable to
false (default is true).
The MDC class requires JDK 1.2 or above. Under JDK 1.1 the MDC will always return empty
values but otherwise will not affect or harm your application.| Constructor and Description |
|---|
PaxContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears entire thread-bound MDC context.
|
Object |
get(String key)
Gets a value from this thread-bound MDC context.
|
Map<String,Object> |
getContext()
Gets full map of values related to this thread-bound MDC context.
|
Map<String,Object> |
getCopyOfContextMap()
Gets a copy of full map of calues related to this thread-bound MDC context.
|
void |
put(String key,
Object o)
Sets single value in this thread-bound MDC context.
|
void |
putAll(Map<String,Object> context)
Sets all values from passed map in this thread-bound MDC context.
|
void |
remove(String key)
Removes a value from this thread-bound MDC context.
|
void |
setContextMap(Map<String,Object> contextMap)
Sets all values from passed map in this thread-bound MDC context.
|
public void putAll(Map<String,Object> context)
context - public void put(String key, Object o)
key - o - public Object get(String key)
key - public void remove(String key)
key - public Map<String,Object> getContext()
public Map<String,Object> getCopyOfContextMap()
public void clear()
Copyright © 2006–2023 OPS4J - Open Participation Software for Java. All rights reserved.