com.ibm.wsspi.batch.parallel.status

Class SubJobAnalyzer

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

  1. public abstract class SubJobAnalyzer
  2. extends SPI
SubJobAnalyzer is the abstract base class for the ParallelJobManager SubJobAnalyzer System Programming Interface (SPI). Use the SubJobAnalyzer to receive and process information about subjobs. The SubJobAnalyzer receives the following subjob information:
  1. Subjob return code for completed subjobs.
  2. Data collected during subjob execution for SubJobCollector SPI

The SubJobAnalyzer SPI can additionally set the final return code for a parallel job.

Implement the SubJobAnalyzer SPI, by extending this class and implementing the analyze methods.

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

 spi.parallel.status.SubJobAnalyzer=<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 for creating the classes directory if it does not already exist.


    Constructor Summary

    Constructor and Description
    SubJobAnalyzer()

    Method Summary

    Modifier and Type Method and Description
    1. abstract
    2. void
    analyze(java.lang.String logicalJobName,java.lang.String logicalTXID,java.lang.String subJobID,java.io.Externalizable subJobData)
    Analyzes data collected from a running subjob.
    1. abstract
    2. void
    analyze(java.lang.String logicalJobName,java.lang.String logicalTXID,java.lang.String subJobID,int subJobReturnCode)
    Analyzes subjob return code.
    1. java.lang.String
    getName()
    1. abstract
    2. int
    getReturnCode(java.lang.String logicalJobName,java.lang.String logicalTXID)
    Returns the final return code for the specified parallel job.
    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

    SubJobAnalyzer

    1. public SubJobAnalyzer()

    Method Detail

    analyze

    1. public abstract void analyze(java.lang.String logicalJobName,
    2. java.lang.String logicalTXID,
    3. java.lang.String subJobID,
    4. java.io.Externalizable subJobData)
    5. throws com.ibm.wsspi.batch.parallel.logicalTX.RollbackLogicalTXException
    Analyzes data collected from a running subjob. This method is called by the ParallelJobManager asynchronously as the SubJobCollector SPI collects subjob data. Order of this method getting invoked in relationship to order in which data is collected from subjobs is not guaranteed. This method may force logical transaction to rollback by throwing RollBackLogicalTXException.
    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.
    subJobID - specifies the unique identifier of a subjob belonging to the current parallel job.
    subJobData - specifies the subjob data collected for the specified subjob.
    Throws:
    com.ibm.wsspi.batch.parallel.logicalTX.RollbackLogicalTXException

    analyze

    1. public abstract void analyze(java.lang.String logicalJobName,
    2. java.lang.String logicalTXID,
    3. java.lang.String subJobID,
    4. int subJobReturnCode)
    5. throws com.ibm.wsspi.batch.parallel.logicalTX.RollbackLogicalTXException
    Analyzes subjob return code. This method is called by the ParallelJobManager asynchronously as subjobs complete. Order of this method getting invoked in relationship to order in which subjobs complete is not guaranteed. This method may force logical transaction to rollback by throwing RollBackLogicalTXException.
    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.
    subJobID - specifies the unique identifier of a subjob belonging to the current parallel job.
    subJobReturnCode - specifies the return code from the specified subjob.
    Throws:
    com.ibm.wsspi.batch.parallel.logicalTX.RollbackLogicalTXException

    getReturnCode

    1. public abstract int getReturnCode( java.lang.String logicalJobName,
    2. java.lang.String logicalTXID)
    3. throws com.ibm.wsspi.batch.parallel.logicalTX.RollbackLogicalTXException
    Returns the final return code for the specified parallel job. Called by the ParallelJobManager immediately before the parallel job ends. This method may force logical transaction to rollback by throwing RollBackLogicalTXException.
    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.
    Returns:
    Return code for specified parallel job.
    Throws:
    com.ibm.wsspi.batch.parallel.logicalTX.RollbackLogicalTXException

    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