Package bbejeck.guava.eventbus.events

Examples of bbejeck.guava.eventbus.events.CashPurchaseEvent


        doneSignal = new CountDownLatch(numberLongEvents);
        longProcessSubscriber = new LongProcessSubscriber(asyncEventBus, doneSignal);

        long start = System.currentTimeMillis();
        for (int i = 0; i < numberLongEvents; i++) {
            asyncEventBus.post(new CashPurchaseEvent(1000l, "Stuff"));
        }
        doneSignal.await();
        long elapsed = start - System.currentTimeMillis();
        assertTrue(elapsed <= 3000l && elapsed < 3500l);
    }
View Full Code Here


    public EventPublisher(EventBus eventBus) {
        this.eventBus = eventBus;
    }

    public void createCashPurchaseEvent(String description, long amount) {
        eventBus.post(new CashPurchaseEvent(amount, description));
    }
View Full Code Here

TOP

Related Classes of bbejeck.guava.eventbus.events.CashPurchaseEvent

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.