Package liquibase.logging.mdc
Class NoOpMdcManager
- java.lang.Object
-
- liquibase.logging.mdc.NoOpMdcManager
-
- All Implemented Interfaces:
MdcManager
,Plugin
public class NoOpMdcManager extends Object implements MdcManager
Default MDC manager, which does nothing.
-
-
Field Summary
-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Constructor Summary
Constructors Constructor Description NoOpMdcManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the MDC.Map<String,Object>
getAll()
int
getPriority()
MdcObject
put(String key, String value)
Puts a context value (thevalue
parameter) as identified with thekey
parameter into the MDC.MdcObject
put(String key, String value, boolean removeWhenScopeExits)
Puts a context value (thevalue
parameter) as identified with thekey
parameter into the MDC.MdcObject
put(String key, List<? extends CustomMdcObject> values)
Puts a context value (thevalues
parameter) as identified with thekey
parameter into the MDC.MdcObject
put(String key, Map<String,Object> values)
Puts a context value (thevalues
parameter) as identified with thekey
parameter into the MDC.MdcObject
put(String key, Map<String,Object> values, boolean removeWhenScopeExits)
Puts a context value (thevalues
parameter) as identified with thekey
parameter into the MDC.MdcObject
put(String key, CustomMdcObject customMdcObject)
Puts a context value (thecustomMdcObject
parameter) as identified with thekey
parameter into the MDC.MdcObject
put(String key, CustomMdcObject customMdcObject, boolean removeWhenScopeExits)
Puts a context value (thecustomMdcObject
parameter) as identified with thekey
parameter into the MDC.void
remove(String key)
Removes the context value identified by thekey
parameter.
-
-
-
Method Detail
-
put
public MdcObject put(String key, String value)
Description copied from interface:MdcManager
Puts a context value (thevalue
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
-
put
public MdcObject put(String key, String value, boolean removeWhenScopeExits)
Description copied from interface:MdcManager
Puts a context value (thevalue
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
removeWhenScopeExits
- if true, this key value pair will be automatically removed from the MDC when this scope exits. If there is not a demonstrable reason for setting this parameter to false then it should be set to true.
-
put
public MdcObject put(String key, Map<String,Object> values)
Description copied from interface:MdcManager
Puts a context value (thevalues
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
-
put
public MdcObject put(String key, Map<String,Object> values, boolean removeWhenScopeExits)
Description copied from interface:MdcManager
Puts a context value (thevalues
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
removeWhenScopeExits
- if true, this key value pair will be automatically removed from the MDC when this scope exits. If there is not a demonstrable reason for setting this parameter to false then it should be set to true.
-
put
public MdcObject put(String key, List<? extends CustomMdcObject> values)
Description copied from interface:MdcManager
Puts a context value (thevalues
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
-
put
public MdcObject put(String key, CustomMdcObject customMdcObject)
Description copied from interface:MdcManager
Puts a context value (thecustomMdcObject
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
-
put
public MdcObject put(String key, CustomMdcObject customMdcObject, boolean removeWhenScopeExits)
Description copied from interface:MdcManager
Puts a context value (thecustomMdcObject
parameter) as identified with thekey
parameter into the MDC. The caller is responsible for cleaning up this entry at an appropriate time.- Specified by:
put
in interfaceMdcManager
removeWhenScopeExits
- if true, this key value pair will be automatically removed from the MDC when this scope exits. If there is not a demonstrable reason for setting this parameter to false then it should be set to true.
-
remove
public void remove(String key)
Description copied from interface:MdcManager
Removes the context value identified by thekey
parameter.- Specified by:
remove
in interfaceMdcManager
-
clear
public void clear()
Description copied from interface:MdcManager
Clear the MDC.- Specified by:
clear
in interfaceMdcManager
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfaceMdcManager
-
getAll
public Map<String,Object> getAll()
- Specified by:
getAll
in interfaceMdcManager
-
-