Package com.axelor.workflow.trigger
Class CaptureDispatcher
java.lang.Object
com.axelor.workflow.trigger.CaptureDispatcher
Dispatches durable record changes under fenced leases, completing with the database work.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchAll(List<Long> ids) Dispatch every envelope inids, each in its own transaction so one record's rollback cannot discard the others' work, all inside one re-entrancy guard context.pendingIds(int limit) Ids of envelopes nothing has taken, oldest first.booleanAn administrator has checked the external systems and decides whether the event may be replayed.intReturn safe abandoned work to the queue and retain ambiguous effects for reconciliation.intsweep()Delete dispatched envelopes past their retention; the run they started is the history.
-
Constructor Details
-
CaptureDispatcher
public CaptureDispatcher()
-
-
Method Details
-
pendingIds
Ids of envelopes nothing has taken, oldest first. -
dispatchAll
Dispatch every envelope inids, each in its own transaction so one record's rollback cannot discard the others' work, all inside one re-entrancy guard context. -
recoverExpired
public int recoverExpired()Return safe abandoned work to the queue and retain ambiguous effects for reconciliation. -
reconcile
An administrator has checked the external systems and decides whether the event may be replayed. The reason is kept even after a later successful dispatch. -
sweep
public int sweep()Delete dispatched envelopes past their retention; the run they started is the history. Failed ones are kept, since their reason is the only account of what went wrong.- Returns:
- how many were removed
-