Aggregate Repository
public abstract class AggregateRepository<I, A extends Aggregate<I, ? extends Object, ? extends Object>> extends Repository<I, E> implements CommandDispatcher, EventProducingRepository, EventDispatcherDelegate
The repository which manages instances of Aggregate
s.
Parameters
<I>
the type of the aggregate IDs
<A>
the type of the aggregates managed by this repository
See also
Inheritors
Functions
Link copied to clipboard
Obtains class information of aggregates managed by this repository.
Link copied to clipboard
Returns the storage assigned to this aggregate.
Link copied to clipboard
Creates aggregate storage for the repository.
Link copied to clipboard
Dispatches the passed command to an aggregate.
Link copied to clipboard
Dispatches event to one or more aggregates reacting on the event.
Link copied to clipboard
Link copied to clipboard
Obtains domestic event classes dispatched by this delegate.
Link copied to clipboard
Obtains external event classes dispatched by this delegate.
Link copied to clipboard
Obtains classes of events that can be imported by aggregates of this repository.
Link copied to clipboard
Obtains a set of message classes that can be processed by this dispatcher.
Link copied to clipboard
protected final void onRoutingFailed(SignalEnvelope<? extends Object, ? extends Object, ? extends Object> envelope, Throwable cause)
A callback invoked when an exception is thrown from message routing.
Link copied to clipboard
Obtains classes of the events produced by entities of this repository.
Link copied to clipboard
Initializes the repository during its registration with its context.
Link copied to clipboard
Changes the number of events between making aggregate snapshots to the passed value.
Link copied to clipboard
A callback for derived classes to customize routing schema for commands.
Link copied to clipboard
A callback for derived classes to customize routing schema for events.
Link copied to clipboard
A callback for derived classes to customize routing schema for importable events.
Link copied to clipboard
Returns the number of events until a next
Snapshot
is made.Link copied to clipboard
Obtains a model class for the passed entity class value.
Inherited functions
Link copied to clipboard
Checks if this dispatcher can dispatch the given message.
Link copied to clipboard
Verifies that this instance is NOT registered yet.
Link copied to clipboard
Verifies that this instance is already registered.
Link copied to clipboard
Ensures that the storage is not null.
Link copied to clipboard
Obtains the
BoundedContext
to which this repository belongs.Link copied to clipboard
Link copied to clipboard
Verifies if this instance dispatches at least one command.
Link copied to clipboard
Verifies if this instance dispatches at least one event.
Link copied to clipboard
Verifies if this instance dispatches at least one external event.
Link copied to clipboard
Returns the class of entities managed by this repository.
Link copied to clipboard
Obtains model class for the entities managed by this repository.
Link copied to clipboard
Obtains the TypeUrl for the state objects wrapped by entities managed by this repository.
Link copied to clipboard
Creates an EventFilter for this repository.
Link copied to clipboard
Filters passed events using the eventFilter filter} of this repository.
Link copied to clipboard
Verifies whether the repository is registered with a
BoundedContext
.Link copied to clipboard
Tells if the repository is registered in a
BoundedContext
.Link copied to clipboard
Tells if this repository should be registered as a type supplier with a
Stand
of the BoundedContext
to which this repository belongs.Link copied to clipboard
Obtains an instance of EntityLifecycle for the entity with the given ID.
Link copied to clipboard
The callback is invoked by a BoundedContext when adding the repository.
Link copied to clipboard
Filters the passed events and posts the result to the EventBus.
Link copied to clipboard
public void postIfCommandRejected(SignalEnvelope<? extends Object, ? extends Object, ? extends Object> signal, Throwable cause)
If the passed signal is a command and the thrown cause is a rejection, posts the rejection to the associated EventBus.
Link copied to clipboard
Returns
true
if the storage is assigned, false
otherwise.