22a167ed03
EventStore/MutableEventStore (get с EventSeqResult.expired, push, dropAllBefore, clear, min/max курсоров) и ksqlite-реализация KSqliteMutableEventStore: кэш граничных курсоров, пагинация чтения, требование возрастающего курсора. Тесты на in-memory SQLite.
14 lines
382 B
Kotlin
14 lines
382 B
Kotlin
package pw.binom
|
|
|
|
import pw.binom.agentik.cursor.Cursor
|
|
|
|
interface MutableEventStore<EVENT> : EventStore<EVENT> {
|
|
fun push(event: Event<EVENT>) = push(event.data, event.seq)
|
|
fun push(event: EVENT, cursor: Cursor)
|
|
fun clear()
|
|
|
|
/**
|
|
* Удаляет все события ДО [cursor] включая сам [cursor]
|
|
*/
|
|
fun dropAllBefore(cursor: Cursor)
|
|
} |