Examples of CircuitBreakerConfiguration


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

                        threadPoolProperties.keepAliveTimeMinutes().get(),
                        threadPoolProperties.maxQueueSize().get(),
                        threadPoolProperties.queueSizeRejectionThreshold().get(),
                        threadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().get(),
                        threadPoolProperties.metricsRollingStatisticalWindowBuckets().get()),
                new CircuitBreakerConfiguration(
                    commandProperties.circuitBreakerRequestVolumeThreshold().get(),
                    commandProperties.circuitBreakerSleepWindowInMilliseconds().get(),
                    commandProperties.circuitBreakerErrorThresholdPercentage().get(),
                    commandProperties.metricsRollingStatisticalWindowInMilliseconds().get(),
                    commandProperties.metricsRollingStatisticalWindowBuckets().get()),
View Full Code Here

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

    @Test
    public void overriddenProperties() throws Exception {
        final TenacityConfiguration overrideConfiguration = new TenacityConfiguration(
                new ThreadPoolConfiguration(50, 3, 27, 57, 2000, 20),
                new CircuitBreakerConfiguration(1, 2, 3, 2000, 20),
                982);

        final TenacityPropertyRegister tenacityPropertyRegister = new TenacityPropertyRegister(
                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(DependencyKey.OVERRIDE, overrideConfiguration),
                new BreakerboxConfiguration(),
View Full Code Here

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

    @Test
    public void queueRejectionWithBlockingQueue() throws Exception {
        final int queueMaxSize = 5;
        final TenacityConfiguration exampleConfiguration = new TenacityConfiguration(
                new ThreadPoolConfiguration(1, 1, 10, queueMaxSize, 10000, 10),
                new CircuitBreakerConfiguration(20, 5000, 50, 10000, 10),
                5000);

        final TenacityPropertyRegister tenacityPropertyRegister = new TenacityPropertyRegister(
                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(DependencyKey.SLEEP, exampleConfiguration),
                new BreakerboxConfiguration(),
View Full Code Here

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

    }

    private void setUpTenacityCommand(int poolSize, int timeout) {
        final ThreadPoolConfiguration poolConfig = new ThreadPoolConfiguration();
        poolConfig.setThreadPoolCoreSize(poolSize);
        final CircuitBreakerConfiguration circuitConfig = new CircuitBreakerConfiguration();
        circuitConfig.setErrorThresholdPercentage(1);
        circuitConfig.setRequestVolumeThreshold(1);
        new TenacityPropertyRegister(
                ImmutableMap.<TenacityPropertyKey, TenacityConfiguration>of(
                        DependencyKey.EXAMPLE, new TenacityConfiguration(
                                poolConfig, circuitConfig, timeout
                        )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.