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

ch.ninecode.cim.CIMRegistrator.scala Maven / Gradle / Ivy

There is a newer version: 2.12-3.0.1-5.1.1
Show newest version
package ch.ninecode.cim

import com.esotericsoftware.kryo.Kryo
import org.apache.spark.serializer.KryoRegistrator

import ch.ninecode.model.BasicElement
import ch.ninecode.model.BasicElementSerializer
import ch.ninecode.model.Unknown
import ch.ninecode.model.UnknownSerializer

class CIMRegistrator extends KryoRegistrator
{
    override def registerClasses (kryo: Kryo)
    {
        kryo.register (classOf [BasicElement], BasicElementSerializer)
        kryo.register (classOf [Unknown], UnknownSerializer)
        val infos = new CHIM ("").classes
        infos.foreach (info => kryo.register (info.subsetter.runtime_class, info.serializer))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy