Package com.hazelcast.core

Examples of com.hazelcast.core.IExecutorService.submitToAllMembers()


        final CountDownLatch responseLatch = new CountDownLatch(CLUSTER_SIZE);
        final CountDownLatch completeLatch = new CountDownLatch(CLUSTER_SIZE);
        final String msg = randomString();
        Callable callable = new AppendCallable(msg);

        service.submitToAllMembers(callable, new MultiExecutionCallback() {
            public void onResponse(Member member, Object value) {
                if (value.equals(msg + AppendCallable.APPENDAGE)) {
                    responseLatch.countDown();
                }
            }
View Full Code Here


        final CountDownLatch responseLatch = new CountDownLatch(CLUSTER_SIZE);
        final CountDownLatch completeLatch = new CountDownLatch(CLUSTER_SIZE);
        Callable callable = new NullCallable();

        service.submitToAllMembers(callable, new MultiExecutionCallback() {
            public void onResponse(Member member, Object value) {
                if (value == null) {
                    responseLatch.countDown();
                }
            }
View Full Code Here

    private void executeOnMembers(String[] args) {
        // executeOnMembers <echo-string>
        try {
            IExecutorService executorService = hazelcast.getExecutorService("default");
            Echo task = new Echo(args[1]);
            Map<Member, Future<String>> results = executorService.submitToAllMembers(task);

            for (Future f : results.values()) {
                println(f.get());
            }
        } catch (InterruptedException e) {
View Full Code Here

    private void executeOnMembers(String[] args) {
        // executeOnMembers <echo-string>
        try {
            IExecutorService executorService = hazelcast.getExecutorService("default");
            Echo task = new Echo(args[1]);
            Map<Member, Future<String>> results = executorService.submitToAllMembers(task);

            for (Future f : results.values()) {
                println(f.get());
            }
        } catch (InterruptedException e) {
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.