public static class RunEventReplay.StubEventStore extends Object implements EventStoreManagement, EventStore
Constructor and Description |
---|
RunEventReplay.StubEventStore() |
Modifier and Type | Method and Description |
---|---|
void |
appendEvents(String type,
DomainEventStream events)
Append the events in the given
stream to the event store. |
CriteriaBuilder |
newCriteriaBuilder()
Returns a CriteriaBuilder that allows the construction of criteria for this EventStore implementation
|
DomainEventStream |
readEvents(String type,
Object identifier)
Read the events of the aggregate identified by the given type and identifier that allow the current aggregate
state to be rebuilt.
|
void |
visitEvents(Criteria criteria,
EventVisitor visitor)
Loads all events available in the event store that match the given
criteria and calls EventVisitor.doWithEvent(org.axonframework.domain.DomainEventMessage) for each event found. |
void |
visitEvents(EventVisitor visitor)
Loads all events available in the event store and calls
EventVisitor.doWithEvent(org.axonframework.domain.DomainEventMessage)
for each event found. |
public void appendEvents(String type, DomainEventStream events)
EventStore
stream
to the event store.appendEvents
in interface EventStore
type
- The type descriptor of the object to storeevents
- The event stream containing the events to storepublic void visitEvents(EventVisitor visitor)
EventStoreManagement
EventVisitor.doWithEvent(org.axonframework.domain.DomainEventMessage)
for each event found. Events of a single aggregate are guaranteed to be ordered by their sequence number.
Implementations are encouraged, though not required, to supply events in the absolute chronological order.
Processing stops when the visitor throws an exception.visitEvents
in interface EventStoreManagement
visitor
- The visitor the receives each loaded eventpublic void visitEvents(Criteria criteria, EventVisitor visitor)
EventStoreManagement
criteria
and calls EventVisitor.doWithEvent(org.axonframework.domain.DomainEventMessage)
for each event found. Events of a single
aggregate are guaranteed to be ordered by their sequence number.
Implementations are encouraged, though not required, to supply events in the absolute chronological order.
Processing stops when the visitor throws an exception.visitEvents
in interface EventStoreManagement
criteria
- The criteria describing the events to selectvisitor
- The visitor the receives each loaded eventEventStoreManagement.newCriteriaBuilder()
public CriteriaBuilder newCriteriaBuilder()
EventStoreManagement
newCriteriaBuilder
in interface EventStoreManagement
EventStoreManagement.visitEvents(Criteria, org.axonframework.eventstore.EventVisitor)
public DomainEventStream readEvents(String type, Object identifier)
EventStore
readEvents
in interface EventStore
type
- The type descriptor of the object to retrieveidentifier
- The unique aggregate identifier of the events to loadCopyright © 2010-2014. All Rights Reserved.