Interface SessionEventStore

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
InMemorySessionEventStore

public interface SessionEventStore extends Closeable
Persists and replays session events (request/responses, notifications).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Appends an event to the log.
    long
    drain(String sessionId, long cursor, Predicate<SessionEvent> processor)
    Drains events to the processor one at a time until exhausted or backpressured; returns the last cursor.
    replay(String sessionId, long lastSeq)
    Returns all events for the session with sequence number greater than lastSeq.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • append

      void append(SessionEvent event)
      Appends an event to the log.
    • drain

      long drain(String sessionId, long cursor, Predicate<SessionEvent> processor)
      Drains events to the processor one at a time until exhausted or backpressured; returns the last cursor.
    • replay

      default List<SessionEvent> replay(String sessionId, long lastSeq)
      Returns all events for the session with sequence number greater than lastSeq.