Class CommitLogCheckpointAction

  • All Implemented Interfaces:
    java.lang.Runnable

    public final class CommitLogCheckpointAction
    extends java.lang.Object
    implements java.lang.Runnable
    Action that saves commit log checkpoints to Datastore and kicks off a diff export task.

    We separate computing and saving the checkpoint from exporting it because the export to GCS is retryable but should not require the computation of a new checkpoint. Saving the checkpoint and enqueuing the export task are done transactionally, so any checkpoint that is saved will be exported to GCS very soon.

    This action's supported method is GET rather than POST because it gets invoked via cron.

    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • createCheckPointAndStartAsyncExport

        public java.util.Optional<CommitLogCheckpoint> createCheckPointAndStartAsyncExport()
        Creates a CommitLogCheckpoint and initiates an asynchronous export task.
        Returns:
        the CommitLogCheckpoint to be exported