T- The type of aggregate this factory creates
public interface AggregateFactory<T>
|Modifier and Type||Method and Description|
Instantiate the aggregate root using the given aggregate identifier and first event.
Returns the type of aggregate this factory creates.
T createAggregateRoot(String aggregateIdentifier, DomainEventMessage<?> firstEvent)
aggregateIdentifier- the aggregate identifier of the aggregate to instantiate
firstEvent- The first event in the event stream. This is either the event generated during creation of the aggregate, or a snapshot event
Copyright © 2010–2021. All rights reserved.