Package org.jboss.logmanager
Interface MDCProvider
-
public interface MDCProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clear the current MDC map.Map<String,String>
copy()
Get a copy of the MDC map.Map<String,Object>
copyObject()
Get a copy of the MDC map.String
get(String key)
Get the value for a key, ornull
if there is no mapping.Object
getObject(String key)
Get the value for a key, ornull
if there is no mapping.boolean
isEmpty()
Returnstrue
if the backing MDC map is empty, otherwisefalse
.String
put(String key, String value)
Set the value of a key, returning the old value (if any) ornull
if there was none.Object
putObject(String key, Object value)
Set the value of a key, returning the old value (if any) ornull
if there was none.String
remove(String key)
Remove a key.Object
removeObject(String key)
Remove a key.
-
-
-
Method Detail
-
get
String get(String key)
Get the value for a key, ornull
if there is no mapping.- Parameters:
key
- the key- Returns:
- the value
-
getObject
Object getObject(String key)
Get the value for a key, ornull
if there is no mapping.- Parameters:
key
- the key- Returns:
- the value
-
put
String put(String key, String value)
Set the value of a key, returning the old value (if any) ornull
if there was none.- Parameters:
key
- the keyvalue
- the new value- Returns:
- the old value or
null
if there was none
-
putObject
Object putObject(String key, Object value)
Set the value of a key, returning the old value (if any) ornull
if there was none.- Parameters:
key
- the keyvalue
- the new value- Returns:
- the old value or
null
if there was none
-
remove
String remove(String key)
Remove a key.- Parameters:
key
- the key- Returns:
- the old value or
null
if there was none
-
removeObject
Object removeObject(String key)
Remove a key.- Parameters:
key
- the key- Returns:
- the old value or
null
if there was none
-
copy
Map<String,String> copy()
Get a copy of the MDC map. This is a relatively expensive operation.- Returns:
- a copy of the map
-
copyObject
Map<String,Object> copyObject()
Get a copy of the MDC map. This is a relatively expensive operation.- Returns:
- a copy of the map
-
isEmpty
boolean isEmpty()
Returnstrue
if the backing MDC map is empty, otherwisefalse
.- Returns:
true
if the MDC map is empty
-
clear
void clear()
Clear the current MDC map.
-
-