Class DefaultAggregateRepository.AnnotatedAggregateRepository<T>
java.lang.Object
io.fluxzero.sdk.persisting.repository.DefaultAggregateRepository.AnnotatedAggregateRepository<T>
- Type Parameters:
T- the aggregate root type
- Enclosing class:
DefaultAggregateRepository
Aggregate-type-specific delegate used internally by
DefaultAggregateRepository.
This class is instantiated per aggregate class and parses metadata from the Aggregate annotation to determine:
- Whether the aggregate is event-sourced or backed by the document store.
- If and how frequently snapshots should be created.
- Whether the aggregate is indexed for search.
- How events should be published and committed.
- Which cache(s) to use.
It provides loading and committing capabilities tailored to the configured storage and publication strategy. It also supports refetching aggregates from the Fluxzero Runtime and maintaining relationships with child entities.
Snapshot and document-based aggregates are supported out of the box. Event replay is triggered as needed.
This class is not intended to be used directly outside the DefaultAggregateRepository.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit(Entity<?> after, List<AppliedEvent> unpublishedEvents, Entity<?> before) eventSourceModel(Entity<T> model) loadSnapshot(Object id) protected ImmutableAggregateRoot<T> restoreSnapshotId(Object id, Entity<T> snapshot) protected booleanwithHistoricalSnapshots(ImmutableAggregateRoot<T> snapshot, Object aggregateId)
-
Constructor Details
-
AnnotatedAggregateRepository
-
-
Method Details
-
fromValue
-
delete
-
load
-
loadSnapshot
-
restoreSnapshotId
-
withHistoricalSnapshots
-
eventSourceModel
-
commit
-
updatesAggregateState
-