Package com.lmax.disruptor.util

Examples of com.lmax.disruptor.util.MutableLong


    }

    @Override
    protected long runDisruptorPass() throws InterruptedException
    {
        MutableLong value = this.value;

        final CountDownLatch latch = new CountDownLatch(1);
        long expectedCount = ringBuffer.getMinimumGatingSequence() + ITERATIONS;

        handler.reset(latch, expectedCount);
        long start = System.currentTimeMillis();

        final RingBuffer<ValueEvent> rb = ringBuffer;

        for (long l = 0; l < ITERATIONS; l++)
        {
            value.set(l);
            rb.publishEvent(Translator.INSTANCE, value);
        }

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

TOP

Related Classes of com.lmax.disruptor.util.MutableLong

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.