|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventstore.supporting.SequenceEventStore
public class SequenceEventStore
Joins two EventStores together.
First EventStore is read-only, supposed to hold the oldest events. The second EventStore is both read
and write. Appends are only directed to the second EventStore, supposed to hold newer events.
Reads are first made from the first EventStore, then from the second EventStore.
| Constructor Summary | |
|---|---|
SequenceEventStore(EventStore second,
EventStoreManagement secondManagement,
EventStore first,
EventStoreManagement firstManagement)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SequenceEventStore(EventStore second,
EventStoreManagement secondManagement,
EventStore first,
EventStoreManagement firstManagement)
| Method Detail |
|---|
public void visitEvents(EventVisitor visitor)
EventStoreManagementEventVisitor.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 EventStoreManagementvisitor - The visitor the receives each loaded event
public void visitEvents(Criteria criteria,
EventVisitor visitor)
EventStoreManagementcriteria 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 EventStoreManagementcriteria - The criteria describing the events to selectvisitor - The visitor the receives each loaded eventEventStoreManagement.newCriteriaBuilder()public CriteriaBuilder newCriteriaBuilder()
EventStoreManagement
newCriteriaBuilder in interface EventStoreManagementEventStoreManagement.visitEvents(Criteria, org.axonframework.eventstore.EventVisitor)
public void appendEvents(String type,
DomainEventStream events)
EventStorestream to the event store.
appendEvents in interface EventStoretype - The type descriptor of the object to storeevents - The event stream containing the events to store
public DomainEventStream readEvents(String type,
Object identifier)
EventStore
readEvents in interface EventStoretype - The type descriptor of the object to retrieveidentifier - The unique aggregate identifier of the events to load
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||