Top Description Methods
org.apache.logging.log4j.spi

public Interface ObjectThreadContextMap

extends CleanableThreadContextMap
Known Direct Implementers
org.apache.logging.log4j.spi.CopyOnWriteSortedArrayThreadContextMap, org.apache.logging.log4j.spi.GarbageFreeSortedArrayThreadContextMap
Imports
java.util.Map

Extension service provider interface to allow putting Object values in the org.apache.logging.log4j.ThreadContext.
Since
2.8
See Also
ThreadContextMap

Method Summary

Modifier and TypeMethod and Description
public <V> V

Returns:

the value for the specified key or null
getValue
(String
the key whose value to return
key
)

Returns the Object value for the specified key, or null if the specified key does not exist in this collection.

public <V> void
putAllValues(Map<String, V>
the map of key-value pairs to add
values
)

Puts all given key-value pairs into the collection.

public <V> void
putValue(String
the key to add or remove. Keys may be null.
key
,
V
the value to add. Values may be null.
value
)

Puts the specified key-value pair into the collection.

Inherited from org.apache.logging.log4j.spi.CleanableThreadContextMap:
removeAll

Method Detail

getValueback to summary
public <V> V getValue(String key)

Returns the Object value for the specified key, or null if the specified key does not exist in this collection.

Parameters
key:String

the key whose value to return

Returns:V

the value for the specified key or null

putAllValuesback to summary
public <V> void putAllValues(Map<String, V> values)

Puts all given key-value pairs into the collection.

Parameters
values:Map<String, V>

the map of key-value pairs to add

putValueback to summary
public <V> void putValue(String key, V value)

Puts the specified key-value pair into the collection.

Parameters
key:String

the key to add or remove. Keys may be null.

value:V

the value to add. Values may be null.