Top Methods
org.jboss.logmanager

public Interface MDCProvider

Known Direct Implementers
org.jboss.logmanager.ThreadLocalMDC
Imports
java.util.Map

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clear the current MDC map.

public Map<String, String>

Returns:

a copy of the map
copy
()

Get a copy of the MDC map.

public Map<String, Object>

Returns:

a copy of the map
copyObject
()

Get a copy of the MDC map.

public String

Returns:

the value
get
(String
the key
key
)

Get the value for a key, or null if there is no mapping.

public Object

Returns:

the value
getObject
(String
the key
key
)

Get the value for a key, or null if there is no mapping.

public boolean

Returns:

true if the MDC map is empty
isEmpty
()

Returns true if the backing MDC map is empty, otherwise false.

public String

Returns:

the old value or null if there was none
put
(String
the key
key
,
String
the new value
value
)

Set the value of a key, returning the old value (if any) or null if there was none.

public Object

Returns:

the old value or null if there was none
putObject
(String
the key
key
,
Object
the new value
value
)

Set the value of a key, returning the old value (if any) or null if there was none.

public String

Returns:

the old value or null if there was none
remove
(String
the key
key
)

Remove a key.

public Object

Returns:

the old value or null if there was none
removeObject
(String
the key
key
)

Remove a key.

Method Detail

clearback to summary
public void clear()

Clear the current MDC map.

copyback to summary
public Map<String, String> copy()

Get a copy of the MDC map. This is a relatively expensive operation.

Returns:Map<String, String>

a copy of the map

copyObjectback to summary
public Map<String, Object> copyObject()

Get a copy of the MDC map. This is a relatively expensive operation.

Returns:Map<String, Object>

a copy of the map

getback to summary
public String get(String key)

Get the value for a key, or null if there is no mapping.

Parameters
key:String

the key

Returns:String

the value

getObjectback to summary
public Object getObject(String key)

Get the value for a key, or null if there is no mapping.

Parameters
key:String

the key

Returns:Object

the value

isEmptyback to summary
public boolean isEmpty()

Returns true if the backing MDC map is empty, otherwise false.

Returns:boolean

true if the MDC map is empty

putback to summary
public String put(String key, String value)

Set the value of a key, returning the old value (if any) or null if there was none.

Parameters
key:String

the key

value:String

the new value

Returns:String

the old value or null if there was none

putObjectback to summary
public Object putObject(String key, Object value)

Set the value of a key, returning the old value (if any) or null if there was none.

Parameters
key:String

the key

value:Object

the new value

Returns:Object

the old value or null if there was none

removeback to summary
public String remove(String key)

Remove a key.

Parameters
key:String

the key

Returns:String

the old value or null if there was none

removeObjectback to summary
public Object removeObject(String key)

Remove a key.

Parameters
key:String

the key

Returns:Object

the old value or null if there was none