Class InMemoryCheckpointStore

java.lang.Object
com.eqixiac.equinix.design.plan.InMemoryCheckpointStore
All Implemented Interfaces:
CheckpointStore

public final class InMemoryCheckpointStore extends Object implements CheckpointStore
A CheckpointStore held in memory: survives an aborted run, not a crashed JVM. Thread-safe.
  • Constructor Details

    • InMemoryCheckpointStore

      public InMemoryCheckpointStore()
      Creates an empty store.
  • Method Details

    • load

      public Optional<Checkpoint> load(String deploymentName)
      Description copied from interface: CheckpointStore
      The 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:
      load in interface CheckpointStore
      Parameters:
      deploymentName - the plan's deployment name
      Returns:
      the checkpoint, or empty
    • save

      public void save(Checkpoint checkpoint)
      Description copied from interface: CheckpointStore
      Saves (replaces) the checkpoint of its deployment.
      Specified by:
      save in interface CheckpointStore
      Parameters:
      checkpoint - the checkpoint
    • delete

      public void delete(String deploymentName)
      Description copied from interface: CheckpointStore
      Removes a deployment's checkpoint.
      Specified by:
      delete in interface CheckpointStore
      Parameters:
      deploymentName - the deployment name