Examples of andThen()


Examples of com.hazelcast.client.spi.impl.ClientCallFuture.andThen()

    public void submitToKey(K key, EntryProcessor entryProcessor, final ExecutionCallback callback) {
        final Data keyData = toData(key);
        final MapExecuteOnKeyRequest request = new MapExecuteOnKeyRequest(name, entryProcessor, keyData);
        try {
            final ClientCallFuture future = (ClientCallFuture) getContext().getInvocationService().invokeOnKeyOwner(request, keyData);
            future.andThen(callback);
        } catch (Exception e) {
            throw ExceptionUtil.rethrow(e);
        }
    }
View Full Code Here

Examples of com.hazelcast.client.spi.impl.ClientCallFuture.andThen()

                        predicate, mapper, combinerFactory, reducerFactory, keyValueSource,
                        chunkSize, topologyChangedStrategy);

                final ClientCompletableFuture completableFuture = new ClientCompletableFuture(jobId);
                ClientCallFuture future = (ClientCallFuture) cis.invokeOnRandomTarget(request, null);
                future.andThen(new ExecutionCallback() {
                    @Override
                    public void onResponse(Object response) {
                        try {
                            if (collator != null) {
                                response = collator.collate(((Map) response).entrySet());
View Full Code Here

Examples of com.hazelcast.client.spi.impl.ClientCallFuture.andThen()

        final MapExecuteOnKeyRequest request = new MapExecuteOnKeyRequest(name, entryProcessor, keyData);
        request.setAsSubmitToKey();
        try {
            final ClientCallFuture future = (ClientCallFuture) getContext().getInvocationService().
                    invokeOnKeyOwner(request, keyData);
            future.andThen(callback);
        } catch (Exception e) {
            throw ExceptionUtil.rethrow(e);
        }
    }
View Full Code Here

Examples of com.hazelcast.client.spi.impl.ClientCallFuture.andThen()

                        predicate, mapper, combinerFactory, reducerFactory, keyValueSource,
                        chunkSize, topologyChangedStrategy);

                final ClientCompletableFuture completableFuture = new ClientCompletableFuture(jobId);
                ClientCallFuture future = (ClientCallFuture) cis.invokeOnRandomTarget(request, null);
                future.andThen(new ExecutionCallback() {
                    @Override
                    public void onResponse(Object res) {
                        Object response = res;
                        try {
                            if (collator != null) {
View Full Code Here

Examples of com.hazelcast.client.spi.impl.ClientCallFuture.andThen()

                        predicate, mapper, combinerFactory, reducerFactory, keyValueSource,
                        chunkSize, topologyChangedStrategy);

                final ClientCompletableFuture completableFuture = new ClientCompletableFuture(jobId);
                ClientCallFuture future = (ClientCallFuture) cis.invokeOnRandomTarget(request, null);
                future.andThen(new ExecutionCallback() {
                    @Override
                    public void onResponse(Object res) {
                        Object response = res;
                        try {
                            if (collator != null) {
View Full Code Here

Examples of com.hazelcast.client.spi.impl.ClientCallFuture.andThen()

        final MapExecuteOnKeyRequest request = new MapExecuteOnKeyRequest(name, entryProcessor, keyData);
        request.setAsSubmitToKey();
        try {
            final ClientCallFuture future = (ClientCallFuture) getContext().getInvocationService().
                    invokeOnKeyOwner(request, keyData);
            future.andThen(callback);
        } catch (Exception e) {
            throw ExceptionUtil.rethrow(e);
        }
    }
View Full Code Here

Examples of com.hazelcast.core.ICompletableFuture.andThen()

                }
            });

            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.ICompletableFuture.andThen()

            });

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

Examples of com.hazelcast.core.ICompletableFuture.andThen()

                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.ICompletableFuture.andThen()

            final ICompletableFuture completableFuture = es.asCompletableFuture(future);
            latch1.await(30, TimeUnit.SECONDS);

            final AtomicReference reference = new AtomicReference();
            completableFuture.andThen(new ExecutionCallback() {
                @Override
                public void onResponse(Object response) {
                    reference.set(response);
                    latch2.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.