Hystrix代码跟踪
2022-04-12 22:10:22 10 举报
登录查看完整内容
Hystrix代码跟踪
作者其他创作
大纲/内容
applyHystrixSemantics.call()
toObservable()
executeCommandAndObserve()
主线程
getExecutionObservable
circuitBreaker.attemptExecution()判断断路器是否通过?
信号量不足
get()
new HystrixCommand<T>()
getFallBack()
no:执行快速失败
toFuture()
getUserExecutionObservable()准备执行业务方法
executeCommandWithSpecifiedIsolation()验证线程池模式
yes:requestCache.get(cacheKey);
toBlocking()
execute()
getExecutionSemaphore()executionSemaphore.tryAcquire()验证信号量
requestCacheEnabled是否缓存有值?
queue()
run()
Observable.just(run());
Future
no
![Hystrix代码跟踪](https://www.processon.com/chart_image/template/thumb/625552e2f346fb07000013e6.png?tid=625552e2f346fb07000013e4)
收藏
![Saas架构服务发展迭代方向](https://www.processon.com/chart_image/template/thumb/6204ca855653bb06de26ab60.png?tid=6204ca855653bb06de26ab5d)
收藏
0 条评论
回复 删除
下一页