docs: public int onePhaseCommitRemoteTransaction(GlobalTransaction gtx, List<WriteCommand> modifications) {
        RpcManager rpcManager = cache.getRpcManager();
        CommandsFactory factory = cache.getComponentRegistry().getCommandsFactory();
        try {
           //only pessimistic tx are committed in 1PC and it doesn't use versions.
           PrepareCommand command = factory.buildPrepareCommand(gtx, modifications, true);
           CompletionStage<Void> cs = rpcManager.invokeCommandOnAll(command, validOnly(), rpcManager.getSyncRpcOptions());
           factory.initializeReplicableCommand(command, false);
           command.invokeAsync().join();
           cs.toCompletableFuture().join();
           forgetTransaction(gtx, rpcManager, factory);
           return loggingCompleted(true) == Status.OK ?
                  XAResource.XA_OK :
                  XAException.XAER_RMERR;
        } catch (Throwable throwable) {
           //transaction should commit but we still can have exceptions (timeouts or similar)
           return XAException.XAER_RMERR;
        }
     }