public final class MDC extends Object
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Clear the current MDC map.
|
static Map<String,String> |
copy()
Get a copy of the MDC map.
|
static Map<String,Object> |
copyObject()
Get a copy of the MDC map.
|
static String |
get(String key)
Get the value for a key, or
null if there is no mapping. |
static Object |
getObject(String key)
Get the value for a key, or
null if there is no mapping. |
static String |
put(String key,
String value)
Set the value of a key, returning the old value (if any) or
null if there was none. |
static Object |
putObject(String key,
Object value)
Set the value of a key, returning the old value (if any) or
null if there was none. |
static String |
remove(String key)
Remove a key.
|
static Object |
removeObject(String key)
Remove a key.
|
public static String get(String key)
null
if there is no mapping.key
- the keypublic static Object getObject(String key)
null
if there is no mapping.key
- the keypublic static String put(String key, String value)
null
if there was none.key
- the keyvalue
- the new valuenull
if there was nonepublic static Object putObject(String key, Object value)
null
if there was none.key
- the keyvalue
- the new valuenull
if there was nonepublic static String remove(String key)
key
- the keynull
if there was nonepublic static Object removeObject(String key)
key
- the keynull
if there was nonepublic static Map<String,String> copy()
public static Map<String,Object> copyObject()
public static void clear()
Copyright © 2017 JBoss by Red Hat. All rights reserved.