Package org.jboss.logmanager
Interface MDCProvider
-
public interface MDCProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()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.Stringget(String key)Get the value for a key, ornullif there is no mapping.ObjectgetObject(String key)Get the value for a key, ornullif there is no mapping.Stringput(String key, String value)Set the value of a key, returning the old value (if any) ornullif there was none.ObjectputObject(String key, Object value)Set the value of a key, returning the old value (if any) ornullif there was none.Stringremove(String key)Remove a key.ObjectremoveObject(String key)Remove a key.
-
-
-
Method Detail
-
get
String get(String key)
Get the value for a key, ornullif there is no mapping.- Parameters:
key- the key- Returns:
- the value
-
getObject
Object getObject(String key)
Get the value for a key, ornullif 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) ornullif there was none.- Parameters:
key- the keyvalue- the new value- Returns:
- the old value or
nullif there was none
-
putObject
Object putObject(String key, Object value)
Set the value of a key, returning the old value (if any) ornullif there was none.- Parameters:
key- the keyvalue- the new value- Returns:
- the old value or
nullif there was none
-
remove
String remove(String key)
Remove a key.- Parameters:
key- the key- Returns:
- the old value or
nullif there was none
-
removeObject
Object removeObject(String key)
Remove a key.- Parameters:
key- the key- Returns:
- the old value or
nullif 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
-
clear
void clear()
Clear the current MDC map.
-
-