Добавляет модуль :sync — generic cursor-journal событий.
EventStore/MutableEventStore (get с EventSeqResult.expired, push, dropAllBefore, clear, min/max курсоров) и ksqlite-реализация KSqliteMutableEventStore: кэш граничных курсоров, пагинация чтения, требование возрастающего курсора. Тесты на in-memory SQLite.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user