Package org.zalando.fahrschein
Class ManagedCursorManager
java.lang.Object
org.zalando.fahrschein.ManagedCursorManager
- All Implemented Interfaces:
CursorManager
-
Constructor Summary
ConstructorsConstructorDescriptionManagedCursorManager(URI baseUri, org.zalando.fahrschein.http.api.RequestFactory clientHttpRequestFactory) ManagedCursorManager(URI baseUri, org.zalando.fahrschein.http.api.RequestFactory clientHttpRequestFactory, AuthorizationProvider authorizationProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStreamId(Subscription subscription, String streamId) 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.
-
Constructor Details
-
ManagedCursorManager
public ManagedCursorManager(URI baseUri, org.zalando.fahrschein.http.api.RequestFactory clientHttpRequestFactory, AuthorizationProvider authorizationProvider) -
ManagedCursorManager
public ManagedCursorManager(URI baseUri, org.zalando.fahrschein.http.api.RequestFactory clientHttpRequestFactory)
-
-
Method Details
-
addSubscription
- Specified by:
addSubscriptionin interfaceCursorManager
-
addStreamId
- Specified by:
addStreamIdin interfaceCursorManager
-
onSuccess
Description copied from interface:CursorManagerCommits one cursor on successful event consumption, i.e. ifListener.accept(List)} did not throw an exception.- Specified by:
onSuccessin interfaceCursorManager- Parameters:
eventName- event namecursor- cursor to commit- Throws:
IOException- in case of errors during committingCursorCommitException
-
onSuccess
Description copied from interface:CursorManagerCommits 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.- Specified by:
onSuccessin interfaceCursorManager- Parameters:
eventName- event namecursors- cursors to commit- Throws:
IOException- in case of errors during committing
-
getCursors
- Specified by:
getCursorsin interfaceCursorManager- Throws:
IOException
-