Examples of OperationService


Examples of com.hazelcast.spi.OperationService

            }
            checkThread();
            state = ROLLING_BACK;
            try {
                final List<Future> futures = new ArrayList<Future>(txLogs.size());
                final OperationService operationService = nodeEngine.getOperationService();

                // rollback tx backup
                if (durability > 0 && transactionType.equals(TransactionType.TWO_PHASE)) {
                    for (Address backupAddress : backupAddresses) {
                        if (nodeEngine.getClusterService().getMember(backupAddress) != null) {
                            final Future f = operationService.invokeOnTarget(TransactionManagerServiceImpl.SERVICE_NAME,
                                    new RollbackTxBackupOperation(txnId), backupAddress);
                            futures.add(f);
                        }
                    }
                    for (Future future : futures) {
View Full Code Here

Examples of com.hazelcast.spi.OperationService

        state = ROLLING_BACK;
    }

    private void purgeTxBackups() {
        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

        return f.getSafely();
    }

    private InternalCompletableFuture invoke(Operation op) {
        NodeEngine nodeEngine = getNodeEngine();
        OperationService operationService = nodeEngine.getOperationService();
        return operationService.invokeOnPartition(CountDownLatchService.SERVICE_NAME, op, partitionId);
    }
View Full Code Here

Examples of com.hazelcast.spi.OperationService

        int replicaIndex = getReplicaIndex();

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

Examples of com.hazelcast.spi.OperationService

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

Examples of com.hazelcast.spi.OperationService

        long currentReplicaVersion = currentVersions[replicaIndex - 1];

        if (currentReplicaVersion > 0) {
            CheckReplicaVersion op = createCheckReplicaVersion(partitionId, replicaIndex, currentReplicaVersion);
            NodeEngine nodeEngine = getNodeEngine();
            OperationService operationService = nodeEngine.getOperationService();
            if (sync) {
                operationService.createInvocationBuilder(InternalPartitionService.SERVICE_NAME, op, target)
                        .setCallback(callback)
                        .setTryCount(OPERATION_TRY_COUNT)
                        .setTryPauseMillis(OPERATION_TRY_PAUSE_MILLIS)
                        .invoke();
            } else {
                operationService.send(op, target);
            }
        } else {
            notifyCallback(true);
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.OperationService

            backupOp.setResponseHandler(ResponseHandlerFactory.createEmptyResponseHandler());
            backupOp.setCallerUuid(getCallerUuid());
            OperationAccessor.setCallerAddress(backupOp, getCallerAddress());
            OperationAccessor.setInvocationTime(backupOp, Clock.currentTimeMillis());

            final OperationService operationService = nodeEngine.getOperationService();
            operationService.runOperation(backupOp);
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.OperationService

    void purgeTxBackupLog(String txnId) {
        txBackupLogs.remove(txnId);
    }

    public Xid[] recover() {
        final OperationService operationService = nodeEngine.getOperationService();
        final ClusterService clusterService = nodeEngine.getClusterService();
        final Collection<MemberImpl> memberList = clusterService.getMemberList();
        List<Future<SerializableCollection>> futures = new ArrayList<Future<SerializableCollection>>(memberList.size() - 1);
        for (MemberImpl member : memberList) {
            if (member.localMember()) {
                continue;
            }
            final Future f = operationService.createInvocationBuilder(TransactionManagerServiceImpl.SERVICE_NAME,
                    new RecoverTxnOperation(), member.getAddress()).invoke();
            futures.add(f);
        }
        Set<SerializableXID> xidSet = new HashSet<SerializableXID>();
        for (Future<SerializableCollection> future : futures) {
View Full Code Here

Examples of com.hazelcast.spi.OperationService

        this.partitionId = nodeEngine.getPartitionService().getPartitionId(getNameAsPartitionAwareData());
    }

    private <E> InternalCompletableFuture<E> asyncInvoke(Operation operation, NodeEngine nodeEngine) {
        try {
            OperationService operationService = nodeEngine.getOperationService();
            return operationService.invokeOnPartition(AtomicReferenceService.SERVICE_NAME, operation, partitionId);
        } catch (Throwable throwable) {
            throw rethrow(throwable);
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.OperationService

        }
    }

    private InternalCompletableFuture invoke(Operation operation, Data key) {
        int partitionId = nodeEngine.getPartitionService().getPartitionId(key);
        OperationService operationService = nodeEngine.getOperationService();
        return operationService.invokeOnPartition(SERVICE_NAME, operation, partitionId);
    }
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.