Examples of TenacityExceptionMapper


Examples of com.yammer.tenacity.core.errors.TenacityExceptionMapper

        exceptionMapperBuilder.add(exceptionMapper);
        return this;
    }

    public TenacityBundleBuilder<T> mapAllHystrixRuntimeExceptionsTo(int statusCode) {
        exceptionMapperBuilder.add(new TenacityExceptionMapper(statusCode));
        exceptionMapperBuilder.add(new TenacityContainerExceptionMapper(statusCode));
        return this;
    }
View Full Code Here

Examples of com.yammer.tenacity.core.errors.TenacityExceptionMapper

    @Test
    public void shouldUseExceptionMapper() {
        final TenacityConfiguredBundle<Configuration> bundle = TenacityBundleBuilder
                .newBuilder()
                .configurationFactory(configurationFactory)
                .addExceptionMapper(new TenacityExceptionMapper(429))
                .build();

        assertThat(bundle).
                isEqualTo(new TenacityConfiguredBundle<>(
                        configurationFactory,
                        Optional.<HystrixCommandExecutionHook>absent(),
                        ImmutableList.<ExceptionMapper<? extends Throwable>>of(new TenacityExceptionMapper(429))
                ));
    }
View Full Code Here

Examples of com.yammer.tenacity.core.errors.TenacityExceptionMapper

        assertThat(bundle).
                isEqualTo(new TenacityConfiguredBundle<>(
                        configurationFactory,
                        Optional.<HystrixCommandExecutionHook>absent(),
                        ImmutableList.<ExceptionMapper<? extends Throwable>>of(
                                new TenacityExceptionMapper(429),
                                new TenacityContainerExceptionMapper(429))
                ));
    }
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.