public class DomainEventTracker extends Object implements Runnable, UnitOfWorkEventsListener
Upon startup the tracker will get all the transactions from the store since the last check, and delegate them to the given Output. It will also register itself with the store so that it can get continuous updates.
Then, as transactions come in from the store, they will be processed in real-time. If a transaction is successfully handled the configuration of the service, which must extend DomainEventTrackerConfiguration, will update the marker for the last successfully handled transaction.
Constructor and Description |
---|
DomainEventTracker(EventStream stream,
EventSource source,
Configuration<? extends DomainEventTrackerConfiguration> configuration,
Output<UnitOfWorkDomainEventsValue,? extends Throwable> output) |
Modifier and Type | Method and Description |
---|---|
void |
notifyTransactions(Iterable<UnitOfWorkDomainEventsValue> transactions) |
void |
run() |
void |
start() |
void |
stop() |
public DomainEventTracker(EventStream stream, EventSource source, Configuration<? extends DomainEventTrackerConfiguration> configuration, Output<UnitOfWorkDomainEventsValue,? extends Throwable> output)
public void start()
public void stop()
public void notifyTransactions(Iterable<UnitOfWorkDomainEventsValue> transactions)
notifyTransactions
in interface UnitOfWorkEventsListener