io.ray.streaming.api.function.impl.SourceFunction Maven / Gradle / Ivy
package io.ray.streaming.api.function.impl;
import io.ray.streaming.api.function.Function;
/**
* Interface of Source functions.
*
* @param Type of the data output by the source.
*/
public interface SourceFunction extends Function {
void init(int parallel, int index);
void run(SourceContext ctx) throws Exception;
void close();
interface SourceContext {
void collect(T element) throws Exception;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy