docs: public long getLastCompleted() {
      // If there are any queued events, return the index prior to the first event in the queue.
      EventHolder event = events.peek();
      if (event != null && event.eventIndex > completeIndex) {
        return event.eventIndex - 1;
      }
      // If no events are queued, return the highest index applied to the session.
      return lastApplied;
    }