DefaultRecoverAggregateFunction

class DefaultRecoverAggregateFunction<C : Any>(commandAggregate: CommandAggregate<C, *>, afterCommandFunctions: List<AfterCommandFunction<C>>) : InternalCommandFunction<C>

Default implementation of recover aggregate command function.

This function handles the DefaultRecoverAggregate command by generating a DefaultAggregateRecovered event. It provides a standard way to recover previously deleted aggregates in the system.

Parameters

commandAggregate

The command aggregate instance this function belongs to.

afterCommandFunctions

List of after-command functions to execute after recovery.

Type Parameters

C

The type of the command aggregate root.

Constructors

Link copied to clipboard
constructor(commandAggregate: CommandAggregate<C, *>, afterCommandFunctions: List<AfterCommandFunction<C>>)

Properties

Link copied to clipboard
open override val supportedType: Class<*>

The class type of message bodies that this function can process. Used to determine if a message is supported by checking if the message body is an instance of this type.

Functions

Link copied to clipboard
open override fun invokeCommand(exchange: ServerCommandExchange<*>): Mono<*>

Invokes the recover command by returning a DefaultAggregateRecovered event.