Package com.lmax.disruptor

Examples of com.lmax.disruptor.BusySpinWaitStrategy


            case "yielding":
                return new YieldingWaitStrategy();
            case "blocking":
                return new BlockingWaitStrategy();
            case "busy_spinning":
                return new BusySpinWaitStrategy();
            default:
                LOG.warn("Invalid setting for [processor_wait_strategy]:"
                        + " Falling back to default: BlockingWaitStrategy.");
                return new BlockingWaitStrategy();
        }
View Full Code Here


                    @Override
                    public PathTrackingEntry newInstance()
                    {
                        return new PathTrackingEntry();
                    }
                }, ringBufferSize, exec, ProducerType.SINGLE, new BusySpinWaitStrategy()
                );

                for ( int i = 0; i < numberOfConsumers; i++ )
                {
                    disruptor.handleEventsWith( new PathTrackingEntryEventHandler( i, numberOfConsumers, this.pathTrackingDataStore ) );
View Full Code Here

            @Override
            public PathTrackingEntry newInstance()
            {
                return new PathTrackingEntry();
            }
        }, ringBufferSize, exec, ProducerType.SINGLE, new BusySpinWaitStrategy()
        );

        for ( int i = 0; i < numberOfConsumers; i++ )
        {
            disruptor.handleEventsWith( new PathTrackingEntryEventHandler( i, numberOfConsumers ) );
View Full Code Here

        workers = Executors.newFixedThreadPool(numEventProcessors, new DaemonThreadFactory(nameForThreads));

        ringBuffer = new RingBuffer<E>(
                eventFactory,
                new MultiThreadedClaimStrategy(bufferSize),
                new BusySpinWaitStrategy());

        WorkProcessor<E> processor = null;
        for (WorkHandler<E> handler : handlers)
        {
            processor = scheduleEventProcessor(processor, handler);
View Full Code Here

        private final WaitStrategy waitStrategy;

        @SuppressWarnings("UnusedDeclaration")
        private WaitStrategyFactoryBean(String strategyName) {
            if ("busy-spin".equals(strategyName)) {
                waitStrategy = new BusySpinWaitStrategy();
            } else if ("yield".equals(strategyName)) {
                waitStrategy = new YieldingWaitStrategy();
            } else if ("sleep".equals(strategyName)) {
                waitStrategy = new SleepingWaitStrategy();
            } else if ("block".equals(strategyName)) {
View Full Code Here

TOP

Related Classes of com.lmax.disruptor.BusySpinWaitStrategy

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.