final int maxRetryAttempts) { CommandResponse commandResponse = commandFunction.get(); if (commandResponse.getNoOp() != null && commandResponse.getNoOp()) { logger.debug("Command was no-op, not waiting around"); return commandResponse; Integer expectedVersion = commandResponse.getNewVersion(); if (expectedVersion == null) { throw new IllegalArgumentException("Command was not no-op but returned no version!"); () -> assertFunction.accept(commandResponse.getId(), expectedVersion), initialDelay, retryDelay,
public static CommandResponse of(final CommandResult<?> result) { return new CommandResponse( result.getAggregateId(), result.getPreviousVersion(), result.getNewVersion(), result.getEvents() == null || result.getEvents().isEmpty()); }
public static CommandResponse of(final CommandResult<?> result) { return new CommandResponse( result.getAggregateId(), result.getPreviousVersion(), result.getNewVersion(), result.getEvents() == null || result.getEvents().isEmpty()); }