Package io.servicetalk.log4j2.mdc.utils
Class ServiceTalkThreadContextMap
- java.lang.Object
-
- io.servicetalk.log4j2.mdc.utils.ServiceTalkThreadContextMap
-
- All Implemented Interfaces:
org.apache.logging.log4j.spi.CleanableThreadContextMap,org.apache.logging.log4j.spi.ReadOnlyThreadContextMap,org.apache.logging.log4j.spi.ThreadContextMap,org.apache.logging.log4j.spi.ThreadContextMap2
- Direct Known Subclasses:
DefaultServiceTalkThreadContextMap,ServiceTalkTracingThreadContextMap
public class ServiceTalkThreadContextMap extends java.lang.Object implements org.apache.logging.log4j.spi.ReadOnlyThreadContextMap, org.apache.logging.log4j.spi.CleanableThreadContextMapAThreadContextthat provides storage for MDC based uponAsyncContext.
-
-
Constructor Summary
Constructors Constructor Description ServiceTalkThreadContextMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.String key)java.lang.Stringget(java.lang.String key)java.util.Map<java.lang.String,java.lang.String>getCopy()protected java.util.Map<java.lang.String,java.lang.String>getCopyOrNull()java.util.Map<java.lang.String,java.lang.String>getImmutableMapOrNull()org.apache.logging.log4j.util.StringMapgetReadOnlyContextData()booleanisEmpty()voidput(java.lang.String key, java.lang.String value)voidputAll(java.util.Map<java.lang.String,java.lang.String> map)voidremove(java.lang.String key)voidremoveAll(java.lang.Iterable<java.lang.String> keys)
-
-
-
Method Detail
-
put
public final void put(java.lang.String key, java.lang.String value)- Specified by:
putin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
get
@Nullable public java.lang.String get(java.lang.String key)
- Specified by:
getin interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
getin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
remove
public final void remove(java.lang.String key)
- Specified by:
removein interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
clear
public final void clear()
- Specified by:
clearin interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
clearin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
containsKey
public boolean containsKey(java.lang.String key)
- Specified by:
containsKeyin interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
containsKeyin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
getCopy
public java.util.Map<java.lang.String,java.lang.String> getCopy()
- Specified by:
getCopyin interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
getCopyin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
getImmutableMapOrNull
@Nullable public java.util.Map<java.lang.String,java.lang.String> getImmutableMapOrNull()
- Specified by:
getImmutableMapOrNullin interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
getImmutableMapOrNullin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
isEmptyin interfaceorg.apache.logging.log4j.spi.ThreadContextMap
-
removeAll
public final void removeAll(java.lang.Iterable<java.lang.String> keys)
- Specified by:
removeAllin interfaceorg.apache.logging.log4j.spi.CleanableThreadContextMap
-
putAll
public final void putAll(java.util.Map<java.lang.String,java.lang.String> map)
- Specified by:
putAllin interfaceorg.apache.logging.log4j.spi.ThreadContextMap2
-
getReadOnlyContextData
public org.apache.logging.log4j.util.StringMap getReadOnlyContextData()
- Specified by:
getReadOnlyContextDatain interfaceorg.apache.logging.log4j.spi.ReadOnlyThreadContextMap- Specified by:
getReadOnlyContextDatain interfaceorg.apache.logging.log4j.spi.ThreadContextMap2
-
getCopyOrNull
@Nullable protected java.util.Map<java.lang.String,java.lang.String> getCopyOrNull()
-
-