Class IXMHooks

java.lang.Object
com.onenetwork.platform.ixm.IXMHooks

public abstract class IXMHooks
extends java.lang.Object
Datasets may optionally provide a subclass of IXMHooks called sptname.sptversion.customAPI.ixm.CustomIXMHooks. If present, this class will be consulted to provide customizations of various IXM Engine behaviors. All methods are no-ops unless overridden.
  • Constructor Summary

    Constructors 
    Constructor Description
    IXMHooks()  
  • Method Summary

    Modifier and Type Method Description
    TaskWriter getCustomTaskWriter​(java.lang.String modulePrefix, java.lang.String engineName, java.lang.String configName, org.json.JSONObject taskFilters)
    Optionally returns a TaskWriter to use in lieu of the engine's default TaskWriter
    java.lang.Runnable getPreTaskGenRunnable​(java.lang.String modulePrefix, java.lang.String engineName, java.lang.String configName, org.json.JSONObject taskFilters)
    Optionally returns a Runnable to invoke (synchronously) just before task generation, or null if this need not be customized.
    void writeEngineFinalizerTasks​(java.lang.Long jobId, java.lang.String modulePrefix, java.lang.String engineName, java.lang.String configName, org.json.JSONObject taskFilters)
    May optionally write GridTasks to the DB to do execute "final" actions when the engine is complete.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getPreTaskGenRunnable

      public java.lang.Runnable getPreTaskGenRunnable​(java.lang.String modulePrefix, java.lang.String engineName, java.lang.String configName, org.json.JSONObject taskFilters)
      Optionally returns a Runnable to invoke (synchronously) just before task generation, or null if this need not be customized. The Runnable may throw a RuntimeException to indicate that the engine execution should not proceed
      Parameters:
      modulePrefix - Module prefix
      engineName - engine name
      taskFilters - task filters provided for this engine in IXMEngineConfig
      configName - unique engine configuration name
      taskFilters - task filters provided for this engine in IXMEngineConfig
      Returns:
      Runnable to invoke (synchronously) just before task generation, or null if this need not be customized
    • getCustomTaskWriter

      public TaskWriter getCustomTaskWriter​(java.lang.String modulePrefix, java.lang.String engineName, java.lang.String configName, org.json.JSONObject taskFilters)
      Optionally returns a TaskWriter to use in lieu of the engine's default TaskWriter
      Parameters:
      modulePrefix - Module prefix
      engineName - engine name
      configName - unique engine configuration name
      taskFilters - task filters provided for this engine in IXMEngineConfig
      Returns:
      TaskWriter implementation if you want a custom TaskWriter for the given engine; return null to use the default TaskWriter
    • writeEngineFinalizerTasks

      public void writeEngineFinalizerTasks​(java.lang.Long jobId, java.lang.String modulePrefix, java.lang.String engineName, java.lang.String configName, org.json.JSONObject taskFilters)
      May optionally write GridTasks to the DB to do execute "final" actions when the engine is complete. Note that all tasks created should set the given jobId as JOB_DEPEND to ensure that they do not execute until the engine's regular tasks are done
      Parameters:
      jobId - outermost job of the overall engine
      modulePrefix - Module prefix
      engineName - engine name
      configName - unique engine configuration name
      taskFilters - task filters provided for this engine in IXMEngineConfig