Package | Description |
---|---|
io.simplesource.api | |
io.simplesource.kafka.testutils |
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 whether you will accept the given command given the current aggregate and, if so, transform it into events.
|
default FutureResult<CommandError,Sequence> |
CommandAPI.publishAndQueryCommand(CommandAPI.Request<K,C> commandRequest,
java.time.Duration timeout)
Chain together publishing a command then query the result.
|
FutureResult<CommandError,CommandId> |
CommandAPI.publishCommand(CommandAPI.Request<K,C> request)
Submit the given command ready for processing.
|
FutureResult<CommandError,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,
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
|
Modifier and Type | Method and Description |
---|---|
FutureResult<CommandError,CommandId> |
AggregateTestDriver.publishCommand(CommandAPI.Request<K,C> request) |
FutureResult<CommandError,Sequence> |
AggregateTestDriver.queryCommandResult(CommandId commandId,
java.time.Duration timeout) |
Modifier and Type | Method and Description |
---|---|
void |
AggregateTestHelper.PublishBuilder.expectingFailure(java.util.function.Consumer<NonEmptyList<CommandError>> failureValidator)
Publish the command and assert that the call failed.
|
Copyright © 2019. All rights reserved.