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

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 parallelism, int index);

  void fetch(SourceContext ctx) throws Exception;

  void close();

  interface SourceContext {

    void collect(T element) throws Exception;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy