new DefaultFailureInterpreter( circuitBreakerAnnotation.ignore(), circuitBreakerAnnotation.limit(),
/** * If packageScanBase is defined will search packages for {@link org.fishwife.jrugged.aspects.CircuitBreaker} * annotations and create circuitbreakers for them. */ public void buildAnnotatedCircuitBreakers() { if (packageScanBase != null) { AnnotatedMethodScanner methodScanner = new AnnotatedMethodScanner(); for (Method m : methodScanner.findAnnotatedMethods(packageScanBase, org.fishwife.jrugged.aspects.CircuitBreaker.class)) { org.fishwife.jrugged.aspects.CircuitBreaker circuitBreakerAnnotation = m.getAnnotation(org.fishwife.jrugged.aspects.CircuitBreaker.class); DefaultFailureInterpreter dfi = new DefaultFailureInterpreter(circuitBreakerAnnotation.ignore(), circuitBreakerAnnotation.limit(), circuitBreakerAnnotation.windowMillis()); CircuitBreakerConfig config = new CircuitBreakerConfig(circuitBreakerAnnotation.resetMillis(), dfi); createCircuitBreaker(circuitBreakerAnnotation.name(), config); } } }