Package com.yammer.tenacity.core.config

Examples of com.yammer.tenacity.core.config.BreakerboxConfiguration


        return Collections.emptyMap();
    }

    @Override
    public BreakerboxConfiguration getBreakerboxConfiguration(T applicationConfiguration) {
        return new BreakerboxConfiguration();
    }
View Full Code Here


                new CircuitBreakerConfiguration(1, 2, 3, 2000, 20),
                982);

        final TenacityPropertyRegister tenacityPropertyRegister = new TenacityPropertyRegister(
                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(DependencyKey.OVERRIDE, overrideConfiguration),
                new BreakerboxConfiguration(),
                mock(ArchaiusPropertyRegister.class));

        tenacityPropertyRegister.register();

        assertEquals(new TenacitySuccessCommand(DependencyKey.OVERRIDE).execute(), "value");
View Full Code Here

                new CircuitBreakerConfiguration(20, 5000, 50, 10000, 10),
                5000);

        final TenacityPropertyRegister tenacityPropertyRegister = new TenacityPropertyRegister(
                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(DependencyKey.SLEEP, exampleConfiguration),
                new BreakerboxConfiguration(),
                mock(ArchaiusPropertyRegister.class));

        tenacityPropertyRegister.register();

        final ImmutableList.Builder<Future<Optional<String>>> sleepCommands = ImmutableList.builder();
View Full Code Here

        final TenacityConfiguration overrideConfiguration = new TenacityConfiguration();
        overrideConfiguration.setExecutionIsolationThreadTimeoutInMillis(1);

        new TenacityPropertyRegister(
                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(DependencyKey.TENACITY_AUTH_TIMEOUT, overrideConfiguration),
                new BreakerboxConfiguration(),
                mock(ArchaiusPropertyRegister.class))
            .register();

        when(mockAuthenticator.authenticate(any(String.class))).thenAnswer(new Answer<Object>() {
            @Override
View Full Code Here

        try {
            final TenacityConfiguration timeoutConfiguration = new TenacityConfiguration();
            timeoutConfiguration.setExecutionIsolationThreadTimeoutInMillis(1);
            new TenacityPropertyRegister(
                    ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(DependencyKey.TENACITY_AUTH_TIMEOUT, timeoutConfiguration),
                    new BreakerboxConfiguration())
            .register();

            when(mockAuthenticator.authenticate(anyString())).thenAnswer(new Answer<Void>() {
                @Override
                public Void answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(
                        DependencyKey.EXAMPLE, new TenacityConfiguration(
                                poolConfig, circuitConfig, timeout
                        )
                ),
                new BreakerboxConfiguration()
        ).register();
    }
View Full Code Here

TOP

Related Classes of com.yammer.tenacity.core.config.BreakerboxConfiguration

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.