Class StatefulAggregateInMemoryProjector
java.lang.Object
dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInMemoryProjector
- All Implemented Interfaces:
InMemoryProjector
Aggregate specific InMemoryProjectorNote: An in memory projection is never associated with a
UnitOfWork and any changes to the aggregate
won't automatically be persisted. Use the StatefulAggregateRepository for transactional usage.-
Constructor Summary
ConstructorsConstructorDescriptionStatefulAggregateInMemoryProjector(StatefulAggregateInstanceFactory aggregateRootInstanceFactory) StatefulAggregateInMemoryProjector(StatefulAggregateInstanceFactory aggregateRootInstanceFactory, AggregateSnapshotRepository aggregateSnapshotRepository) -
Method Summary
Modifier and TypeMethodDescription<ID,PROJECTION>
Optional<PROJECTION>projectEvents(AggregateType aggregateType, ID aggregateId, Class<PROJECTION> projectionType, EventStore eventStore) boolean
-
Constructor Details
-
StatefulAggregateInMemoryProjector
public StatefulAggregateInMemoryProjector(StatefulAggregateInstanceFactory aggregateRootInstanceFactory) -
StatefulAggregateInMemoryProjector
public StatefulAggregateInMemoryProjector(StatefulAggregateInstanceFactory aggregateRootInstanceFactory, AggregateSnapshotRepository aggregateSnapshotRepository) - Parameters:
aggregateRootInstanceFactory- factory for creating aggregate root instancesaggregateSnapshotRepository- optional (may be null)AggregateSnapshotRepository
-
-
Method Details
-
supports
- Specified by:
supportsin interfaceInMemoryProjector
-
projectEvents
public <ID,PROJECTION> Optional<PROJECTION> projectEvents(AggregateType aggregateType, ID aggregateId, Class<PROJECTION> projectionType, EventStore eventStore) - Specified by:
projectEventsin interfaceInMemoryProjector
-