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

xtdb.api.module.XtdbModule.kt Maven / Gradle / Ivy

The newest version!
package xtdb.api.module

import kotlinx.serialization.InternalSerializationApi
import kotlinx.serialization.KSerializer
import kotlinx.serialization.serializer
import xtdb.api.Xtdb
import xtdb.api.log.Log
import xtdb.api.storage.ObjectStore
import xtdb.api.storage.ObjectStore.Factory
import kotlin.reflect.KClass

interface XtdbModule : AutoCloseable {

    interface Factory{
        val moduleKey: String

        fun openModule(xtdb: Xtdb): XtdbModule
    }

    interface Registry {
        @OptIn(InternalSerializationApi::class)
        fun  registerModuleFactory(factory: KClass, serializer: KSerializer = factory.serializer())

        @OptIn(InternalSerializationApi::class)
        fun  registerLogFactory(factory: KClass, serializer: KSerializer = factory.serializer())

        @OptIn(InternalSerializationApi::class)
        fun  registerObjectStore(factory: KClass, serializer: KSerializer = factory.serializer())
    }

    interface Registration {
        fun register(registry: Registry)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy