Package-level declarations

Types

Link copied to clipboard

Abstract base class for filters that notify wait strategies about command processing completion. These filters intercept message processing pipelines and send notifications to waiting clients when specific processing stages are reached.

Link copied to clipboard

Enumeration of command processing stages.

Link copied to clipboard

Interface for objects that have an associated command stage.

Link copied to clipboard

Interface for defining command wait endpoints. Command wait endpoints specify where command processing results should be sent when using wait strategies in distributed scenarios.

Link copied to clipboard

Interface for notifying command wait endpoints about processing results. After command processors complete their work, they send results to waiting clients through implementations of this interface.

Link copied to clipboard
class CommandWaitNotifierSubscriber<E : MessageExchange<*, M>, M : Message<*, *>, CommandId, NamedBoundedContext, AggregateIdCapable>(commandWaitNotifier: CommandWaitNotifier, processingStage: CommandStage, waitStrategy: ExtractedWaitStrategy, messageExchange: E, actual: CoreSubscriber<in Void>) : BaseSubscriber<Void>

Subscriber that handles command processing completion and sends wait notifications. This subscriber wraps the actual subscriber and intercepts completion/error events to send appropriate wait signals to waiting clients.

Link copied to clipboard

Filter that notifies wait strategies when domain events are handled by event processors. Intercepts the domain event dispatcher pipeline to send EVENT_HANDLED stage notifications.

Link copied to clipboard

Data class representing an extracted wait strategy with its associated metadata. Combines the wait strategy implementation with endpoint and command ID information needed for message propagation and notification.

Link copied to clipboard

Local implementation of CommandWaitNotifier for in-process notifications. This notifier forwards wait signals to registered wait strategies within the same JVM instance.

Link copied to clipboard
class MonoCommandWaitNotifier<E : MessageExchange<*, M>, M : Message<*, *>, CommandId, NamedBoundedContext, AggregateIdCapable>(commandWaitNotifier: CommandWaitNotifier, processingStage: CommandStage, messageExchange: E, source: Mono<Void>) : Mono<Void>

A Mono wrapper that automatically notifies wait strategies when command processing completes. This class intercepts the completion of a Mono operation and sends appropriate wait signals to registered wait strategies based on the processing stage and message exchange.

Link copied to clipboard

Interface for objects that may have an aggregate version.

Link copied to clipboard

Filter that notifies wait strategies when command processing is complete. Intercepts the command dispatcher pipeline to send PROCESSED stage notifications.

Link copied to clipboard

Functional interface for defining predicate logic to determine whether notification should be sent during processing stages. Used by wait strategies to decide if they should be notified about command processing progress at specific stages.

Link copied to clipboard

Filter that notifies wait strategies when projections are updated. Intercepts the projection dispatcher pipeline to send PROJECTED stage notifications.

Link copied to clipboard

Filter that notifies wait strategies when domain events are handled by sagas. Intercepts the stateless saga dispatcher pipeline to send SAGA_HANDLED stage notifications.

Link copied to clipboard

Interface for objects that have a signal timestamp.

Link copied to clipboard

Simple implementation of CommandWaitEndpoint. Provides a basic data class wrapper for endpoint strings.

Link copied to clipboard
data class SimpleWaitSignal(val id: String, val waitCommandId: String, val commandId: String, val aggregateId: AggregateId, val stage: CommandStage, val function: FunctionInfoData, val aggregateVersion: Int? = null, val isLastProjection: Boolean = false, val errorCode: String = ErrorCodes.SUCCEEDED, val errorMsg: String = ErrorCodes.SUCCEEDED_MESSAGE, val bindingErrors: List<BindingError> = emptyList(), val result: Map<String, Any> = emptyMap(), val commands: List<String> = listOf(), val signalTime: Long = System.currentTimeMillis()) : WaitSignal

Simple implementation of WaitSignal.

Link copied to clipboard

Simple thread-safe implementation of WaitStrategyRegistrar using ConcurrentHashMap. Provides concurrent access to wait strategies with atomic operations.

Link copied to clipboard
@Order(value = -2147483648)
class SnapshotNotifierFilter(commandWaitNotifier: CommandWaitNotifier) : AbstractNotifierFilter<StateEventExchange<*>, StateEvent<*>>

Filter that notifies wait strategies when aggregate snapshots are generated. Intercepts the snapshot dispatcher pipeline to send SNAPSHOT stage notifications.

Link copied to clipboard

Interface for objects that have an associated wait command ID. The wait command ID is used to correlate wait strategies with their corresponding command executions in distributed scenarios.

Link copied to clipboard
abstract class WaitingFor : WaitStrategy

Abstract base class for wait strategies that wait for specific command processing stages. Provides common functionality for managing wait signals, completion, and error handling. Subclasses must implement the logic for determining which signals are relevant.

Link copied to clipboard

Functional interface for defining predicate logic to determine whether notification should be sent for specific wait signals. Provides fine-grained control over when wait strategies receive notifications based on the content and context of the signal.

Link copied to clipboard
Link copied to clipboard

Interface for propagating wait strategy information.

Link copied to clipboard

Registry for managing wait strategies. Provides thread-safe operations for registering, unregistering, and retrieving wait strategies by their command IDs.

Properties

Link copied to clipboard

Header key for storing the command wait context name.

Link copied to clipboard

Header key for storing the command wait endpoint.

Link copied to clipboard

Header key for storing the command wait function name.

Link copied to clipboard

Prefix for all command wait header keys.

Link copied to clipboard

Header key for storing the command wait processor name.

Link copied to clipboard

Header key for storing the command wait stage.

Link copied to clipboard

Header key for storing the wait command ID.

Functions

Link copied to clipboard

Extracts the command wait endpoint from the message header.

Link copied to clipboard

Extracts the command wait ID from the message header.

Link copied to clipboard

Extracts wait function information from the message header.

Link copied to clipboard

Extracts the waiting stage from the message header.

Link copied to clipboard

Extracts a complete wait strategy from the message header. Attempts to extract both simple waiting chain and waiting for stage strategies.

Link copied to clipboard
fun isLocalWaitStrategy(commandWaitId: String): Boolean

Determines if a command wait ID belongs to the current JVM instance. Uses the global ID generator to check if the machine ID in the wait ID matches the current machine's ID.

Link copied to clipboard

Checks if a function matches the criteria specified by this NamedFunctionInfo. Used to determine if a wait strategy should be notified about a specific function execution. Returns true if all specified criteria (context, processor, name) match or are not specified.

Link copied to clipboard

Extension function to notify and forget using an extracted wait strategy. Only sends notification if the wait strategy should be notified for this signal.

Link copied to clipboard

Adds the command wait endpoint to the message header for propagation.

Link copied to clipboard

Adds the wait command ID to the message header for propagation.

Link copied to clipboard

Adds wait function information to the message header for propagation.

Link copied to clipboard

Adds the waiting stage to the message header for propagation.

Link copied to clipboard

Extracts the command wait endpoint from the message header, throwing an exception if not present.

Link copied to clipboard

Extracts the command wait ID from the message header, throwing an exception if not present.

Link copied to clipboard
fun <E : MessageExchange<*, M>, M : Message<*, *>, CommandId, NamedBoundedContext, AggregateIdCapable> Mono<Void>.thenNotifyAndForget(commandWaitNotifier: CommandWaitNotifier, processingStage: CommandStage, messageExchange: E): Mono<Void>

Extension function that wraps a Mono to automatically notify wait strategies on completion. This provides a convenient way to add wait notification behavior to any Mono operation in the command processing pipeline.