ProjectionEndpoint

public class ProjectionEndpoint<I, P extends Projection<I, S, ? extends Object>, S extends EntityState> extends EntityMessageEndpoint<I, E, M> implements EventEndpoint<I>

Dispatches an event to projections.

Constructors

Link copied to clipboard
protected void ProjectionEndpoint(Repository<I, P> repository, EventEnvelope event)

Functions

Link copied to clipboard
protected void afterDispatched(I entityId)
The callback invoked after the message is dispatched to an entity with the given ID.
Link copied to clipboard
protected DispatchOutcome invokeDispatcher(P projection)
Invokes entity-specific method for dispatching the message.
Link copied to clipboard
protected boolean isModified(P projection)
Verifies whether the entity was modified during the message dispatching.
Link copied to clipboard
protected void onEmptyResult(P entity)
Does nothing since a state of a projection should not be necessarily updated upon execution of a subscriber method.
Link copied to clipboard
protected void onModified(P projection)
Callback to perform operations if the entity was modified during message dispatching.
Link copied to clipboard
protected DispatchOutcome performDispatch(I entityId)
Performs actual dispatching of the signal to the respective target by the passed ID.
Link copied to clipboard
public ProjectionRepository<I, P, ? extends Object> repository()
Obtains the parent repository of this endpoint.
Link copied to clipboard
protected DispatchOutcome runTransactionFor(P projection)

Inherited functions

Link copied to clipboard
public final DispatchOutcome dispatchTo(I targetId)
Dispatches the message to the target with the passed ID.
Link copied to clipboard
protected final M envelope()
Obtains the envelope of the message processed by this endpoint.
Link copied to clipboard
public void onDuplicate(I target, EventEnvelope envelope)
public abstract void onDuplicate(I target, M envelope)
The callback invoked if the handled signal is a duplicate.
Link copied to clipboard
protected final void store(E entity)
Stores the entity if it was modified during message dispatching.