-
- All Known Implementing Classes:
- AbstractCheckpointAlgorithm
public interface CheckpointAlgorithm
CheckpointAlgorithm provides a custom checkpoint policy for chunk steps.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
beginCheckpoint()
The beginCheckpoint method is invoked before the next checkpoint interval begins.int
checkpointTimeout()
The checkpointTimeout is invoked at the beginning of a new checkpoint interval for the purpose of establishing the checkpoint timeout.void
endCheckpoint()
The endCheckpoint method is invoked after the current checkpoint ends.boolean
isReadyToCheckpoint()
The isReadyToCheckpoint method is invoked by the batch runtime after each item processed to determine if now is the time to checkpoint the current chunk.
-
-
-
Method Detail
-
checkpointTimeout
int checkpointTimeout() throws Exception
The checkpointTimeout is invoked at the beginning of a new checkpoint interval for the purpose of establishing the checkpoint timeout. It is invoked before the next checkpoint transaction begins. This method returns an integer value, which is the timeout value that will be used for the next checkpoint transaction. This method is useful to automate the setting of the checkpoint timeout based on factors known outside the job * definition.- Parameters:
timeout
- specifies the checkpoint timeout value for the * next checkpoint interval.- Returns:
- the timeout interval to use for the next checkpoint interval
- Throws:
Exception
- thrown for any errors.
-
beginCheckpoint
void beginCheckpoint() throws Exception
The beginCheckpoint method is invoked before the next checkpoint interval begins.- Throws:
Exception
- thrown for any errors.
-
isReadyToCheckpoint
boolean isReadyToCheckpoint() throws Exception
The isReadyToCheckpoint method is invoked by the batch runtime after each item processed to determine if now is the time to checkpoint the current chunk.- Returns:
- boolean indicating whether or not to checkpoint now.
- Throws:
Exception
- thrown for any errors.
-
-
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/chunk/CheckpointAlgorithm.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
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.