Examples of ExecutionCallback


Examples of com.hazelcast.core.ExecutionCallback

            }
        });

        final AtomicReference reference = new AtomicReference();
        final ICompletableFuture completableFuture = es.asCompletableFuture(future);
        completableFuture.andThen(new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                reference.set(response);
                latch2.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        });

        final AtomicReference reference1 = new AtomicReference();
        final AtomicReference reference2 = new AtomicReference();
        final ICompletableFuture completableFuture = es.asCompletableFuture(future);
        completableFuture.andThen(new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                reference1.set(response);
                latch2.countDown();
            }

            @Override
            public void onFailure(Throwable t) {
                reference1.set(t);
                latch2.countDown();
            }
        });
        completableFuture.andThen(new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                reference2.set(response);
                latch2.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        assertOpenEventually(latch1);

        final AtomicReference reference = new AtomicReference();
        final ICompletableFuture completableFuture = es.asCompletableFuture(future);
        completableFuture.andThen(new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                reference.set(response);
                latch2.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        assertOpenEventually(latch1);

        final AtomicReference reference1 = new AtomicReference();
        final AtomicReference reference2 = new AtomicReference();
        final ICompletableFuture completableFuture = es.asCompletableFuture(future);
        completableFuture.andThen(new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                reference1.set(response);
                latch2.countDown();
            }

            @Override
            public void onFailure(Throwable t) {
                reference1.set(t);
                latch2.countDown();
            }
        });
        completableFuture.andThen(new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                reference2.set(response);
                latch2.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

    @Test
    public void testSubmitToKeyWithCallback() throws Exception {
        final IMap map = createMap();
        map.put(1, 1);
        final CountDownLatch latch = new CountDownLatch(1);
        ExecutionCallback executionCallback = new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                latch.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        String mapName = randomString();
        Runnable runnable = new MapPutRunnable(mapName);
        Member member = server.getCluster().getLocalMember();
        final CountDownLatch responseLatch = new CountDownLatch(1);

        service.submitToMember(runnable, member, new ExecutionCallback() {
            public void onResponse(Object response) {
                responseLatch.countDown();
            }

            public void onFailure(Throwable t) {
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        Callable getUuidCallable = new GetMemberUuidTask();
        Member member = server.getCluster().getLocalMember();
        final CountDownLatch responseLatch = new CountDownLatch(1);
        final AtomicReference<Object> result = new AtomicReference<Object>();

        service.submitToMember(getUuidCallable, member, new ExecutionCallback() {
            @Override
            public void onResponse(Object response) {
                result.set(response);
                responseLatch.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        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();
            }

            public void onFailure(Throwable t) {
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

        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);
                responseLatch.countDown();
            }
View Full Code Here

Examples of com.hazelcast.core.ExecutionCallback

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

        service.submit(runnable, new ExecutionCallback() {
            public void onResponse(Object response) {
                responseLatch.countDown();
            }

            public void onFailure(Throwable t) {
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.