Class AbstractTaskPerformer

java.lang.Object
com.onenetwork.platform.grid.AbstractTaskPerformer
All Implemented Interfaces:
TaskPerformer

public abstract class AbstractTaskPerformer
extends java.lang.Object
implements TaskPerformer
Abstract implementation of TaskPerformer which is recommended as the base for all clients. It gives access to additional properties not available to simple direct TaskPerformer implementations, such as GridTaskContext.
  • Constructor Details

  • Method Details

    • addToFailTransaction

      public void addToFailTransaction​(java.lang.String taskParams, java.lang.String taskInput, java.lang.String reason)
      Default implementation does nothing.
      Specified by:
      addToFailTransaction in interface TaskPerformer
      Parameters:
      taskParams - parameters supplied when task was created
      taskInput - the output of the task this task depends on
      reason - a description of what caused the task to fail
    • addToRetryTransaction

      public void addToRetryTransaction​(java.lang.String taskParams, java.lang.String taskInput, java.lang.String reason)
      Default implementation does nothing.
      Specified by:
      addToRetryTransaction in interface TaskPerformer
      Parameters:
      taskParams - parameters supplied when task was created
      taskInput - the output of the task this task depends on
      reason - a description of what caused the task to retry
    • setGridTaskContext

      public void setGridTaskContext​(GridTaskContext gridTaskContext)
      Sets the GridTaskContext on this performer.
    • getGridTaskContext

      protected GridTaskContext getGridTaskContext()
      Returns a GridTaskContext which provides additional information about the GridTask currently being executed.
      Returns:
      gridTaskContext
    • setTaskPerformerConfig

      public void setTaskPerformerConfig​(TaskPerformerConfig taskPerformerConfig)
      Description copied from interface: TaskPerformer
      Sets the TaskPerformerConfig on this task performer. This includes any parameterization of the behavior of this performer specified in that configuration
      Specified by:
      setTaskPerformerConfig in interface TaskPerformer
      Parameters:
      taskPerformerConfig - configuration for this task performer
    • getTaskPerformerConfig

      public TaskPerformerConfig getTaskPerformerConfig()
      Description copied from interface: TaskPerformer
      Returns the TaskPerformerConfig for this task performer. This includes any parameterization of the behavior of this performer specified in that configuration.
      Specified by:
      getTaskPerformerConfig in interface TaskPerformer
      Returns:
      TaskPerformerConfig for this task performer