EventStore

interface EventStore

An EventStore is responsible for storing and retrieving Events.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun append(event: Event): Either<StoreError, Event>

Creates a new copy of the event with a new id and stores it in this EventStore.

Link copied to clipboard
abstract suspend fun exists(id: Long): Either<StoreError, Boolean>
Link copied to clipboard
abstract suspend fun get(id: Long): Either<StoreError, Event>
Link copied to clipboard
abstract suspend fun getAll(): Either<StoreError, List<Event>>
Link copied to clipboard
abstract suspend fun getEventsForBusinessObject(id: Long): Either<StoreError, List<Event>>
Link copied to clipboard
abstract suspend fun size(): Either<StoreError, Long>