Examples of Sequenced


Examples of com.lmax.disruptor.Sequenced

        long expectedCount = myRunnable.sequence.get() + (ITERATIONS * batchSize);
        myRunnable.reset(latch, expectedCount);
        executor.submit(myRunnable);
        long start = System.currentTimeMillis();

        final Sequenced sequencer = this.sequencer;

        for (long i = 0; i < ITERATIONS; i++)
        {
            long next = sequencer.next(batchSize);
            sequencer.publish((next - (batchSize - 1)), next);
        }

        latch.await();
        long end = System.currentTimeMillis();
        long opsPerSecond = (ITERATIONS * 1000L * batchSize) / (end - start);
View Full Code Here

Examples of com.lmax.disruptor.Sequenced

        long expectedCount = myRunnable.sequence.get() + ITERATIONS;
        myRunnable.reset(latch, expectedCount);
        executor.submit(myRunnable);
        long start = System.currentTimeMillis();

        final Sequenced sequencer = this.sequencer;

        for (long i = 0; i < ITERATIONS; i++)
        {
            long next = sequencer.next();
            sequencer.publish(next);
        }

        latch.await();
        long opsPerSecond = (ITERATIONS * 1000L) / (System.currentTimeMillis() - start);
        waitForEventProcessorSequence(expectedCount);
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.