public final class MDC
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
MDC.Holder |
Modifier and Type | Field and Description |
---|---|
private static MDC.Holder |
mdc |
Modifier | Constructor and Description |
---|---|
private |
MDC() |
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Clear the current MDC map.
|
static java.util.Map<java.lang.String,java.lang.String> |
copy()
Get a copy of the MDC map.
|
static java.util.Map<java.lang.String,java.lang.Object> |
copyObject()
Get a copy of the MDC map.
|
(package private) static FastCopyHashMap<java.lang.String,java.lang.String> |
fastCopy() |
(package private) static FastCopyHashMap<java.lang.String,java.lang.Object> |
fastCopyObject() |
static java.lang.String |
get(java.lang.String key)
Get the value for a key, or
null if there is no mapping. |
static java.lang.Object |
getObject(java.lang.String key)
Get the value for a key, or
null if there is no mapping. |
static java.lang.String |
put(java.lang.String key,
java.lang.String value)
Set the value of a key, returning the old value (if any) or
null if there was none. |
static java.lang.Object |
putObject(java.lang.String key,
java.lang.Object value)
Set the value of a key, returning the old value (if any) or
null if there was none. |
static java.lang.String |
remove(java.lang.String key)
Remove a key.
|
static java.lang.Object |
removeObject(java.lang.String key)
Remove a key.
|
private static final MDC.Holder mdc
public static java.lang.String get(java.lang.String key)
null
if there is no mapping.key
- the keypublic static java.lang.Object getObject(java.lang.String key)
null
if there is no mapping.key
- the keypublic static java.lang.String put(java.lang.String key, java.lang.String value)
null
if there was none.key
- the keyvalue
- the new valuenull
if there was nonepublic static java.lang.Object putObject(java.lang.String key, java.lang.Object value)
null
if there was none.key
- the keyvalue
- the new valuenull
if there was nonepublic static java.lang.String remove(java.lang.String key)
key
- the keynull
if there was nonepublic static java.lang.Object removeObject(java.lang.String key)
key
- the keynull
if there was nonepublic static java.util.Map<java.lang.String,java.lang.String> copy()
static FastCopyHashMap<java.lang.String,java.lang.String> fastCopy()
public static java.util.Map<java.lang.String,java.lang.Object> copyObject()
static FastCopyHashMap<java.lang.String,java.lang.Object> fastCopyObject()
public static void clear()