ApplicationDataHolder

App-wide, in-memory data store — survives navigation between screens but is lost when the app process dies (no persistence). Backs the server DSL's applicationPlainData() (flat key-value) and applicationSegmentedData(segmentId) (namespaced key-value) data sources, read/written by GetData/UpdateData/RemoveData and evaluated by EvaluateData.

A single Koin single instance (DefaultApplicationDataHolder) backs the whole app; contrast with ScreenDataHolder, whose plain/segmented data is scoped to one screen instead.

Inheritors

Functions

Link copied to clipboard
abstract fun addPlainData(data: Any?, dataId: String)

Writes data under dataId in the flat (non-segmented) store, overwriting any existing value. The mechanism behind UpdateData targeting applicationPlainData().

Link copied to clipboard
abstract fun addSegmentedData(data: Any?, segmentId: String, dataId: String)

Writes data under dataId within the namespace segmentId, overwriting any existing value — creating the segment if it doesn't exist yet. The mechanism behind UpdateData targeting applicationSegmentedData(segmentId).

Link copied to clipboard
abstract fun getAllPlainData(): Map<String, Any?>

Every flat entry currently stored, keyed by data id. The mechanism behind GetData's fullAccessMode() over applicationPlainData().

Link copied to clipboard
abstract fun getAllSegmentedData(segmentId: String): Map<String, Any?>?

Every entry currently stored within segmentId, keyed by data id. The mechanism behind GetData's fullAccessMode() over applicationSegmentedData(segmentId).

Link copied to clipboard
abstract fun getPlainData(dataId: String): Any?

Reads the flat entry stored under dataId.

Link copied to clipboard
abstract fun getSegmentedData(dataId: String, segmentId: String): Any?

Reads the entry stored under dataId within segmentId.

Link copied to clipboard
abstract fun removePlainData(dataId: String)

Removes the flat entry stored under dataId, if any. The mechanism behind RemoveData targeting applicationPlainData().

Link copied to clipboard
abstract fun removeSegmentedData(segmentId: String, dataId: String)

Removes the entry stored under dataId within segmentId, if any. The mechanism behind RemoveData targeting applicationSegmentedData(segmentId).

Link copied to clipboard
abstract fun wipePlainData()

Clears every flat entry. The mechanism behind RemoveData's fullAccessMode() over applicationPlainData().

Link copied to clipboard
abstract fun wipeSegmentedData()

Clears every segment entirely — every namespace, not just one.

abstract fun wipeSegmentedData(segmentId: String)

Clears every entry within segmentId, leaving other segments untouched.