Package com.lmax.disruptor

Examples of com.lmax.disruptor.MultiThreadedClaimStrategy


            }
        }
    };

    private static DisruptorQueue createQueue(String name, int queueSize) {
        return new DisruptorQueue(name, new MultiThreadedClaimStrategy(
                queueSize), new BlockingWaitStrategy());
    }
View Full Code Here


        final int numEventProcessors = handlers.size();
        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)
        {
View Full Code Here

    @PostConstruct
    public void start() {
        executorService = Executors.newCachedThreadPool();
        disruptor = new Disruptor<Registration>(Registration.FACTORY,
                executorService,
                new MultiThreadedClaimStrategy(ringSize),
                new BlockingWaitStrategy());
        disruptor.handleEventsWith(new ContainerEventHandler());
        ringBuffer = disruptor.start();
    }
View Full Code Here

     */
    private ClaimStrategy getClaimStrategy() {
        if (TextMessageGateway.PUBLISHING_THREADS == 1)
            return new SingleThreadedClaimStrategy(RINGBUFFER_SIZE);

        return new MultiThreadedClaimStrategy(RINGBUFFER_SIZE);
    }
View Full Code Here

TOP

Related Classes of com.lmax.disruptor.MultiThreadedClaimStrategy

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.