com.ibm.wsspi.batch.parallel

Class Parameterizer

  1. java.lang.Object
  2. extended bycom.ibm.websphere.grid.spi.SPI
  3. extended bycom.ibm.wsspi.batch.parallel.Parameterizer
All implemented interfaces:
java.lang.Comparable

  1. public abstract class Parameterizer
  2. extends SPI
Parameterizer is the abstract base class for the ParallelJobManager Parameterizer System Programming Interface (SPI). Use the Parameterizer SPI to parameterize a parallel job submission. The parameterization includes specifying the number of subjobs to create for a parallel job and the substitution properties to pass to each subjob.

Implement the Parameterizer SPI, by extending this class and implementing the parameterize method.

Configure this SPI with the following declaration in the xd.spi.properties file:

 spi.parallel.Parameterizer=<fully-qualified implementation class name>
 

Notes:

  1. The xd.spi.properties file is located in:
  2.  <WAS install root>/properties.  E.g.
     
           /WebSphere/AppServer/properties
     
  3. The jar file containing the implementation of this SPI should be stored in:
  4.  <WAS install root>/lib/classes.  E.g.
     
           /WebSphere/AppServer/lib/classes
     

    You are responsible to create the classes directory if it does not already exist.


    Constructor Summary

    Constructor and Description
    Parameterizer()

    Method Summary

    Modifier and Type Method and Description
    1. java.lang.String
    getName()
    1. abstract
    2. com.ibm.wsspi.batch.parallel.Parameters
    parameterize(java.lang.String logicalJobName,java.lang.String logicalTXID,java.util.Properties props)
    Parameterizes a parallel job submission.
    Methods inherited from class com.ibm.websphere.grid.spi.SPI
    compareTo, getInvocationOrder, setInvocationOrder, toString
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Constructor Detail

    Parameterizer

    1. public Parameterizer()

    Method Detail

    parameterize

    1. public abstract com.ibm.wsspi.batch.parallel.Parameters parameterize( java.lang.String logicalJobName,
    2. java.lang.String logicalTXID,
    3. java.util.Properties props)
    Parameterizes a parallel job submission. Parameterization specifies:
    1. number of subjobs to dispatch for this parallel job
    2. substitution properties for each subjob

    This method is invoked by ParallelJobManager at start of parallel job processing.

    Parameters:
    logicalJobName - specifies name of the current parallel job. This name is the same each time you submit the same parallel job.
    logicalTXID - specifies a unique identifier for the current parallel job instance. This identifier defines a logical unit of work in which all subjobs for the current parallel job execute.
    props - specifies the input properties to the parallel job. These properties are user specified, but must include the reserved property, com.ibm.wsspi.batch.parallel.subjob.name, which specifies the name of the job definition (xJCL) in the job repository that serves as the template for all subjob instances belonging to this parallel job. Optional reserved property, com.ibm.wsspi.batch.parallel.logicalTXID, may also be specified to provide an external identifier for the parallel job's logical transaction.
    Returns:
    Parameters object that specifies parameterization for the current parallel job. This includes the number of subjobs to create for this parallel job instance and an array of Properties objects, one per subjob, that contains substitution properties for the target subjob xJCL. The number of elements in this array must equal the specified number of subjobs.

    getName

    1. public java.lang.String getName( )
    Description copied from class: SPI
    Returns the name of this SPI instance. Should return a unique identifier.
    Specified by:
    getName in class SPI