All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.DataLoader.kt Maven / Gradle / Ivy

package io.fluidsonic.dataloader


public interface DataLoader {

	public suspend fun clear(key: Key) // FIXME suspend?
	public suspend fun clearAll() // FIXME suspend?
	public suspend fun load(key: Key): Value
	public suspend fun loadMany(keys: Iterable): List>
	public suspend fun prime(key: Key, value: Result) // FIXME suspend?

	public companion object
}


// FIXME suspend?
public suspend fun  DataLoader.prime(key: Key, value: Value) {
	prime(key, Result.success(value))
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy