Package outbox.dispatch
Interface InFlightTracker
- All Known Implementing Classes:
DefaultInFlightTracker
public interface InFlightTracker
Tracks in-flight events to prevent duplicate concurrent dispatch of the same event.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidReleases processing rights, allowing the event to be dispatched again.booleantryAcquire(String eventId) Attempts to acquire exclusive processing rights for the given event.
-
Method Details
-
tryAcquire
Attempts to acquire exclusive processing rights for the given event.- Parameters:
eventId- the event ID to acquire- Returns:
trueif acquired,falseif already in flight
-
release
Releases processing rights, allowing the event to be dispatched again.- Parameters:
eventId- the event ID to release
-