Interface TaskPerformerConfig


public interface TaskPerformerConfig
Describes the TaskPerformerConfig associated with a particular task type. This is normally done through dvce-app-config.xml and varies by each Platform node in a cluster.

TaskPerformConfig can be manually created using GridService.newTaskPerformerConfig(). After populating valid values, threads can be started for the config using GridService.startTaskPerformerThreads(TaskPerformerConfig) for test purpose. After the tests are done, can stop the threads using TaskPerformerThread.halt().

Or TaskPerformerConfig can be defined in the dvce-app-config.xml for threads to be stared at server startup. Valid examples are

 <TaskPerformerConfig>
    <Type>NoOp</Type>
    <NumberOfThreads>1</NumberOfThreads>
    <TaskPerformerClassName>com.transcendsys.platform.base.grid.taskperformer.NoOp</TaskPerformerClassName>
 </TaskPerformerConfig>
 
 <TaskPerformerConfig>
    <Type>NoOp</Type>
    <NumberOfThreads>1</NumberOfThreads>
    <TaskPerformerClassName>com.transcendsys.platform.base.grid.taskperformer.NoOp</TaskPerformerClassName>
 </TaskPerformerConfig>
 
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getEnterpriseContext()
    Enterprise context to use when instantiating the TaskPerformer class ...
    int getNumberOfThreads()
    Returns the number of threads available to process this task type on this node.
    java.util.List<java.lang.String> getParam()
    User-provided parameters to configure the task performer behavior.
    java.util.List<QueueRef> getQueues()
    If this list is non-empty, it indicates that this task performer should only handle Tasks which are associated with the given message queues.
    java.lang.String getTaskPerformerClassName()
    Fully-qualified name of the TaskPerformer implementation class.
    java.lang.String getType()
    Returns the task type
    void setNumberOfThreads​(int numberOfThreads)
    Sets the number of threads to be created to process this task type
    void setTaskPerformerClassName​(java.lang.String taskPerformerClassName)
    Sets the fully-qualified name of the TaskPerformer implementation class.
    void setType​(java.lang.String type)
    Set the task type
  • Method Details

    • getType

      java.lang.String getType()
      Returns the task type
      Returns:
      task type
    • setType

      void setType​(java.lang.String type)
      Set the task type
      Parameters:
      type -
    • getNumberOfThreads

      int getNumberOfThreads()
      Returns the number of threads available to process this task type on this node.
      Returns:
      the number of threads available to process this task type on this node
    • setNumberOfThreads

      void setNumberOfThreads​(int numberOfThreads)
      Sets the number of threads to be created to process this task type
      Parameters:
      numberOfThreads - to be created to process the task
    • getTaskPerformerClassName

      java.lang.String getTaskPerformerClassName()
      Fully-qualified name of the TaskPerformer implementation class.
      Returns:
      fully-qualified name of the TaskPerformer implementation class
    • setTaskPerformerClassName

      void setTaskPerformerClassName​(java.lang.String taskPerformerClassName)
      Sets the fully-qualified name of the TaskPerformer implementation class.
      Parameters:
      taskPerformerClassName -
    • getQueues

      java.util.List<QueueRef> getQueues()
      If this list is non-empty, it indicates that this task performer should only handle Tasks which are associated with the given message queues.
      Returns:
      if this list is non-empty, it indicates that this task performer should only handle Tasks which are associated with the given message queues.
    • getParam

      java.util.List<java.lang.String> getParam()
      User-provided parameters to configure the task performer behavior.
      Returns:
      user-provided parameters to configure the task performer behavior.
    • getEnterpriseContext

      java.lang.String getEnterpriseContext()
      Enterprise context to use when instantiating the TaskPerformer class ... used primarily for EPT TaskPerformers.
      Returns:
      Enterprise context to use when instantiating the TaskPerformer class