Sync

class Sync<S : Any>(val creation: Creation, val onDeleted: Boolean, val decide: DecideScope.(S, Any) -> Decision, val produces: Set<Class<*>>? = null) : DecideFunction<S>

Constructors

Link copied to clipboard
constructor(creation: Creation, onDeleted: Boolean, decide: DecideScope.(S, Any) -> Decision, produces: Set<Class<*>>? = null)
constructor(creation: Creation, decide: DecideScope.(S, Any) -> Decision)

Properties

Link copied to clipboard
open override val creation: Creation

Whether the command may, or must, create the aggregate.

Link copied to clipboard
Link copied to clipboard
open override val onDeleted: Boolean

Whether the command is decided on a deleted aggregate too (@OnCommand(onDeleted = true)), as the kernel decides RestoreAggregate; every other command is refused on one (wow.aggregate.deleted).

Link copied to clipboard
open override val produces: Set<Class<*>>?

The events it may produce, those its return type yields or its produces lists: the kernel fails a command whose decision holds another (UndeclaredEventException). Null when they are unknown, and then not checked.