Top Description Constructors Methods
javax.batch.api.chunk

public abstract Class AbstractCheckpointAlgorithm

extends Object
implements CheckpointAlgorithm
Class Inheritance
All Implemented Interfaces
javax.batch.api.chunk.CheckpointAlgorithm

The AbstractCheckpointAlgorithm provides default implementations of less commonly implemented methods.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
beginCheckpoint()

Implements javax.batch.api.chunk.CheckpointAlgorithm.beginCheckpoint.

Override this method for the CheckpointAlgorithm to do something before a checkpoint interval begins (before the next chunk transaction begins).
public int

Returns:

the timeout interval (expressed in seconds) to use for the next checkpoint interval
checkpointTimeout
()

Implements javax.batch.api.chunk.CheckpointAlgorithm.checkpointTimeout.

Override this method if the CheckpointAlgorithm establishes a checkpoint timeout.
public void
endCheckpoint()

Implements javax.batch.api.chunk.CheckpointAlgorithm.endCheckpoint.

Override this method for the CheckpointAlgorithm to do something after a checkpoint is taken (after the chunk transaction is committed).
public abstract boolean

Returns:

boolean indicating whether or not to checkpoint now.
isReadyToCheckpoint
()

Redeclares javax.batch.api.chunk.CheckpointAlgorithm.isReadyToCheckpoint.

Implement logic in this method to decide if a checkpoint should be taken now.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractCheckpointAlgorithmback to summary
public AbstractCheckpointAlgorithm()

Method Detail

beginCheckpointback to summary
public void beginCheckpoint() throws Exception

Implements javax.batch.api.chunk.CheckpointAlgorithm.beginCheckpoint.

Override this method for the CheckpointAlgorithm to do something before a checkpoint interval begins (before the next chunk transaction begins). The default implementation does nothing.

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.
checkpointTimeoutback to summary
public int checkpointTimeout() throws Exception

Implements javax.batch.api.chunk.CheckpointAlgorithm.checkpointTimeout.

Override this method if the CheckpointAlgorithm establishes a checkpoint timeout. The default implementation returns 0, which means the maximum permissible timeout allowed by the runtime environment.

Returns:int

the timeout interval (expressed in seconds) to use for the next checkpoint interval

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.
endCheckpointback to summary
public void endCheckpoint() throws Exception

Implements javax.batch.api.chunk.CheckpointAlgorithm.endCheckpoint.

Override this method for the CheckpointAlgorithm to do something after a checkpoint is taken (after the chunk transaction is committed). The default implementation does nothing.

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.
isReadyToCheckpointback to summary
public abstract boolean isReadyToCheckpoint() throws Exception

Redeclares javax.batch.api.chunk.CheckpointAlgorithm.isReadyToCheckpoint.

Implement logic in this method to decide if a checkpoint should be taken now.

Returns:boolean

boolean indicating whether or not to checkpoint now.

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.