Examples of maxQueueSize()


Examples of com.netflix.hystrix.HystrixThreadPoolProperties.maxQueueSize()

        final HystrixThreadPoolProperties threadPoolProperties = TenacityCommand.getThreadpoolProperties(key);
        return new TenacityConfiguration(
                new ThreadPoolConfiguration(
                        threadPoolProperties.coreSize().get(),
                        threadPoolProperties.keepAliveTimeMinutes().get(),
                        threadPoolProperties.maxQueueSize().get(),
                        threadPoolProperties.queueSizeRejectionThreshold().get(),
                        threadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().get(),
                        threadPoolProperties.metricsRollingStatisticalWindowBuckets().get()),
                new CircuitBreakerConfiguration(
                    commandProperties.circuitBreakerRequestVolumeThreshold().get(),
View Full Code Here

Examples of com.netflix.hystrix.HystrixThreadPoolProperties.maxQueueSize()

        final HystrixThreadPoolProperties threadPoolProperties = successCommand.getThreadpoolProperties();
        final ThreadPoolConfiguration threadPoolConfiguration = overrideConfiguration.getThreadpool();
        assertEquals(threadPoolProperties.coreSize().get().intValue(), threadPoolConfiguration.getThreadPoolCoreSize());
        assertEquals(threadPoolProperties.keepAliveTimeMinutes().get().intValue(), threadPoolConfiguration.getKeepAliveTimeMinutes());
        assertEquals(threadPoolProperties.maxQueueSize().get().intValue(), threadPoolConfiguration.getMaxQueueSize());
        assertEquals(threadPoolProperties.metricsRollingStatisticalWindowBuckets().get().intValue(), threadPoolConfiguration.getMetricsRollingStatisticalWindowBuckets());
        assertEquals(threadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().get().intValue(), threadPoolConfiguration.getMetricsRollingStatisticalWindowInMilliseconds());
        assertEquals(threadPoolProperties.queueSizeRejectionThreshold().get().intValue(), threadPoolConfiguration.getQueueSizeRejectionThreshold());

        assertEquals(TenacityPropertyStore.getTenacityConfiguration(DependencyKey.OVERRIDE), overrideConfiguration);
View Full Code Here

Examples of com.netflix.hystrix.HystrixThreadPoolProperties.maxQueueSize()

        final HystrixThreadPoolProperties threadPoolProperties = new SleepCommand(DependencyKey.SLEEP).getThreadpoolProperties();

        final ThreadPoolConfiguration threadPoolConfiguration = exampleConfiguration.getThreadpool();
        assertEquals(threadPoolProperties.queueSizeRejectionThreshold().get().intValue(), threadPoolConfiguration.getQueueSizeRejectionThreshold());
        assertEquals(threadPoolProperties.maxQueueSize().get().intValue(), threadPoolConfiguration.getMaxQueueSize());

        assertEquals(TenacityPropertyStore.getTenacityConfiguration(DependencyKey.SLEEP), exampleConfiguration);
    }

    @Test
View Full Code Here

Examples of com.netflix.hystrix.HystrixThreadPoolProperties.maxQueueSize()

                           sleepCommandMetrics.getCumulativeCount(HystrixRollingNumberEvent.THREAD_POOL_REJECTED));

        final HystrixThreadPoolProperties threadPoolProperties = new SleepCommand(DependencyKey.EXAMPLE).getThreadpoolProperties();

        //-1 means no limit on the number of items in the queue, which uses the SynchronousBlockingQueue
        assertEquals(threadPoolProperties.maxQueueSize().get().intValue(), -1);
        assertEquals(TenacityPropertyStore.getTenacityConfiguration(DependencyKey.EXAMPLE), new TenacityConfiguration());
    }
}
View Full Code Here

Examples of com.netflix.hystrix.HystrixThreadPoolProperties.maxQueueSize()

            Field field2 = HystrixThreadPool.HystrixThreadPoolDefault.class.getDeclaredField("properties");
            field2.setAccessible(true);
            HystrixThreadPoolProperties properties = (HystrixThreadPoolProperties) field2.get(threadPool);

            assertEquals(30, (int) properties.coreSize().get());
            assertEquals(101, (int) properties.maxQueueSize().get());
            assertEquals(2, (int) properties.keepAliveTimeMinutes().get());
            assertEquals(15, (int) properties.queueSizeRejectionThreshold().get());
            assertEquals(1440, (int) properties.metricsRollingStatisticalWindowInMilliseconds().get());
            assertEquals(12, (int) properties.metricsRollingStatisticalWindowBuckets().get());
        } finally {
View Full Code Here

Examples of org.apache.camel.builder.ThreadPoolProfileBuilder.maxQueueSize()

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                // create a profile for the throttler
                ThreadPoolProfileBuilder builder = new ThreadPoolProfileBuilder("myThrottler");
                builder.maxQueueSize(2);
                context.getExecutorServiceManager().registerThreadPoolProfile(builder.build());
               
                from("seda:start")
                    .throttle(1).timePeriodMillis(100)
                        .asyncDelayed().executorServiceRef("myThrottler").callerRunsWhenRejected(true)
View Full Code Here

Examples of org.apache.camel.builder.ThreadPoolProfileBuilder.maxQueueSize()

public class ThrottlerAsyncDelayedTest extends CamelTestSupport {
    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        ThreadPoolProfileBuilder builder = new ThreadPoolProfileBuilder("myThrottler");
        builder.maxQueueSize(5);
        context.getExecutorServiceManager().registerThreadPoolProfile(builder.build());

        return new ThrottlerAsyncDelayedRouteBuilder();
    }
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.