javax.batch.api.partition

Interface PartitionReducer

  • All Known Implementing Classes:
    AbstractPartitionReducer

    public interface PartitionReducer
    PartitionReducer provides unit of work demarcation across partitions. It is not a JTA transaction; no resources are enlisted. Rather, it provides transactional flow semantics to facilitate finalizing merge or compensation logic.
    • Method Detail

      • beginPartitionedStep

        void beginPartitionedStep()
                           throws Exception
        The beginPartitionedStep method receives control at the start of partition processing. It receives control before the PartitionMapper is invoked and before any partitions are started.
        Throws:
        Exception - is thrown if an error occurs.
      • beforePartitionedStepCompletion

        void beforePartitionedStepCompletion()
                                      throws Exception
        The beforePartitionedStepCompletion method receives control at the end of partitioned step processing. It receives control after all partitions have completed. It does not receive control if the PartitionReducer is rolling back.
        Throws:
        Exception - is thrown if an error occurs.
      • rollbackPartitionedStep

        void rollbackPartitionedStep()
                              throws Exception
        The rollbackPartitionedStep method receives control if the runtime is rolling back a partitioned step. Any partition threads still running are allowed to complete before this method is invoked. This method receives control if any of the following conditions are true:

        1. One or more partitions end with a Batch Status of STOPPED or FAILED.
        2. Any of the following partitioned step callbacks throw an exception:
          1. PartitionMapper
          2. PartitionReducer
          3. PartitionCollector
          4. PartitionAnalyzer
        3. A job with partitioned steps is restarted.
        Throws:
        Exception - is thrown if an error occurs.
      • afterPartitionedStepCompletion

        void afterPartitionedStepCompletion(PartitionReducer.PartitionStatus status)
                                     throws Exception
        The afterPartitionedStepCompletion method receives control at the end of a partition processing. It receives a status value that identifies the outcome of the partition processing. The status string value is either "COMMIT" or "ROLLBACK".
        Parameters:
        status - specifies the outcome of the partitioned step. Values are "COMMIT" or "ROLLBACK".
        Throws:
        Exception - is thrown if an error occurs.

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/batch/api/partition/PartitionReducer.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com, PartitionReducer (Java(TM) EE 7 Specification APIs)

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.