Interface MDCAdapter
-
- All Known Implementing Classes:
CoffeeMDCAdapter,JbossMDCAdapter,Slf4jMDCAdapter
public interface MDCAdapterMDC Adapter interface for wrapping different MDC implementations- Since:
- 1.1.0
- Author:
- mark.petrenyi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the underlying MDC implementation.Stringget(String key)Gets value for key ornullfrom underlying MDC implementation.Map<String,String>getMap()Returns the diagnostic context map from the underlying MDC implementation.voidput(String key, String val)Puts value into underlying MDC implementation.voidremove(String key)Removes the value for key from the underlying MDC implementation.
-
-
-
Method Detail
-
put
void put(String key, String val)
Puts value into underlying MDC implementation.- Parameters:
key- MDC lookup key fro the valueval- the value
-
get
String get(String key)
Gets value for key ornullfrom underlying MDC implementation.- Parameters:
key- MDC lookup key- Returns:
- the value or
null
-
remove
void remove(String key)
Removes the value for key from the underlying MDC implementation.- Parameters:
key- MDC lookup key
-
getMap
Map<String,String> getMap()
Returns the diagnostic context map from the underlying MDC implementation.- Returns:
- the MDC map
-
clear
void clear()
Clears the underlying MDC implementation.
-
-