org.axonframework.eventstore
Interface PartialStreamSupport

All Known Implementing Classes:
JdbcEventStore, JpaEventStore, MongoEventStore, MongoEventStore

public interface PartialStreamSupport

Interface implemented by Event Stores that support reading partial event streams.

Since:
2.1
Author:
Allard Buijze

Method Summary
 DomainEventStream readEvents(String type, Object identifier, long firstSequenceNumber)
          Returns a Stream containing events for the aggregate identified by the given type and identifier, starting at the event with the given firstSequenceNumber (included).
 DomainEventStream readEvents(String type, Object identifier, long firstSequenceNumber, long lastSequenceNumber)
          Returns a Stream containing events for the aggregate identified by the given type and identifier, starting at the event with the given firstSequenceNumber (included) up to and including the event with given lastSequenceNumber.
 

Method Detail

readEvents

DomainEventStream readEvents(String type,
                             Object identifier,
                             long firstSequenceNumber)
Returns a Stream containing events for the aggregate identified by the given type and identifier, starting at the event with the given firstSequenceNumber (included).

The returned stream will not contain any snapshot events.

Parameters:
type - The type identifier of the aggregate
identifier - The identifier of the aggregate
firstSequenceNumber - The sequence number of the first event to find
Returns:
a Stream containing events for the given aggregate, starting at the given first sequence number

readEvents

DomainEventStream readEvents(String type,
                             Object identifier,
                             long firstSequenceNumber,
                             long lastSequenceNumber)
Returns a Stream containing events for the aggregate identified by the given type and identifier, starting at the event with the given firstSequenceNumber (included) up to and including the event with given lastSequenceNumber. If no event with given lastSequenceNumber exists, the returned stream will simply read until the end of the aggregate's events.

The returned stream will not contain any snapshot events.

Parameters:
type - The type identifier of the aggregate
identifier - The identifier of the aggregate
firstSequenceNumber - The sequence number of the first event to find
lastSequenceNumber - The sequence number of the last event in the stream
Returns:
a Stream containing events for the given aggregate, starting at the given first sequence number


Copyright © 2010-2016. All Rights Reserved.