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 Object implements org.apache.logging.log4j.spi.ReadOnlyThreadContextMap, org.apache.logging.log4j.spi.CleanableThreadContextMap
A ThreadContext that provides storage for MDC based upon AsyncContext.
  • Constructor Details

    • ServiceTalkThreadContextMap

      public ServiceTalkThreadContextMap()
  • Method Details

    • put

      public final void put(String key, String value)
      Specified by:
      put in interface org.apache.logging.log4j.spi.ThreadContextMap
    • get

      @Nullable public String get(String key)
      Specified by:
      get in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      get in interface org.apache.logging.log4j.spi.ThreadContextMap
    • remove

      public final void remove(String key)
      Specified by:
      remove in interface org.apache.logging.log4j.spi.ThreadContextMap
    • clear

      public final void clear()
      Specified by:
      clear in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      clear in interface org.apache.logging.log4j.spi.ThreadContextMap
    • containsKey

      public boolean containsKey(String key)
      Specified by:
      containsKey in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      containsKey in interface org.apache.logging.log4j.spi.ThreadContextMap
    • getCopy

      public Map<String,String> getCopy()
      Specified by:
      getCopy in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      getCopy in interface org.apache.logging.log4j.spi.ThreadContextMap
    • getImmutableMapOrNull

      @Nullable public Map<String,String> getImmutableMapOrNull()
      Specified by:
      getImmutableMapOrNull in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      getImmutableMapOrNull in interface org.apache.logging.log4j.spi.ThreadContextMap
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      isEmpty in interface org.apache.logging.log4j.spi.ThreadContextMap
    • removeAll

      public final void removeAll(Iterable<String> keys)
      Specified by:
      removeAll in interface org.apache.logging.log4j.spi.CleanableThreadContextMap
    • putAll

      public final void putAll(Map<String,String> map)
      Specified by:
      putAll in interface org.apache.logging.log4j.spi.ThreadContextMap2
    • getReadOnlyContextData

      public org.apache.logging.log4j.util.StringMap getReadOnlyContextData()
      Specified by:
      getReadOnlyContextData in interface org.apache.logging.log4j.spi.ReadOnlyThreadContextMap
      Specified by:
      getReadOnlyContextData in interface org.apache.logging.log4j.spi.ThreadContextMap2
    • getCopyOrNull

      @Nullable protected Map<String,String> getCopyOrNull()