Examples of CashPurchaseEvent


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

Examples of bbejeck.guava.eventbus.events.CashPurchaseEvent

    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
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.