exchange

fun exchange(vararg events: Pair<EventIdentifier, ByteArray>, strategy: SyncStrategy = SyncStrategy.Continuous): Exchange<Message.Incoming, Message.Outgoing>

Creates a new Exchange with a backing event log.

Parameters

events

some initial events to populate the event log.

strategy

the SyncStrategy that's applied. Defaults to SyncStrategy.Continuous.


fun exchange(log: MutableEventLog, strategy: SyncStrategy = SyncStrategy.Continuous): Exchange<Message.Incoming, Message.Outgoing>

Creates a new Exchange with a backing event log.

Parameters

log

the MutableEventLog backing the exchange.

strategy

the SyncStrategy that's applied. Defaults to SyncStrategy.Continuous.