Phase

public abstract class Phase<I>

An atomic entity state change which advances the entity version.

The Phase is a part of transaction mechanism and should only be propagated during the active transaction.

Typically, to perform the entity state change, a Phase executes some event/command dispatch task provided by the caller from the outside.

The result of the dispatch task execution could be the list of events if the applier method generated events or the list of commands if the dispatch was performed to the commanding method.

Parameters

<I>

the type of entity ID

See also

Inheritors

Functions

Link copied to clipboard
protected abstract I entityId()
Returns the ID of the entity to which the Message is dispatched.
Link copied to clipboard
protected abstract SignalId messageId()
Returns the dispatched Message ID.
Link copied to clipboard
protected abstract DispatchOutcome performDispatch()
Executes the dispatch task and returns the result.
Link copied to clipboard
protected abstract Signal<?, ?, ?> signal()
Obtains the signal message applied by this phase.