Top Description Inners Methods
jakarta.batch.api.partition

public Interface PartitionReducer

Known Direct Implementers
jakarta.batch.api.partition.AbstractPartitionReducer

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public void
afterPartitionedStepCompletion(PartitionReducer.PartitionStatus
specifies the outcome of the partitioned step. Values are "COMMIT" or "ROLLBACK".
status
)

The afterPartitionedStepCompletion method receives control at the end of a partition processing.

public void
beforePartitionedStepCompletion()

The beforePartitionedStepCompletion method receives control at the end of partitioned step processing.

public void
beginPartitionedStep()

The beginPartitionedStep method receives control at the start of partition processing.

public void
rollbackPartitionedStep()

The rollbackPartitionedStep method receives control if the runtime is rolling back a partitioned step.

Method Detail

afterPartitionedStepCompletionback to summary
public 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:PartitionReducer.PartitionStatus

specifies the outcome of the partitioned step. Values are "COMMIT" or "ROLLBACK".

Exceptions
Exception:
is thrown if an error occurs.
beforePartitionedStepCompletionback to summary
public 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.

Exceptions
Exception:
is thrown if an error occurs.
beginPartitionedStepback to summary
public 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.

Exceptions
Exception:
is thrown if an error occurs.
rollbackPartitionedStepback to summary
public 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:
    PartitionMapper
    PartitionReducer
    PartitionCollector
    PartitionAnalyzer
  3. A job with partitioned steps is restarted.
Exceptions
Exception:
is thrown if an error occurs.
jakarta.batch.api.partition back to summary

public final Enum PartitionReducer.PartitionStatus

extends Enum<PartitionReducer.PartitionStatus>
Class Inheritance

An enum used in PartitionReducer#afterPartitionedStepCompletion(PartitionStatus).

Field Summary

Modifier and TypeField and Description
public static final PartitionReducer.PartitionStatus
public static final PartitionReducer.PartitionStatus

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PartitionReducer.PartitionStatus
public static PartitionReducer.PartitionStatus[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

COMMITback to summary
public static final PartitionReducer.PartitionStatus COMMIT
ROLLBACKback to summary
public static final PartitionReducer.PartitionStatus ROLLBACK

Constructor Detail

PartitionStatusback to summary
private PartitionStatus()

Method Detail

valueOfback to summary
public static PartitionReducer.PartitionStatus valueOf(String name)
valuesback to summary
public static PartitionReducer.PartitionStatus[] values()