Package com.hazelcast.spi

Examples of com.hazelcast.spi.OperationService.send()


            String uuid = nodeEngine.getLocalMember().getUuid();
            operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
            try {
                for (MemberImpl member : nodeEngine.getClusterService().getMemberList()) {
                    if (!member.localMember()) {
                        os.send(operation, member.getAddress());
                    } else {
                        os.executeOperation(operation);
                    }
                }
            } catch (Throwable t) {
View Full Code Here


            String uuid = nodeEngine.getLocalMember().getUuid();
            operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
            try {
                for (MemberImpl member : nodeEngine.getClusterService().getMemberList()) {
                    if (!member.localMember()) {
                        os.send(operation, member.getAddress());
                    } else {
                        os.executeOperation(operation);
                    }
                }
            } catch (Throwable t) {
View Full Code Here

                String name = supervisor.getConfiguration().getName();
                String jobId = supervisor.getConfiguration().getJobId();
                NotifyRemoteExceptionOperation operation = new NotifyRemoteExceptionOperation(name, jobId, throwable);

                OperationService os = nodeEngine.getOperationService();
                os.send(operation, jobOwner);
            }
        } catch (Exception e) {
            ILogger logger = nodeEngine.getLogger(MapReduceUtil.class);
            logger.warning("Could not notify remote map-reduce owner", e);
        }
View Full Code Here

                        V response = (V) ib.invoke().getSafely();
                        if (response != null) {
                            results.add(response);
                        }
                    } else {
                        os.send(operation, member.getAddress());
                    }
                }
            } catch (Exception e) {
                exceptions.add(e);
            }
View Full Code Here

            } else {
                if (returnsResponse) {
                    InvocationBuilder ib = os.createInvocationBuilder(SERVICE_NAME, operation, address);
                    return (V) ib.invoke().get();
                } else {
                    os.send(operation, address);
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

                        .setResponseHandler(createEmptyResponseHandler());

                if (member.localMember()) {
                    operationService.runOperation(op);
                } else {
                    operationService.send(op, member.getAddress());
                }
            }
        }
    }
View Full Code Here

        ReplicaSyncRetryResponse response = new ReplicaSyncRetryResponse();
        response.setPartitionId(partitionId).setReplicaIndex(replicaIndex);
        Address target = getCallerAddress();
        OperationService operationService = nodeEngine.getOperationService();
        operationService.send(response, target);
    }

    private byte[] createReplicationData(List<Operation> tasks) throws IOException {
        byte[] data;
        NodeEngine nodeEngine = getNodeEngine();
View Full Code Here

        if (logger.isFinestEnabled()) {
            logger.finest("Sending sync response to -> " + target + " for partition: "
                    + getPartitionId() + ", replica: " + getReplicaIndex());
        }
        OperationService operationService = nodeEngine.getOperationService();
        operationService.send(syncResponse, target);
    }

    private ReplicaSyncResponse createResponse(byte[] data) throws IOException {
        int partitionId = getPartitionId();
        NodeEngine nodeEngine = getNodeEngine();
View Full Code Here

                        .setCallback(callback)
                        .setTryCount(OPERATION_TRY_COUNT)
                        .setTryPauseMillis(OPERATION_TRY_PAUSE_MILLIS)
                        .invoke();
            } else {
                operationService.send(op, target);
            }
        } else {
            notifyCallback(true);
        }
    }
View Full Code Here

            OperationService operationService = nodeEngine.getOperationService();
            for (MemberImpl member : members) {
                if (!member.localMember()) {
                    try {
                        operationService.send(op, member.getAddress());
                    } catch (Exception e) {
                        logger.finest(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.