OneWayMutableProjection
class OneWayMutableProjection<M, T>( projection: OneWayProjection<M, T>, eventSerializer: KSerializer<T>, format: BinaryFormat) : MutableProjection<M>
Content copied to clipboard
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)
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
open override fun ChangeScope.forward( model: M, identifier: EventIdentifier, data: MutableByteGapBuffer, from: Int, until: Int): M
Content copied to clipboard