Package com.lmax.disruptor.dsl.stubs

Examples of com.lmax.disruptor.dsl.stubs.SleepingEventHandler


                allowing(eventProcessor2).isRunning();
                will(returnValue(true));
            }
        });
        handler1 = new SleepingEventHandler();
        handler2 = new SleepingEventHandler();

        barrier1 = mockery.mock(SequenceBarrier.class, "barrier1");
        barrier2 = mockery.mock(SequenceBarrier.class, "barrier2");
    }
View Full Code Here


    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldThrowExceptionWhenHandlerIsNotRegistered() throws Exception
    {
        consumerRepository.getEventProcessorFor(new SleepingEventHandler());
    }
View Full Code Here

    @Test
    public void shouldCreateEventProcessorGroupForFirstEventProcessors()
        throws Exception
    {
        executor.ignoreExecutions();
        final EventHandler<TestEvent> eventHandler1 = new SleepingEventHandler();
        EventHandler<TestEvent> eventHandler2 = new SleepingEventHandler();

        final EventHandlerGroup<TestEvent> eventHandlerGroup =
            disruptor.handleEventsWith(eventHandler1, eventHandler2);
        disruptor.start();
View Full Code Here

    @Test(expected = IllegalStateException.class)
    public void shouldThrowExceptionWhenAddingEventProcessorsAfterTheProducerBarrierHasBeenCreated()
        throws Exception
    {
        executor.ignoreExecutions();
        disruptor.handleEventsWith(new SleepingEventHandler());
        disruptor.start();
        disruptor.handleEventsWith(new SleepingEventHandler());
    }
View Full Code Here

    @Test(expected = IllegalStateException.class)
    public void shouldThrowExceptionIfStartIsCalledTwice()
        throws Exception
    {
        executor.ignoreExecutions();
        disruptor.handleEventsWith(new SleepingEventHandler());
        disruptor.start();
        disruptor.start();
    }
View Full Code Here

TOP

Related Classes of com.lmax.disruptor.dsl.stubs.SleepingEventHandler

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.