Examples of invokeOnTarget()


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

        if (durability > 0 && transactionType.equals(TransactionType.TWO_PHASE)) {
            final OperationService operationService = nodeEngine.getOperationService();
            for (Address backupAddress : backupAddresses) {
                if (nodeEngine.getClusterService().getMember(backupAddress) != null) {
                    try {
                        operationService.invokeOnTarget(TransactionManagerServiceImpl.SERVICE_NAME,
                                new PurgeTxBackupOperation(txnId), backupAddress);
                    } catch (Throwable e) {
                        nodeEngine.getLogger(getClass()).warning("Error during purging backups!", e);
                    }
                }
View Full Code Here

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

            for (MemberImpl member : members) {
                if (!member.localMember()) {
                    try {
                        PartitionStateOperation op = new PartitionStateOperation(partitionState, true);
                        Future<Object> f = operationService
                                .invokeOnTarget(SERVICE_NAME, op, member.getAddress());
                        calls.add(f);
                    } catch (Exception e) {
                        logger.finest(e);
                    }
View Full Code Here

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

    }

    public Object callOnAddress(Address address, Operation operation) {
        //todo: why are we always executing on the mapservice??
        OperationService operationService = instance.node.nodeEngine.getOperationService();
        Future future = operationService.invokeOnTarget(MapService.SERVICE_NAME, operation, address);
        try {
            return future.get();
        } catch (Throwable t) {
            StringWriter s = new StringWriter();
            t.printStackTrace(new PrintWriter(s));
View Full Code Here

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

        Collection<MemberImpl> members = nodeEngine.getClusterService().getMemberList();
        Collection<Future> calls = new ArrayList<Future>(members.size());
        for (MemberImpl member : members) {
            if (!member.localMember()) {
                RegistrationOperation operation = new RegistrationOperation(reg);
                Future f = operationService.invokeOnTarget(serviceName, operation, member.getAddress());
                calls.add(f);
            }
        }

        try {
View Full Code Here

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

        Collection<MemberImpl> members = nodeEngine.getClusterService().getMemberList();
        Collection<Future> calls = new ArrayList<Future>(members.size());
        for (MemberImpl member : members) {
            if (!member.localMember()) {
                DeregistrationOperation operation = new DeregistrationOperation(topic, id);
                Future f = operationService.invokeOnTarget(serviceName, operation, member.getAddress());
                calls.add(f);
            }
        }

        try {
View Full Code Here

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

        return result;
    }

    private Future queryOnLocalMember(String mapName, Predicate predicate, NodeEngine nodeEngine) {
        final OperationService operationService = nodeEngine.getOperationService();
        return operationService
                .invokeOnTarget(SERVICE_NAME,
                        new QueryOperation(mapName, predicate),
                        nodeEngine.getThisAddress());
    }
View Full Code Here

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

    private List<Future> queryOnMembers(String mapName, Predicate predicate, NodeEngine nodeEngine) {
        final Collection<MemberImpl> members = nodeEngine.getClusterService().getMemberList();
        final List<Future> futures = new ArrayList<Future>(members.size());
        final OperationService operationService = nodeEngine.getOperationService();
        for (MemberImpl member : members) {
            Future future = operationService
                    .invokeOnTarget(SERVICE_NAME, new QueryOperation(mapName, predicate), member.getAddress());
            futures.add(future);
        }
        return futures;
    }
View Full Code Here

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

    }

    public Object callOnAddress(Address address, Operation operation) {
        //todo: why are we always executing on the mapservice??
        OperationService operationService = instance.node.nodeEngine.getOperationService();
        Future future = operationService.invokeOnTarget(MapService.SERVICE_NAME, operation, address);
        try {
            return future.get();
        } catch (Throwable t) {
            StringWriter s = new StringWriter();
            t.printStackTrace(new PrintWriter(s));
View Full Code Here

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

    private List<Future> startTxBackup() {
        final OperationService operationService = nodeEngine.getOperationService();
        List<Future> futures = new ArrayList<Future>(backupAddresses.length);
        for (Address backupAddress : backupAddresses) {
            if (nodeEngine.getClusterService().getMember(backupAddress) != null) {
                final Future f = operationService.invokeOnTarget(TransactionManagerServiceImpl.SERVICE_NAME,
                        new BeginTxBackupOperation(txOwnerUuid, txnId, xid), backupAddress);
                futures.add(f);
            }
        }
        return futures;
View Full Code Here

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

    private void replicateTxnLog() throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException {
        final List<Future> futures = new ArrayList<Future>(txLogs.size());
        final OperationService operationService = nodeEngine.getOperationService();
        for (Address backupAddress : backupAddresses) {
            if (nodeEngine.getClusterService().getMember(backupAddress) != null) {
                final Future f = operationService.invokeOnTarget(TransactionManagerServiceImpl.SERVICE_NAME,
                        new ReplicateTxOperation(txLogs, txOwnerUuid, txnId, timeoutMillis, startTime),
                        backupAddress);
                futures.add(f);
            }
        }
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.