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 Details

    • onSuccess

      void onSuccess(String eventName, Cursor cursor) throws IOException
      Commits one cursor on successful event consumption, i.e. if Listener.accept(List)} did not throw an exception.
      Parameters:
      eventName - event name
      cursor - cursor to commit
      Throws:
      IOException - in case of errors during committing
    • onSuccess

      void onSuccess(String eventName, List<Cursor> cursors) throws IOException
      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 name
      cursors - cursors to commit
      Throws:
      IOException - in case of errors during committing
    • getCursors

      Collection<Cursor> getCursors(String eventName) throws IOException
      Throws:
      IOException
    • addSubscription

      default void addSubscription(Subscription subscription)
    • addStreamId

      default void addStreamId(Subscription subscription, String streamId)