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

io.wavebeans.execution.medium.PlainMedium.kt Maven / Gradle / Ivy

package io.wavebeans.execution.medium

class PlainMediumBuilder : MediumBuilder {
    override fun from(objects: List): Medium = PlainMedium(objects)
}

/**
 * [Medium] for multi-threaded execution. It just keeps the objects intact for transferring over Pod lines.
 */
class PlainMedium(val items: List) : Medium {

    override fun extractElement(at: Int): Any? {
        return if (at < items.size) items[at] else null
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy