Package com.hazelcast.client.executor.tasks

Examples of com.hazelcast.client.executor.tasks.SelectAllMembers


    public void testSubmitCallable_withMemberSelector() throws Exception {
        IExecutorService service = client.getExecutorService(randomString());

        String msg = randomString();
        Callable<String> callable = new AppendCallable(msg);
        MemberSelector selectAll = new SelectAllMembers();

        Future<String> f = service.submit(callable, selectAll);

        assertEquals(msg + AppendCallable.APPENDAGE, f.get());
    }
View Full Code Here


    @Test
    public void testSubmitCallableToMembers_withMemberSelector() throws Exception {
        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();
View Full Code Here

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

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

        service.submit(runnable, selector, new ExecutionCallback() {
            public void onResponse(Object response) {
                responseLatch.countDown();
            }
View Full Code Here

        final CountDownLatch responseLatch = new CountDownLatch(CLUSTER_SIZE);
        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();
            }
View Full Code Here

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

        final CountDownLatch responseLatch = new CountDownLatch(1);
        String msg = randomString();
        Callable runnable = new AppendCallable(msg);
        MemberSelector selector = new SelectAllMembers();
        final AtomicReference<Object> result = new AtomicReference<Object>();

        service.submit(runnable, selector, new ExecutionCallback() {
            public void onResponse(Object response) {
                result.set(response);
View Full Code Here

        final CountDownLatch responseLatch = new CountDownLatch(CLUSTER_SIZE);
        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

Related Classes of com.hazelcast.client.executor.tasks.SelectAllMembers

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.