Skip navigation links
A B C E F G I N O P Q R S T V 

A

Aggregator<E,A> - Interface in io.simplesource.api
An Aggregator is a function that builds up an aggregate from a stream of events (effectively a fold function).
AggregatorBuilder<E,A> - Class in io.simplesource.dsl
An builder for creating an Aggregator that can handle multiple event types by adding one or more single event aggregators.
applyEvent(A, E) - Method in interface io.simplesource.api.Aggregator
A function that takes the current aggregate value, the latest event and generates a new aggregate value.

B

build() - Method in class io.simplesource.dsl.AggregatorBuilder
 
build() - Method in class io.simplesource.dsl.CommandHandlerBuilder
 

C

CommandAPI<K,C> - Interface in io.simplesource.api
The public API for submitting commands against a given aggregate and querying where they have been successfully applied.
CommandAPI.Request<K,C> - Class in io.simplesource.api
 
CommandAPISet - Interface in io.simplesource.api
 
CommandError - Class in io.simplesource.api
A CommandError explains failures.
CommandError.Reason - Enum in io.simplesource.api
 
CommandHandler<K,C,E,A> - Interface in io.simplesource.api
A command handler is responsible for accepting or rejecting commands and turning accepted commands into a list of events by applying the appropriate business logic and validations based on the current state.
CommandHandlerBuilder<K,C,E,A> - Class in io.simplesource.dsl
An builder for creating an CommandHandler that can handle several different commands types by adding one or more single command handlers.

E

empty(K) - Method in interface io.simplesource.api.InitialValue
 

F

fold(BiFunction<CommandError.Reason, String, A>, BiFunction<CommandError.Reason, Throwable, A>) - Method in class io.simplesource.api.CommandError
Access the reason value and either the string or the throwable context and return whatever you like.

G

getCommandAPI(String) - Method in interface io.simplesource.api.CommandAPISet
Provide access to the CommandAPI for any of the aggregates managed by this instance
getMessage() - Method in class io.simplesource.api.CommandError
The reason message acaessor
getReason() - Method in class io.simplesource.api.CommandError
The reason value acaessor

I

InitialValue<K,A> - Interface in io.simplesource.api
Provides the initial value of an aggregate .
interpretCommand(K, A, C) - Method in interface io.simplesource.api.CommandHandler
Determine if you will accept or reject the given command given the current aggregate aggregate and transform into events.
InvalidSequenceHandler<K,C,A> - Interface in io.simplesource.api
This functional for accepting or rejecting commands executed against an out of date view.
io.simplesource.api - package io.simplesource.api
 
io.simplesource.dsl - package io.simplesource.dsl
 

N

newBuilder() - Static method in class io.simplesource.dsl.AggregatorBuilder
 
newBuilder() - Static method in class io.simplesource.dsl.CommandHandlerBuilder
 

O

of(CommandError.Reason, Throwable) - Static method in class io.simplesource.api.CommandError
Construct a CommandError from a Throwable
of(CommandError.Reason, String) - Static method in class io.simplesource.api.CommandError
Construct a CommandError from a Throwable
onCommand(Class<SC>, CommandHandler<K, SC, E, A>) - Method in class io.simplesource.dsl.CommandHandlerBuilder
 
onEvent(Class<SE>, Aggregator<SE, A>) - Method in class io.simplesource.dsl.AggregatorBuilder
 

P

publishAndQueryCommand(CommandAPI.Request<K, C>, Duration) - Method in interface io.simplesource.api.CommandAPI
Chain together publishing a command then query the result.
publishCommand(CommandAPI.Request<K, C>) - Method in interface io.simplesource.api.CommandAPI
Submit the given command ready for processing.

Q

queryCommandResult(UUID, Duration) - Method in interface io.simplesource.api.CommandAPI
Get the result of the execution of the command identified by the provided UUID.

R

Request() - Constructor for class io.simplesource.api.CommandAPI.Request
 

S

shouldReject(K, Sequence, Sequence, A, C) - Method in interface io.simplesource.api.InvalidSequenceHandler
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

T

toString() - Method in class io.simplesource.api.CommandError
 

V

valueOf(String) - Static method in enum io.simplesource.api.CommandError.Reason
Returns the enum constant of this type with the specified name.
values() - Static method in enum io.simplesource.api.CommandError.Reason
Returns an array containing the constants of this enum type, in the order they are declared.
A B C E F G I N O P Q R S T V 
Skip navigation links

Copyright © 2018. All rights reserved.