Package google.registry.backup
Class CommitLogCheckpointAction
- java.lang.Object
-
- google.registry.backup.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<CommitLogCheckpoint>
createCheckPointAndStartAsyncExport()
Creates aCommitLogCheckpoint
and initiates an asynchronous export task.void
run()
-
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
createCheckPointAndStartAsyncExport
public java.util.Optional<CommitLogCheckpoint> createCheckPointAndStartAsyncExport()
Creates aCommitLogCheckpoint
and initiates an asynchronous export task.- Returns:
- the
CommitLogCheckpoint
to be exported
-
-