registerWith

public void registerWith(BoundedContext context)

Initializes the repository.

Ensures there is at least one event subscriber method (external or domestic) declared by the class of the projection. Throws an IllegalStateException otherwise.

If projections of this repository are subscribed to entity state updates, a routing for state updates is created and configured. If one of the states of entities cannot be routed during the created schema, IllegalStateException will be thrown.

Initializes the Inboxes for the instances of this repository and creates a RepositoryCache to optimize the delivery of the event batches.

Creates an instance of the CatchUpProcess enabling this repository to catch-up its instances.

Parameters

context

the BoundedContext of this repository

Throws

if the state routing does not cover one of the entity state types to which the entities are subscribed