Process Manager Repository
public abstract class ProcessManagerRepository<I, P extends ProcessManager<I, S, ? extends Object>, S extends EntityState> extends EventDispatchingRepository<I, E, S> implements CommandDispatcherDelegate, EventProducingRepository
The abstract base for Process Managers repositories.
Parameters
<I>
the type of IDs of process managers
<P>
the type of process managers
<S>
the type of process manager state messages
See also
Inheritors
Functions
Link copied to clipboard
protected PmTransaction<? extends Object, ? extends Object, ? extends Object> beginTransactionFor(P manager)
Link copied to clipboard
Obtains a set of classes of commands handled by process managers of this repository.
Link copied to clipboard
Dispatches the command to a corresponding process manager.
Link copied to clipboard
Dispatches the given event to entities with the given identifiers, and returns the dispatch outcome.
Link copied to clipboard
Obtains classes of domestic events to which the process managers managed by this repository react.
Link copied to clipboard
Obtains classes of external events to which the process managers managed by this repository react.
Link copied to clipboard
Loads an entity by the passed ID or creates a new one, if the entity was not found.
Link copied to clipboard
Obtains a set of event classes to which process managers of this repository react.
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
Registers itself as an event dispatcher with the parent BoundedContext}.
Link copied to clipboard
A callback for derived classes to customize routing schema for commands.
Link copied to clipboard
Replaces default routing with the one which takes the target ID from the first field of an event message.
Link copied to clipboard
Creates and configures an instance of the process manager by the passed record.
Link copied to clipboard
Obtains a model class for the passed entity class value.
Inherited functions
Link copied to clipboard
public final void applyMigration<T extends TransactionalEntity<I, S, ? extends Object>>(I id, Migration<I, T, S> migration)
Applies a given Migration to an entity with the given ID.
public final void applyMigration<T extends TransactionalEntity<I, S, ? extends Object>>(Set<I> ids, Migration<I, T, S> migration)
Applies a Migration to several entities in batch.
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
Creates the storage for this repository.
Link copied to clipboard
Link copied to clipboard
Dispatches the message contained in the passed envelope and returns the outcome.
Dispatches the event to the corresponding entities.
Link copied to clipboard
Tells 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 EntityFactory associated with 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
Obtains classes of all events processed by this dispatcher.
Link copied to clipboard
Declared for mixing-in with eventFilter.
Link copied to clipboard
Filters passed events using the eventFilter filter} of this repository.
Link copied to clipboard
Finds an entity with the passed ID even if the entity is active.
Link copied to clipboard
Obtains iterator over entity records matching the passed filters.
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
Obtains iterator over all present entity records.
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
Ensures that the repository has the storage.
Link copied to clipboard
Returns
true
if the storage is assigned, false
otherwise.Link copied to clipboard
Obtains StorageConverter associated with this repository.