public class ServiceTalkThreadContextMap
extends java.lang.Object
implements org.apache.logging.log4j.spi.ReadOnlyThreadContextMap, org.apache.logging.log4j.spi.CleanableThreadContextMap
ThreadContext
that provides storage for MDC based upon AsyncContext
.Constructor and Description |
---|
ServiceTalkThreadContextMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.String key) |
java.lang.String |
get(java.lang.String key) |
java.util.Map<java.lang.String,java.lang.String> |
getCopy() |
protected java.util.Map<java.lang.String,java.lang.String> |
getCopy(java.util.Map<java.lang.String,java.lang.String> storage)
Get a copy of this
ThreadContextMap given the underlying Map storage. |
java.util.Map<java.lang.String,java.lang.String> |
getImmutableMapOrNull() |
protected java.util.Map<java.lang.String,java.lang.String> |
getImmutableMapOrNull(java.util.Map<java.lang.String,java.lang.String> storage)
Provide the implementation for
getImmutableMapOrNull() given then underlying Map storage. |
org.apache.logging.log4j.util.StringMap |
getReadOnlyContextData() |
protected org.apache.logging.log4j.util.StringMap |
getReadOnlyContextData(java.util.Map<java.lang.String,java.lang.String> storage)
Create a new read-only
StringMap . |
boolean |
isEmpty() |
void |
put(java.lang.String key,
java.lang.String value) |
void |
putAll(java.util.Map<java.lang.String,java.lang.String> map) |
void |
remove(java.lang.String key) |
void |
removeAll(java.lang.Iterable<java.lang.String> keys) |
public final void put(java.lang.String key, java.lang.String value)
put
in interface org.apache.logging.log4j.spi.ThreadContextMap
@Nullable public java.lang.String get(java.lang.String key)
get
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
get
in interface org.apache.logging.log4j.spi.ThreadContextMap
public final void remove(java.lang.String key)
remove
in interface org.apache.logging.log4j.spi.ThreadContextMap
public final void clear()
clear
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
clear
in interface org.apache.logging.log4j.spi.ThreadContextMap
public boolean containsKey(java.lang.String key)
containsKey
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
containsKey
in interface org.apache.logging.log4j.spi.ThreadContextMap
public java.util.Map<java.lang.String,java.lang.String> getCopy()
getCopy
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
getCopy
in interface org.apache.logging.log4j.spi.ThreadContextMap
protected java.util.Map<java.lang.String,java.lang.String> getCopy(java.util.Map<java.lang.String,java.lang.String> storage)
ThreadContextMap
given the underlying Map
storage.storage
- the underlying Map
storage.ThreadContextMap
.@Nullable public final java.util.Map<java.lang.String,java.lang.String> getImmutableMapOrNull()
getImmutableMapOrNull
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
getImmutableMapOrNull
in interface org.apache.logging.log4j.spi.ThreadContextMap
@Nullable protected java.util.Map<java.lang.String,java.lang.String> getImmutableMapOrNull(java.util.Map<java.lang.String,java.lang.String> storage)
getImmutableMapOrNull()
given then underlying Map
storage.storage
- the underlying Map
storage.Map
or null
if empty.public boolean isEmpty()
isEmpty
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
isEmpty
in interface org.apache.logging.log4j.spi.ThreadContextMap
public final void removeAll(java.lang.Iterable<java.lang.String> keys)
removeAll
in interface org.apache.logging.log4j.spi.CleanableThreadContextMap
public final void putAll(java.util.Map<java.lang.String,java.lang.String> map)
putAll
in interface org.apache.logging.log4j.spi.ThreadContextMap2
public final org.apache.logging.log4j.util.StringMap getReadOnlyContextData()
getReadOnlyContextData
in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
getReadOnlyContextData
in interface org.apache.logging.log4j.spi.ThreadContextMap2
protected org.apache.logging.log4j.util.StringMap getReadOnlyContextData(java.util.Map<java.lang.String,java.lang.String> storage)
StringMap
.storage
- The underlying storage for this ThreadContextMap
.StringMap
.