org.axonframework.eventsourcing
Class AggregateSnapshot<T extends EventSourcedAggregateRoot>
java.lang.Object
org.axonframework.domain.EventBase
org.axonframework.domain.DomainEvent
org.axonframework.eventsourcing.AggregateSnapshot<T>
- Type Parameters:
T - The type of aggregate this snapshot captures
- All Implemented Interfaces:
- Serializable, Event
public class AggregateSnapshot<T extends EventSourcedAggregateRoot>
- extends DomainEvent
Snapshot event that captures the entire aggregate. The motivation is that the aggregate contains all relevant state.
- Since:
- 0.6
- Author:
- Allard Buijze
- See Also:
- Serialized Form
|
Constructor Summary |
AggregateSnapshot(T aggregate)
Initialize a new AggregateSnapshot for the given aggregate. |
|
Method Summary |
T |
getAggregate()
Return the aggregate that was captured in this snapshot. |
AggregateSnapshot
public AggregateSnapshot(T aggregate)
- Initialize a new AggregateSnapshot for the given
aggregate. Note that the aggregate may not contain
uncommitted modifications.
- Parameters:
aggregate - The aggregate containing the state to capture in the snapshot
- Throws:
IllegalArgumentException - if the aggregate contains uncommitted modifications
getAggregate
public T getAggregate()
- Return the aggregate that was captured in this snapshot.
- Returns:
- the aggregate that was captured in this snapshot.
Copyright © 2011. All Rights Reserved.