Search in sources :

Example 1 with CreateTxBackupLogOperation

use of com.hazelcast.transaction.impl.operations.CreateTxBackupLogOperation in project hazelcast by hazelcast.

the class TransactionImpl method forceCreateBackupLogs.

private void forceCreateBackupLogs() {
    backupLogsCreated = true;
    OperationService operationService = nodeEngine.getOperationService();
    List<Future> futures = new ArrayList<Future>(backupAddresses.length);
    for (Address backupAddress : backupAddresses) {
        if (nodeEngine.getClusterService().getMember(backupAddress) != null) {
            final CreateTxBackupLogOperation op = createCreateTxBackupLogOperation();
            Future f = operationService.invokeOnTarget(SERVICE_NAME, op, backupAddress);
            futures.add(f);
        }
    }
    waitWithDeadline(futures, timeoutMillis, MILLISECONDS, replicationTxExceptionHandler);
}
Also used : Address(com.hazelcast.nio.Address) ArrayList(java.util.ArrayList) Future(java.util.concurrent.Future) CreateTxBackupLogOperation(com.hazelcast.transaction.impl.operations.CreateTxBackupLogOperation) OperationService(com.hazelcast.spi.OperationService)

Aggregations

Address (com.hazelcast.nio.Address)1 OperationService (com.hazelcast.spi.OperationService)1 CreateTxBackupLogOperation (com.hazelcast.transaction.impl.operations.CreateTxBackupLogOperation)1 ArrayList (java.util.ArrayList)1 Future (java.util.concurrent.Future)1