Class CheckpointProperties

  • All Implemented Interfaces:
    Serializable

    public class CheckpointProperties
    extends Object
    implements Serializable
    The configuration of a checkpoint. This describes whether
    • The checkpoint is s regular checkpoint or a savepoint.
    • When the checkpoint should be garbage collected.
    See Also:
    Serialized Form
    • Constructor Detail

      • CheckpointProperties

        public CheckpointProperties​(boolean forced,
                                    SnapshotType checkpointType,
                                    boolean discardSubsumed,
                                    boolean discardFinished,
                                    boolean discardCancelled,
                                    boolean discardFailed,
                                    boolean discardSuspended,
                                    boolean unclaimed)
    • Method Detail

      • isUnclaimed

        public boolean isUnclaimed()
        Returns whether the checkpoint should be restored in a RecoveryClaimMode.NO_CLAIM mode.
      • getCheckpointType

        public SnapshotType getCheckpointType()
        Gets the type of the checkpoint (checkpoint / savepoint).
      • isSavepoint

        public boolean isSavepoint()
        Returns whether the checkpoint properties describe a standard savepoint.
        Returns:
        true if the properties describe a savepoint, false otherwise.
      • isSynchronous

        public boolean isSynchronous()
        Returns whether the checkpoint properties describe a synchronous savepoint/checkpoint.
        Returns:
        true if the properties describe a synchronous operation, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • forSavepoint

        public static CheckpointProperties forSavepoint​(boolean forced,
                                                        SavepointFormatType formatType)
        Creates the checkpoint properties for a (manually triggered) savepoint.

        Savepoints are not queued due to time trigger limits. They have to be garbage collected manually.

        Returns:
        Checkpoint properties for a (manually triggered) savepoint.
      • forCheckpoint

        public static CheckpointProperties forCheckpoint​(CheckpointRetentionPolicy policy)
        Creates the checkpoint properties for a checkpoint.

        Checkpoints may be queued in case too many other checkpoints are currently happening. They are garbage collected automatically, except when the owning job terminates in state JobStatus.FAILED. The user is required to configure the clean up behaviour on job cancellation.

        Returns:
        Checkpoint properties for an external checkpoint.