io.simplesource.data.Result<CommandError,io.simplesource.data.NonEmptyList<E>> |
CommandHandler.interpretCommand(K key,
A currentAggregate,
C command) |
Determine whether you will accept the given command given the current aggregate and, if so, transform it into events.
|
default io.simplesource.data.FutureResult<CommandError,io.simplesource.data.Sequence> |
CommandAPI.publishAndQueryCommand(CommandAPI.Request<K,C> commandRequest,
java.time.Duration timeout) |
Chain together publishing a command then query the result.
|
io.simplesource.data.FutureResult<CommandError,CommandId> |
CommandAPI.publishCommand(CommandAPI.Request<K,C> request) |
Submit the given command ready for processing.
|
io.simplesource.data.FutureResult<CommandError,io.simplesource.data.Sequence> |
CommandAPI.queryCommandResult(CommandId commandId,
java.time.Duration timeout) |
Get the result of the execution of the command identified by the provided UUID.
|
Optional<CommandError> |
InvalidSequenceHandler.shouldReject(K key,
io.simplesource.data.Sequence expectedSeq,
io.simplesource.data.Sequence currentSeq,
A currentAggregate,
C command) |
The sequence handler is responsible for accepting or rejecting commands executed against an out of date view
If expectedSeq == currentSeq this handler will not be invoked
If this handler is invoked, it means the is executing a command against an old version of the aggregate
|