public final class MDC extends Object
Modifier and Type | Method | Description |
---|---|---|
static void |
clear() |
Clears the message diagnostics context.
|
static Object |
get(String key) |
Returns the value for the key or
null if no value was found. |
static Map<String,Object> |
getMap() |
Returns the map from the context.
|
static Object |
put(String key,
Object val) |
Puts the value onto the context.
|
static void |
remove(String key) |
Removes the value from the context.
|
public static Object put(String key, Object val)
key
- the key for the valueval
- the valuenull
if no value was setpublic static Object get(String key)
null
if no value was found.key
- the key to lookup the value fornull
if not foundpublic static void remove(String key)
key
- the key of the value to removepublic static Map<String,Object> getMap()
Note that in most implementations this is an expensive operation and should be used sparingly.
null
public static void clear()
Copyright © 2019 JBoss by Red Hat. All rights reserved.