InMemoryTimeline

class InMemoryTimeline(initialEvents: List<StoredEvent>, cursors: CursorCodec) : Timeline, TimelineAppender

Reference timeline query implementation used by tests and by the future Room adapter.

Constructors

Link copied to clipboard
constructor(initialEvents: List<StoredEvent>, cursors: CursorCodec)

Functions

Link copied to clipboard
open override fun append(event: StoredEvent)
Link copied to clipboard
open override fun contains(eventId: String): Boolean
Link copied to clipboard
open override fun page(query: TimelineQuery): TimelinePage
Link copied to clipboard
fun replace(events: List<StoredEvent>)

Atomically replaces hydrated history when the active app-run changes.

Link copied to clipboard
fun replaceSession(sessionId: String, persisted: List<StoredEvent>)

Replaces one app-run while retaining events appended for that same run during hydration.