Examples of submitToMembers()


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

            final String script = "hazelcast.getAtomicLong('" + name + "').incrementAndGet();";
            final int n = random.nextInt(k) + 1;
            sum += n;
            Member[] m = new Member[n];
            System.arraycopy(members, 0, m, 0, n);
            service.submitToMembers(new ScriptCallable(script, null), Arrays.asList(m), callback);
        }

        assertTrue(latch.await(30, TimeUnit.SECONDS));
        final IAtomicLong result = instances[0].getAtomicLong(name);
        assertEquals(sum, result.get());
View Full Code Here

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

            final String script = "hazelcast.getAtomicLong('testSubmitToMembersRunnable').incrementAndGet();";
            final int n = random.nextInt(k) + 1;
            sum += n;
            Member[] m = new Member[n];
            System.arraycopy(members, 0, m, 0, n);
            service.submitToMembers(new ScriptRunnable(script, null), Arrays.asList(m), callback);
        }

        assertTrue(latch.await(30, TimeUnit.SECONDS));
        final IAtomicLong result = instances[0].getAtomicLong("testSubmitToMembersRunnable");
        assertEquals(sum, result.get());
View Full Code Here

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

        IExecutorService service = client.getExecutorService(randomString());

        Callable<String> getUuidCallable = new GetMemberUuidTask();
        Collection<Member> collection = server.getCluster().getMembers();

        Map<Member, Future<String>> map = service.submitToMembers(getUuidCallable, collection);
        for (Member member : map.keySet()) {
            Future<String> result = map.get(member);
            String uuid = result.get();

            assertEquals(member.getUuid(), uuid);
View Full Code Here

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

        IExecutorService service = client.getExecutorService(randomString());

        Callable<String> getUuidCallable = new GetMemberUuidTask();
        MemberSelector selectAll = new SelectAllMembers();

        Map<Member, Future<String>> map = service.submitToMembers(getUuidCallable, selectAll);
        for (Member member : map.keySet()) {
            Future<String> result = map.get(member);
            String uuid = result.get();

            assertEquals(member.getUuid(), uuid);
View Full Code Here

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

        Runnable runnable = new MapPutRunnable(mapName);
        Collection<Member> collection = server.getCluster().getMembers();
        final CountDownLatch responseLatch = new CountDownLatch(CLUSTER_SIZE);
        final CountDownLatch completeLatch = new CountDownLatch(1);

        service.submitToMembers(runnable, collection, new MultiExecutionCallback() {
            public void onResponse(Member member, Object value) {
                responseLatch.countDown();
            }

            public void onComplete(Map<Member, Object> values) {
View Full Code Here

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

        final CountDownLatch completeLatch = new CountDownLatch(CLUSTER_SIZE);
        final String msg = randomString();
        Callable<String> callable = new AppendCallable(msg);
        Collection<Member> collection = server.getCluster().getMembers();

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

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

        final CountDownLatch completeLatch = new CountDownLatch(1);
        String mapName = randomString();
        Runnable runnable = new MapPutRunnable(mapName);
        MemberSelector selector = new SelectAllMembers();

        service.submitToMembers(runnable, selector, new MultiExecutionCallback() {
            public void onResponse(Member member, Object value) {
                responseLatch.countDown();
            }

            public void onComplete(Map<Member, Object> values) {
View Full Code Here

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

        final CountDownLatch completeLatch = new CountDownLatch(1);
        final String msg = randomString();
        Callable callable = new AppendCallable(msg);
        MemberSelector selector = new SelectAllMembers();

        service.submitToMembers(callable, selector, new MultiExecutionCallback() {
            public void onResponse(Member member, Object value) {
                if (value.equals(msg + AppendCallable.APPENDAGE)) {
                    responseLatch.countDown();
                }
            }
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.