Class FcResilienceRegistry
java.lang.Object
org.frontcache.resilience.FcResilienceRegistry
Holds the Resilience4j registries, keyed by command key.
Separate from
FcCommand so the metrics stream can read circuit state without constructing a
command, and separate from FcCommandMetrics because the two have different lifetimes: the
registries are configuration, the metrics are a rolling window.
Registry entries are named by command key alone, which is only correct because one node serves one
site. Before multi-domain support was retired, Hystrix's per-commandKey circuit breakers were shared
across every domain on an edge - one tenant's failing origin short-circuited every other tenant's
healthy one. That fault is now structurally impossible rather than fixed; proposal section 6.6
records it, and the composite naming it would need if multi-tenancy ever returns.-
Method Summary
Modifier and TypeMethodDescriptionstatic io.github.resilience4j.bulkhead.Bulkheadbulkhead(FcCommandConfig config) static io.github.resilience4j.bulkhead.BulkheadRegistrystatic io.github.resilience4j.circuitbreaker.CircuitBreakercircuitBreaker(FcCommandConfig config) static io.github.resilience4j.circuitbreaker.CircuitBreakerRegistryThe registries themselves, for the Micrometer binders inorg.frontcache.metrics.static io.github.resilience4j.circuitbreaker.CircuitBreakerexistingCircuitBreaker(String commandKey) The breaker for a command key if one was ever created, else null.static voidForgets every breaker, bulkhead and time limiter, so the next command builds its own from the config that is current then.static io.github.resilience4j.timelimiter.TimeLimitertimeLimiter(FcCommandConfig config) static io.github.resilience4j.timelimiter.TimeLimiterRegistry
-
Method Details
-
circuitBreaker
public static io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker(FcCommandConfig config) -
bulkhead
-
timeLimiter
-
circuitBreakerRegistry
public static io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry circuitBreakerRegistry()The registries themselves, for the Micrometer binders inorg.frontcache.metrics. Exposed rather than re-wrapped: resilience4j-micrometer binds to a registry and picks up entries added later, which is what makes a command that starts serving after startup show up on its own. -
bulkheadRegistry
public static io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry() -
timeLimiterRegistry
public static io.github.resilience4j.timelimiter.TimeLimiterRegistry timeLimiterRegistry() -
existingCircuitBreaker
public static io.github.resilience4j.circuitbreaker.CircuitBreaker existingCircuitBreaker(String commandKey) The breaker for a command key if one was ever created, else null. The metrics stream uses this forisCircuitBreakerOpen- reading live state rather than tracking a copy. -
invalidateAll
public static void invalidateAll()Forgets every breaker, bulkhead and time limiter, so the next command builds its own from the config that is current then. This drops circuit state. An open breaker snaps closed and every rolling window restarts at zero, which is visible on the realtime page as a step change. That is the cost of applying a changed resilience.properties without a restart, andFcResilienceReloadreports it rather than leaving the operator to infer it - a breaker whose configuration just changed has no meaningful accumulated history anyway.
-