Package com.yammer.tenacity.core.errors

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


    @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

        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

Related Classes of com.yammer.tenacity.core.errors.TenacityExceptionMapper

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.