Class FileCheckpointStore
java.lang.Object
com.eqixiac.equinix.design.plan.FileCheckpointStore
- All Implemented Interfaces:
CheckpointStore
A
CheckpointStore that keeps one JSON file per deployment in a directory
(<deployment>.checkpoint.json, the name reduced to file-safe characters). Each save writes
a temporary file and renames it over the old one, so a crash mid-write leaves the previous
checkpoint intact.-
Constructor Summary
ConstructorsConstructorDescriptionFileCheckpointStore(Path directory) Creates a store in a directory (created on first save). -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves a deployment's checkpoint.The file a deployment's checkpoint is kept in.The checkpoint for a deployment, if one was saved.voidsave(Checkpoint checkpoint) Saves (replaces) the checkpoint of its deployment.
-
Constructor Details
-
FileCheckpointStore
Creates a store in a directory (created on first save).- Parameters:
directory- the directory
-
-
Method Details
-
fileFor
-
load
Description copied from interface:CheckpointStoreThe checkpoint for a deployment, if one was saved. Checkpoints are keyed by deployment name, not plan id, so an edited plan (a new plan id) still sees what earlier runs created.- Specified by:
loadin interfaceCheckpointStore- Parameters:
deploymentName- the plan's deployment name- Returns:
- the checkpoint, or empty
-
save
Description copied from interface:CheckpointStoreSaves (replaces) the checkpoint of its deployment.- Specified by:
savein interfaceCheckpointStore- Parameters:
checkpoint- the checkpoint
-
delete
Description copied from interface:CheckpointStoreRemoves a deployment's checkpoint.- Specified by:
deletein interfaceCheckpointStore- Parameters:
deploymentName- the deployment name
-