Package org.fishwife.jrugged

Examples of org.fishwife.jrugged.DefaultFailureInterpreter


        org.fishwife.jrugged.CircuitBreaker circuitBreaker =
                circuitBreakerFactory.findCircuitBreaker(name);

        if (circuitBreaker == null) {
            DefaultFailureInterpreter dfi =
                    new DefaultFailureInterpreter(
                            circuitBreakerAnnotation.ignore(),
                            circuitBreakerAnnotation.limit(),
                            circuitBreakerAnnotation.windowMillis());

            CircuitBreakerConfig config = new CircuitBreakerConfig(
View Full Code Here


    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);
            }
        }
View Full Code Here

    MBeanExporter mockMBeanExporter;

    @Before
    public void setUp() {
        factory = new CircuitBreakerBeanFactory();
        config = new CircuitBreakerConfig(10000L, new DefaultFailureInterpreter(5, 30000L));
        mockMBeanExporter = createMock(MBeanExporter.class);
        mockMBeanExporter.registerManagedResource(EasyMock.<Object>anyObject(), EasyMock.<ObjectName>anyObject());
        replay(mockMBeanExporter);
    }
View Full Code Here

TOP

Related Classes of org.fishwife.jrugged.DefaultFailureInterpreter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.