Package org.zalando.fahrschein
Interface CursorManager
- All Known Implementing Classes:
ManagedCursorManager
public interface CursorManager
Manages cursor offsets for one consumer. One consumer can handle several distinct event types.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddStreamId(Subscription subscription, String streamId) default voidaddSubscription(Subscription subscription) getCursors(String eventName) voidCommits a list of cursors on successful event consumption for multiple cursors of the same event type.voidCommits one cursor on successful event consumption, i.e.
-
Method Details
-
onSuccess
Commits one cursor on successful event consumption, i.e. ifListener.accept(List)} did not throw an exception.- Parameters:
eventName- event namecursor- cursor to commit- Throws:
IOException- in case of errors during committing
-
onSuccess
Commits a list of cursors on successful event consumption for multiple cursors of the same event type. This is useful to reset a consumer to a point in time like the beginning or the end of an event type.- Parameters:
eventName- event namecursors- cursors to commit- Throws:
IOException- in case of errors during committing
-
getCursors
- Throws:
IOException
-
addSubscription
-
addStreamId
-