Projection Repository
Abstract base for repositories managing Projections.
Provides an API for the entity catch-up. During this process, the framework re-builds the states of all or the selected projection instances by replaying the historical events from the EventStore of its Bounded Context. The catch-up process is fully automated and may be scaled across instances.
To start the catch-up, one should call a corresponding method (see below).
TaskViewRepository repository = new TaskViewRepository();
BoundedContextBuilder builder = BoundedContext.singleTenant("Tasks")
.add(repository)
.build();
// ...
//Start the catch-up when needed:
Timestamp replayHistorySince = ...
repository.catchUp(replayHistorySince, ImmutableSet.of(outdatedTaskId, anotherOne));
All the live events dispatched to the entities-under-catch-up are not lost. They are preserved and dispatched to the projections in a proper historical order.
After the catch-up is completed, the framework automatically switches back to the propagation of the live events.
Parameters
the type of IDs of projections
the type of projections
the type of projection state messages
Inheritors
Functions
TypeUrl under which the entities of this repository will register their Inboxes.Inherited functions
BoundedContext to which this repository belongs.BoundedContext.BoundedContext.Stand of the BoundedContext to which this repository belongs.true if the storage is assigned, false otherwise.