| Package | Description |
|---|---|
| io.simplesource.api |
| Modifier and Type | Method and Description |
|---|---|
static CommandError |
CommandError.of(CommandError.Reason reason,
String msg)
Construct a
CommandError from a Throwable |
static CommandError |
CommandError.of(CommandError.Reason reason,
Throwable throwable)
Construct a
CommandError from a Throwable |
| Modifier and Type | Method and Description |
|---|---|
Result<CommandError,NonEmptyList<E>> |
CommandHandler.interpretCommand(K key,
A currentAggregate,
C command)
Determine if you will accept or reject the given command given the current aggregate aggregate and
transform into events.
|
default FutureResult<CommandError,NonEmptyList<Sequence>> |
CommandAPI.publishAndQueryCommand(CommandAPI.Request<K,C> commandRequest,
java.time.Duration timeout)
Chain together publishing a command then query the result.
|
FutureResult<CommandError,UUID> |
CommandAPI.publishCommand(CommandAPI.Request<K,C> request)
Submit the given command ready for processing.
|
FutureResult<CommandError,NonEmptyList<Sequence>> |
CommandAPI.queryCommandResult(UUID 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,
Sequence expectedSeq,
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
|
Copyright © 2018. All rights reserved.