SnapshotDispatcher

class SnapshotDispatcher(val name: String, val namedAggregates: Set<NamedAggregate> = MetadataSearcher.namedAggregateType.keys.toSet(), snapshotHandler: SnapshotHandler, stateEventBus: StateEventBus, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier(SNAPSHOT_PROCESSOR_NAME)) : MainDispatcher<StateEventExchange<*>>

Constructors

Link copied to clipboard
constructor(name: String, namedAggregates: Set<NamedAggregate> = MetadataSearcher.namedAggregateType.keys.toSet(), snapshotHandler: SnapshotHandler, stateEventBus: StateEventBus, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier(SNAPSHOT_PROCESSOR_NAME))

Properties

Link copied to clipboard
open override val name: String

named like applicationName.SnapshotDispatcher

Link copied to clipboard
open override val namedAggregates: Set<NamedAggregate>

The set of named aggregates that this dispatcher will manage.

Functions

Link copied to clipboard
override fun forceStop()

Releases resources promptly without blocking, and remains safe before prepare and across repeated or overlapping calls.

Link copied to clipboard
open override fun newAggregateDispatcher(namedAggregate: NamedAggregate, messageFlux: Flux<StateEventExchange<*>>): MessageDispatcher

Creates a new message dispatcher for a specific named aggregate.

Link copied to clipboard
override fun prepare(runtimeContext: RuntimeContext): Mono<Void>

Starts the dispatcher by running all aggregate dispatchers.

Link copied to clipboard
override fun quiesce()

Stops admitting new work after the runtime has atomically closed global admission.

Link copied to clipboard
open override fun receiveMessage(subscription: MessageSubscription): Flux<StateEventExchange<*>>

Creates a flux of messages for the specified subscription.

Link copied to clipboard
override fun start()
Link copied to clipboard
override fun stopGracefully(): Mono<Void>

Stops the dispatcher gracefully by shutting down all aggregate dispatchers.