in

infix inline fun <C, R, P : Any> AuditKeyword<C, R>.in(journal: SagaJournal<P>)

Supplies the journal and resolves the codec for the keep audit in journal chain.

This function is inline reified — the payload type P is captured from the journal's type argument at the call site and used to look up the registered PayloadCodec from the companion registry.

Error on missing codec: if no PayloadCodec<P> is registered, an IllegalStateException is thrown immediately with a message that:

  • names the missing payload type,

  • points at PayloadCodec.register for the registry path, and

  • points at the typed sagaExecutor(journal = ..., codec = ...) factory for an escape hatch.

Example

// Register once at startup:
PayloadCodec.register<OrderEvent>(orderCodec)

// Inside saga block:
keep.audit `in` roomJournal // P = OrderEvent, codec resolved from registry

Parameters

journal

The journal that will receive saga entries.

Throws

if no PayloadCodec<P> has been registered.