public class AggregateSnapshotter extends AbstractSnapshotter
Constructor and Description |
---|
AggregateSnapshotter() |
Modifier and Type | Method and Description |
---|---|
protected DomainEvent |
createSnapshot(String typeIdentifier,
DomainEventStream eventStream)
Creates a snapshot event for an aggregate of the given
typeIdentifier of which passed events are
available in the given eventStream . |
void |
setAggregateFactories(List<AggregateFactory<?>> aggregateFactories)
Sets the aggregate factory to use.
|
createSnapshotterTask, getEventStore, getExecutor, scheduleSnapshot, setEventStore, setExecutor
protected DomainEvent createSnapshot(String typeIdentifier, DomainEventStream eventStream)
AbstractSnapshotter
typeIdentifier
of which passed events are
available in the given eventStream
. May return null
to indicate a snapshot event is not
necessary or appropriate for the given event stream.createSnapshot
in class AbstractSnapshotter
typeIdentifier
- The aggregate's type identifiereventStream
- The event stream containing the aggregate's past eventsnull
if none should be stored.public void setAggregateFactories(List<AggregateFactory<?>> aggregateFactories)
AggegateSnapshots
.aggregateFactories
- The list of aggregate factories creating the aggregates to store. May not be
null
or contain any null
values.NullPointerException
- if aggregateFactories
is null
or if contains any
null
values.Copyright © 2012. All Rights Reserved.