Package com.hazelcast.topic.impl

Examples of com.hazelcast.topic.impl.TopicEvent


        SerializationService ss3 = impl3.node.nodeEngine.getSerializationService();

        int counter = 0;
        for (int i = 0; i < 3000; i++) {
            if (counter == 0) {
                TopicEvent event = builTopicEvent("Foo" + i, m1, ss1);
                Collection<EventRegistration> registrations = es1.getRegistrations(TopicService.SERVICE_NAME, "foo");
                EventRegistration registration = findEventRegistration(a3, registrations);
                es1.publishEvent(TopicService.SERVICE_NAME, registration, event, 0);
            } else if (counter == 1) {
                TopicEvent event = builTopicEvent("Foo" + i, m2, ss2);
                Collection<EventRegistration> registrations = es2.getRegistrations(TopicService.SERVICE_NAME, "foo");
                EventRegistration registration = findEventRegistration(a1, registrations);
                es2.publishEvent(TopicService.SERVICE_NAME, registration, event, 0);
            } else if (counter == 2) {
                TopicEvent event = builTopicEvent("Foo" + i, m3, ss3);
                Collection<EventRegistration> registrations = es3.getRegistrations(TopicService.SERVICE_NAME, "foo");
                EventRegistration registration = findEventRegistration(a2, registrations);
                es3.publishEvent(TopicService.SERVICE_NAME, registration, event, 0);
            }
            counter++;
View Full Code Here


        l2.await(30, TimeUnit.SECONDS);
        l3.await(30, TimeUnit.SECONDS);
    }

    private TopicEvent builTopicEvent(String value, MemberImpl member, SerializationService ss) {
        return new TopicEvent("foo", ss.toData(value), member.getAddress());
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.topic.impl.TopicEvent

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.