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

ai.h2o.mojos.runtime.transforms.MojoTransformBuilderFactory Maven / Gradle / Ivy

There is a newer version: 2.8.7.1
Show newest version
package ai.h2o.mojos.runtime.transforms;

import ai.h2o.mojos.runtime.api.backend.ReaderBackend;
import ai.h2o.mojos.runtime.frame.MojoFrameMeta;
import java.util.Map;

/**
 * Binds a custom transformer to a unique name, by which it can be referenced from within mojo2 file.
 * Every custom transformer must define a class implementing this interface.
 * That class must be registered using {@link java.util.ServiceLoader} mechanism (= listed in META-INF/services/ai.h2o.mojos.runtime.transforms.MojoTransformBuilderFactory resource).
 */
public interface MojoTransformBuilderFactory {

  /**
   * Identification of custom transformer.
   *
   * Used to identify transformer instantiator when loading from ProtoBuf state.
   * Must be unique per JVM.
   *
   * @return unique identification of the builder (default is canonical class name)
   */
  String transformerName();

  /**
   * Instantiate a transformation builder.
   *
   * @param meta
   * @param iindcies
   * @param oindices
   * @param params parameters of the custom transformer
   * @param backend  reader backend to read content of stateFile
   * @return a new transformation builder
   */
  MojoTransform createBuilder(MojoFrameMeta meta,
                              int[] iindcies, int[] oindices,
                              Map params,
                              ReaderBackend backend);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy