public static HystrixRequestContext InitializeContext()
        {
            HystrixRequestContext requestContext = new HystrixRequestContext();

            requestContexts.Value = requestContext;
            return(requestContext);
        }
        public T Call()
        {
            HystrixRequestContext existingState = HystrixRequestContext.ContextForCurrentThread;

            try
            {
                HystrixRequestContext.ContextForCurrentThread = this.parentThreadState;
                return(this.actual.Call());
            }
            finally
            {
                HystrixRequestContext.ContextForCurrentThread = existingState;
            }
        }
Beispiel #3
0
        public void Run()
        {
            HystrixRequestContext existingState = HystrixRequestContext.ContextForCurrentThread;

            try
            {
                HystrixRequestContext.ContextForCurrentThread = this.parentThreadState;
                this.actual.Run();
            }
            finally
            {
                HystrixRequestContext.ContextForCurrentThread = existingState;
            }
        }
 public static HystrixRequestContext InitializeContext()
 {
     HystrixRequestContext requestContext = new HystrixRequestContext();
     requestContexts.Value = requestContext;
     return requestContext;
 }
 public HystrixContextCallable(ICallable <T> actual)
 {
     this.actual            = actual;
     this.parentThreadState = HystrixRequestContext.ContextForCurrentThread;
 }
Beispiel #6
0
 public HystrixContextRunnable(IRunnable actual)
 {
     this.actual            = actual;
     this.parentThreadState = HystrixRequestContext.ContextForCurrentThread;
 }
 public HystrixContextRunnable(IRunnable actual)
 {
     this.actual = actual;
     this.parentThreadState = HystrixRequestContext.ContextForCurrentThread;
 }