public final class MDC
extends java.lang.Object
Modifier and Type | Method | 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.
|
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.
|
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()
public static java.util.Map<java.lang.String,java.lang.Object> copyObject()
public static void clear()
Copyright © 2018. All rights reserved.