Class AbstractCircuitBreakerFactory<CONF,CONFB extends ConfigBuilder<CONF>>
- java.lang.Object
-
- org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory<CONF,CONFB>
-
- Direct Known Subclasses:
CircuitBreakerFactory
,ReactiveCircuitBreakerFactory
public abstract class AbstractCircuitBreakerFactory<CONF,CONFB extends ConfigBuilder<CONF>> extends Object
Base class for factories which produce circuit breakers.- Author:
- Ryan Baxter
-
-
Constructor Summary
Constructors Constructor Description AbstractCircuitBreakerFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CONFB
configBuilder(String id)
Creates a configuration builder for the given id.void
configure(Consumer<CONFB> consumer, String... ids)
Adds configurations for circuit breakers.abstract void
configureDefault(Function<String,CONF> defaultConfiguration)
Sets the default configuration for circuit breakers.protected ConcurrentHashMap<String,CONF>
getConfigurations()
Gets the configurations for the circuit breakers.
-
-
-
Method Detail
-
configure
public void configure(Consumer<CONFB> consumer, String... ids)
Adds configurations for circuit breakers.- Parameters:
ids
- The id of the circuit breakerconsumer
- A configuration builder consumer, allows consumers to customize the builder before the configuration is built
-
getConfigurations
protected ConcurrentHashMap<String,CONF> getConfigurations()
Gets the configurations for the circuit breakers.- Returns:
- The configurations
-
configBuilder
protected abstract CONFB configBuilder(String id)
Creates a configuration builder for the given id.- Parameters:
id
- The id of the circuit breaker- Returns:
- The configuration builder
-
-