Interface MDCProvider


  • public interface MDCProvider
    • Method Detail

      • get

        String get​(String key)
        Get the value for a key, or null if there is no mapping.
        Parameters:
        key - the key
        Returns:
        the value
      • getObject

        Object getObject​(String key)
        Get the value for a key, or null if there is no mapping.
        Parameters:
        key - the key
        Returns:
        the value
      • put

        String put​(String key,
                   String value)
        Set the value of a key, returning the old value (if any) or null if there was none.
        Parameters:
        key - the key
        value - the new value
        Returns:
        the old value or null if there was none
      • putObject

        Object putObject​(String key,
                         Object value)
        Set the value of a key, returning the old value (if any) or null if there was none.
        Parameters:
        key - the key
        value - the new value
        Returns:
        the old value or null if there was none
      • remove

        String remove​(String key)
        Remove a key.
        Parameters:
        key - the key
        Returns:
        the old value or null if there was none
      • removeObject

        Object removeObject​(String key)
        Remove a key.
        Parameters:
        key - the key
        Returns:
        the old value or null if there was none
      • copy

        Map<String,​String> copy()
        Get a copy of the MDC map. This is a relatively expensive operation.
        Returns:
        a copy of the map
      • copyObject

        Map<String,​Object> copyObject()
        Get a copy of the MDC map. This is a relatively expensive operation.
        Returns:
        a copy of the map
      • isEmpty

        boolean isEmpty()
        Returns true if the backing MDC map is empty, otherwise false.
        Returns:
        true if the MDC map is empty
      • clear

        void clear()
        Clear the current MDC map.