Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.modules/DataLayer/transactionally

transactionally

abstract fun transactionally(block: Callback<DataStore.Editor>): Single<TealiumResult<Unit>>

Allows editing of the DataLayer using a DataStore.Editor to enable more fine-grained control over key-value additions and removals.

Callers are expected to call DataStore.Editor.commit when ready to save all updates. Exiting the block without committing will do nothing.

The DataStore.Editor supplied to the block will be closed upon exiting, and any usage outside the provided block will throw.

Return

A Single which can be used to subscribe a block of code to receive any errors that occur

Parameters

block

The block of code used to update the DataLayer

Generated by Dokka
(c) Tealium 2026