Class MDCCallableAdapter<T>

  • All Implemented Interfaces:
    java.util.concurrent.Callable<T>

    public class MDCCallableAdapter<T>
    extends java.lang.Object
    implements java.util.concurrent.Callable<T>
    Restores the MDC context map for the target action.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map contextMap  
      private java.util.concurrent.Callable<T> target  
    • Constructor Summary

      Constructors 
      Constructor Description
      MDCCallableAdapter​(java.util.concurrent.Callable<T> target, java.util.Map contextMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T call()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • target

        private final java.util.concurrent.Callable<T> target
      • contextMap

        private final java.util.Map contextMap
    • Constructor Detail

      • MDCCallableAdapter

        public MDCCallableAdapter​(java.util.concurrent.Callable<T> target,
                                  java.util.Map contextMap)
    • Method Detail

      • call

        public T call()
               throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<T>
        Throws:
        java.lang.Exception