ReadOnlyStateAggregate
Read-only interface for state aggregates that support read operations only.
This interface represents a state aggregate that has been loaded from a snapshot or event store and is intended for read-only operations. It provides access to all aggregate state and metadata without supporting command processing or state modification.
Key characteristics:
Supports read operations for querying aggregate state
Provides access to version, timing, and operator information
Does not support command processing or event sourcing
Can be converted to a writable StateAggregate when needed
Implementations should ensure that:
State cannot be modified through this interface
All read operations return consistent, accurate data
Version information reflects the current aggregate state
Since
1.0.0
Parameters
The type of the state data held by this aggregate.
See also
for the writable counterpart
for state objects that can be aware of their read-only aggregate