OneWayMutableProjection

class OneWayMutableProjection<M, T>(    projection: OneWayProjection<M, T>,     eventSerializer: KSerializer<T>,     format: BinaryFormat) : MutableProjection<M>

An implementation of a MutableProjection which wraps a TwoWayProjection with some dedicated serializers. This lets consumers of MutableProjection offer a higher-level API which works on generic types, rather than sequences of bytes.

Parameters

projection

the backing OneWayProjection.

eventSerializer

the KSerializer for the events.

format

the BinaryFormat to use to store events.

M

the type of the model.

T

the type of the events.

Constructors

Link copied to clipboard
fun <M, T> OneWayMutableProjection(    projection: OneWayProjection<M, T>,     eventSerializer: KSerializer<T>,     format: BinaryFormat)

Functions

Link copied to clipboard
open override fun backward(    model: M,     identifier: EventIdentifier,     data: MutableByteGapBuffer,     from: Int,     until: Int,     changeData: MutableByteGapBuffer,     changeFrom: Int,     changeUntil: Int): M
Link copied to clipboard
open override fun ChangeScope.forward(    model: M,     identifier: EventIdentifier,     data: MutableByteGapBuffer,     from: Int,     until: Int): M