Package-level declarations

Types

Link copied to clipboard
data class AggregateTypeConfiguration(val aggregateType: AggregateType, val aggregateIdType: Class<*>, val aggregateIdSerializer: AggregateIdSerializer, val deciderSupportsAggregateTypeChecker: DeciderSupportsAggregateTypeChecker, val commandAggregateIdResolver: CommandAggregateIdResolver, val eventAggregateIdResolver: EventAggregateIdResolver)

AggregateType configuration which defines how the dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.ConfigurableEventStore should be configured in order to support event-streams for the specified aggregateType

Link copied to clipboard
typealias CommandAggregateIdResolver = (cmd: Any) -> Any?

CommandAggregateIdResolver which can resolve the optional Aggregate-Id value from an instance of a Command

Link copied to clipboard
interface Decider<COMMAND, EVENT>

A Decider (aka a command or use-case handler) is a class with a single handle method, that can handle a specific concrete COMMAND and based on its logic it will decide if zero or one EVENT is returned; or in case it's unable to handle the Command (e.g. due to invariant rules) an Exception is thrown.

Link copied to clipboard

Checker strategy that is configured on the AggregateTypeConfiguration for a specific AggregateTypeConfiguration and AggregateType combination. If the doesDeciderWorkWithThisAggregateType method returns true for a given Decider instance then Decider is determined to work with the AggregateType that the AggregateTypeConfiguration that uses this HandlesCommandsThatInheritsFromCommandType object instance is configured with

Link copied to clipboard
typealias EventAggregateIdResolver = (event: Any) -> Any

An EventAggregateIdResolver can resolve the required Aggregate-Id value from an instance of an Event

Link copied to clipboard
class EventOutOfOrderException(aggregateType: AggregateType, aggregateId: String, eventType: KClass<*>, expectedEventOrder: Long, actualEventOrder: Long) : RuntimeException

Exception that can be thrown in case an Event is received out of order for a View/dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.processor.EventProcessor/etc.

Link copied to clipboard
fun interface Evolver<EVENT, STATE>

A Decider or View related interface, which can apply EVENT<(s) to a aggregate/projection/view STATE instance