class DelegatingCatchUpHook implements CatchUpHookInterface (View source)

internal  
 

Methods

__construct(CatchUpHookInterface ...$catchUpHooks)

No description

void
onBeforeCatchUp()

This hook is called at the beginning of {ProjectionInterface::catchUpProjection()}; BEFORE the Database Lock is acquired (by {CheckpointStorageInterface::acquireLock()}).

void
onBeforeEvent(EventInterface $eventInstance, EventEnvelope $eventEnvelope)

This hook is called for every event during the catchup process, before the projection is updated. Thus, this hook runs AFTER the database lock is acquired.

void
onAfterEvent(EventInterface $eventInstance, EventEnvelope $eventEnvelope)

This hook is called for every event during the catchup process, after the projection is updated. Thus, this hook runs AFTER the database lock is acquired.

void
onBeforeBatchCompleted()

This hook is called directly before the database lock is RELEASED in {CheckpointStorageInterface::updateAndReleaseLock()}.

void
onAfterCatchUp()

This hook is called at the END of {ProjectionInterface::catchUpProjection()}, directly before exiting the method.

Details

__construct(CatchUpHookInterface ...$catchUpHooks)

No description

Parameters

CatchUpHookInterface ...$catchUpHooks

void onBeforeCatchUp()

This hook is called at the beginning of {ProjectionInterface::catchUpProjection()}; BEFORE the Database Lock is acquired (by {CheckpointStorageInterface::acquireLock()}).

Return Value

void

void onBeforeEvent(EventInterface $eventInstance, EventEnvelope $eventEnvelope)

This hook is called for every event during the catchup process, before the projection is updated. Thus, this hook runs AFTER the database lock is acquired.

Parameters

EventInterface $eventInstance
EventEnvelope $eventEnvelope

Return Value

void

void onAfterEvent(EventInterface $eventInstance, EventEnvelope $eventEnvelope)

This hook is called for every event during the catchup process, after the projection is updated. Thus, this hook runs AFTER the database lock is acquired.

Parameters

EventInterface $eventInstance
EventEnvelope $eventEnvelope

Return Value

void

void onBeforeBatchCompleted()

This hook is called directly before the database lock is RELEASED in {CheckpointStorageInterface::updateAndReleaseLock()}.

It can happen that this method is called multiple times, even without having seen Events in the meantime.

If there exist more events which need to be processed, the database lock is directly acquired again after it is released.

Return Value

void

void onAfterCatchUp()

This hook is called at the END of {ProjectionInterface::catchUpProjection()}, directly before exiting the method.

At this point, the Database Lock has already been released.

Return Value

void