Class ThreadContextMDCMap

  • All Implemented Interfaces:
    org.apache.logging.log4j.spi.ThreadContextMap

    public class ThreadContextMDCMap
    extends Object
    implements org.apache.logging.log4j.spi.ThreadContextMap
    A ThreadContextMap implementation which delegates to MDC.
    Author:
    James R. Perkins
    • Constructor Detail

      • ThreadContextMDCMap

        public ThreadContextMDCMap()
    • Method Detail

      • clear

        public void clear()
        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.ThreadContextMap
      • get

        public String get​(String key)
        Specified by:
        get in interface org.apache.logging.log4j.spi.ThreadContextMap
      • getCopy

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

        public Map<String,​String> getImmutableMapOrNull()
        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.ThreadContextMap
      • put

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

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