Class BreakerService
java.lang.Object
com.peterphi.std.guice.common.breaker.BreakerService
Service that returns Breakers that depend on one or more of a group of underlying named breakers.
Current implementation is designed for manual (and therefore low volume) tripping
Current implementation is designed for manual (and therefore low volume) tripping
-
Constructor Summary
ConstructorDescriptionBreakerService
(com.codahale.metrics.MetricRegistry metrics, BreakerPersistStore persist) -
Method Summary
Modifier and TypeMethodDescriptiongetTripRecord
(String name) Create a new Breaker which trips if any of the named breakers are trippedvoid
Change the state of a named breaker
-
Constructor Details
-
BreakerService
@Inject public BreakerService(com.codahale.metrics.MetricRegistry metrics, BreakerPersistStore persist)
-
-
Method Details
-
register
Create a new Breaker which trips if any of the named breakers are tripped- Parameters:
onChange
- a method to call when trip/reset occurs; this method should return quicklynames
- the group names (e.g "all", "SomeDaemon", "NonTransactionalDaemons")- Returns:
- an isolator that will break if
-
getAllBreakerNames
-
getTripRecord
-
set
Change the state of a named breaker- Parameters:
name
- the name of the breakervalue
- the new statenote
- the optional description of why the state has changed
-