kernl.data.source.builder.MemoryCacheDataSourceBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Kernl.Runtime Show documentation
Show all versions of Kernl.Runtime Show documentation
Kernl: A Kotlin Symbol Processing (KSP) library for automatic repository generation.
package io.github.mattshoe.shoebox.kernl.data.source.builder
import io.github.mattshoe.shoebox.kernl.data.source.DataSource
import io.github.mattshoe.shoebox.kernl.data.source.impl.MemoryCachedDataSource
import kotlinx.coroutines.Dispatchers
import kotlin.reflect.KClass
class MemoryCacheDataSourceBuilder(
clazz: KClass
): DataSourceBuilder(
clazz
) {
override fun build(): DataSource {
return MemoryCachedDataSource(dispatcher ?: Dispatchers.IO)
}
}