Hystrix: Latency and Fault Tolerance for Distributed Systems



com.netflix.hystrix.strategy.concurrency
Class HystrixContextScheduler

java.lang.Object
  extended by rx.Scheduler
      extended by com.netflix.hystrix.strategy.concurrency.HystrixContextScheduler

public class HystrixContextScheduler
extends rx.Scheduler

Wrap a Scheduler so that scheduled actions are wrapped with HystrixContextFunc2 so that the HystrixRequestContext is properly copied across threads (if they are used by the Scheduler).


Constructor Summary
HystrixContextScheduler(HystrixConcurrencyStrategy concurrencyStrategy, rx.Scheduler scheduler)
           
 
Method Summary
<T> rx.Subscription
schedule(T state, rx.util.functions.Func2<? super rx.Scheduler,? super T,? extends rx.Subscription> action)
           
<T> rx.Subscription
schedule(T state, rx.util.functions.Func2<? super rx.Scheduler,? super T,? extends rx.Subscription> action, long delayTime, java.util.concurrent.TimeUnit unit)
           
 
Methods inherited from class rx.Scheduler
degreeOfParallelism, now, schedule, schedule, schedule, schedule, schedulePeriodically, schedulePeriodically
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HystrixContextScheduler

public HystrixContextScheduler(HystrixConcurrencyStrategy concurrencyStrategy,
                               rx.Scheduler scheduler)
Method Detail

schedule

public <T> rx.Subscription schedule(T state,
                                    rx.util.functions.Func2<? super rx.Scheduler,? super T,? extends rx.Subscription> action)
Specified by:
schedule in class rx.Scheduler

schedule

public <T> rx.Subscription schedule(T state,
                                    rx.util.functions.Func2<? super rx.Scheduler,? super T,? extends rx.Subscription> action,
                                    long delayTime,
                                    java.util.concurrent.TimeUnit unit)
Specified by:
schedule in class rx.Scheduler