StaticData

class StaticData<T : Any>(type: KType, value: T, meta: Meta) : StaticGoal<T> , Data<T>

Functions

async
Link copied to clipboard
common
abstract fun async(coroutineScope: CoroutineScope): Deferred<T>

Get ongoing computation or start a new one. Does not guarantee thread safety. In case of multi-thread access, could create orphan computations.

reset
Link copied to clipboard
common
abstract fun reset()

Reset the computation

toMeta
Link copied to clipboard
common
open override fun toMeta(): Meta

Properties

deferred
Link copied to clipboard
common
abstract val deferred: Deferred<T>?

Returns current running coroutine if the goal is started. Null if the computation is not started.

dependencies
Link copied to clipboard
common
abstract val dependencies: Collection<Goal<*>>
meta
Link copied to clipboard
common
open override val meta: Meta

Meta for the data

type
Link copied to clipboard
common
open override val type: KType

Type marker for the data. The type is known before the calculation takes place so it could be checked.

value
Link copied to clipboard
common
val value: T