当前位置:网站首页>Circuitbreaker fuse of resilience4j - circuitbreakerregistry register
Circuitbreaker fuse of resilience4j - circuitbreakerregistry register
2022-06-12 10:11:00 【Wang Rushuang】
One : CircuitBreakerRegistry
from InMemoryCircuitBreakerRegistry Realization , Mainly responsible for their own creation and CircuitBreaker The creation of
Provides 8 Kind of establish CircuitBreakerRegistry Of of() Method ,8 Species creation CircuitBreaker Methods 
The previous article mentioned in CircuitBreakerConfiguration utilize @Bean establish CircuitBreakerRegistry Time to call InMemoryCircuitBreakerRegistry Of of Method ,of Method is called InMemoryCircuitBreakerRegistry Construction method of , The construction method will eventually CircuitBreakerConfig Put it in ConcurrentMap<String, C> configurations
Two : from CircuitBreakerRegistry In order to get CircuitBreaker
CircuitBreakerRegistry Also provided according to fuse name name obtain , Get all and so on CircuitBreaker
/** First get the fuse according to its name ( First call )
* If it doesn't exist , Just use "default" The default configuration creates fuses
* {@inheritDoc}
*/
@Override
public CircuitBreaker circuitBreaker(String name) {
return circuitBreaker(name, getDefaultConfig());
}
/**
* Obtain the fuse according to the name and configuration
* {@inheritDoc}
*/
@Override
public CircuitBreaker circuitBreaker(String name, CircuitBreakerConfig config) {
return circuitBreaker(name, config, HashMap.empty());
}
// establish circuitBreaker example
// If entryMap There's something called name Fuse , Get the fuse , If the fuse is not present , Just use config This configuration creates a new one named name Fuse of entryMap in , Then return
@Override
public CircuitBreaker circuitBreaker(String name, CircuitBreakerConfig config,
io.vavr.collection.Map<String, String> tags) {
return computeIfAbsent(name, () -> CircuitBreaker
.of(name, Objects.requireNonNull(config, CONFIG_MUST_NOT_BE_NULL), getAllTags(tags)));
}
summary
CircuitBreaker The biggest feature CircuitBreakerRegistry Mainly responsible for creating fuse instances
边栏推荐
- Auto. JS learning note 4: after autojs is packaged, most Huawei and other big brand mobile phones cannot be installed? This problem can be solved by using the simulator to remotely sign and package in
- 【ParquetEncodingException: empty fields are illegal, the field should be ommited completely instead
- Docker compose integrates redis, MySQL and microservices, and services are containerized
- Introduction to IOT
- C# break continue return 三者区别
- 2021-01-13
- C 语言仅凭自学能到什么高度?
- one
- C # getting started series (12) -- string
- [926. flip the string to monotonic increment]
猜你喜欢

Research progress of DNA digital information storage

MySQL VI Database lock

How high can C language reach by self-study alone?

JVM (III) Virtual machine performance monitoring & fault handling tool

MySQL optimized slow log query
![[preview of the open class of Jishu] arm's strongest MCU core cortex-m85 processor helps the innovation of the Internet of things in an all-round way (there is a lottery)](/img/25/c3af3f51c04865820e3bbe2f010098.png)
[preview of the open class of Jishu] arm's strongest MCU core cortex-m85 processor helps the innovation of the Internet of things in an all-round way (there is a lottery)

IoT简介

Autojs learning notes 6:text (txt) Findone() will report an error when switching apps. Finally, solve the implementation effect and switch any app until the script finds the control with the specified

《真北》读书笔记

np. Meshgrid() function and coordinate position generation in 3D space and numpy Introduction to repeat() function
随机推荐
Auto. JS learning notes 7: JS file calls functions and variables in another JS file to solve various problems of call failure
MySQL v Index and algorithm
日本经济泡沫与房价泡沫
Auto. JS learning note 4: after autojs is packaged, most Huawei and other big brand mobile phones cannot be installed? This problem can be solved by using the simulator to remotely sign and package in
C 语言仅凭自学能到什么高度?
哈希表的理论讲解
Combat tactics based on CEPH object storage
[chromium] location information kernel debugging
Periodic pains of cross-border e-commerce? Papaya mobile power as an independent station enabler
Storage R & D Engineer Recruitment
[926. flip the string to monotonic increment]
Jetpack架构组件学习(3)——Activity Results API使用
Explication du principe d'appariement le plus à gauche de MySQL
IoT简介
Halcon combined with C # to detect surface defects -- affine transformation (III)
Web3.0与数字时尚,该如何落地?
Tp6 debugging (trace)
MYSQL的最左匹配原则的原理讲解
The white paper "protecting our digital heritage: DNA data storage" was released
FPGA基于DE2-115平台的VGA显示