AggregateMetadata
Represents the metadata for an aggregate, combining state and command aggregate metadata.
This data class encapsulates all the metadata required to work with an aggregate, including its named aggregate information, static tenant ID, state aggregate metadata, and command aggregate metadata. It provides utilities for extracting aggregate IDs and determining if the aggregate follows an aggregation pattern.
Type Parameters
The type of the command aggregate.
The type of the state aggregate.
Constructors
Creates a new AggregateMetadata with the specified named aggregate, tenant ID, and metadata.
Properties
The metadata for the command aggregate.
Determines if this aggregate follows an aggregation pattern where state and command aggregates are different types.
The named aggregate that this metadata belongs to.
The aggregate's ownership policy (@AggregateOwner, or the deprecated @AggregateRoute(owner = …), else OwnerPolicy.NEVER), resolved once here. Since 9.3.0.
Whether the aggregate is spaced (@Spaced, or the deprecated @AggregateRoute(spaced = true)), as parsed into CommandAggregateMetadata.spaced: the one source every consumer reads. Commands to an aggregate that is not spaced carry the default space whatever their source (HTTP, saga, in-process), the aggregate neither checks nor records a command's space, and its queries are not scoped by a space taken from a request.
The metadata for the state aggregate.
The static tenant ID configured for this aggregate, or null if not configured.
Functions
Creates an AggregateId for this AggregateMetadata with the specified parameters.