Record Class Checkpoint
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.plan.Checkpoint
- Record Components:
planId- the plan id (PlanJson.planId) the checkpoint belongs todeploymentName- the plan's deployment namesteps- the completed steps, by key, in completion orderupdatedAt- when the checkpoint was last written
public record Checkpoint(String planId, String deploymentName, Map<String, CompletedStep> steps, Instant updatedAt)
extends Record
The progress of one plan's execution: every step known to exist, by logical key. Written by
reconcile and execute after every step (immediately after a create is accepted, before waiting for
it to provision), so a crashed or aborted run resumes without creating duplicates.
Immutable; with(CompletedStep, Instant) and without(String, Instant) return new instances.
-
Constructor Summary
ConstructorsConstructorDescriptionCheckpoint(String planId, String deploymentName, Map<String, CompletedStep> steps, Instant updatedAt) Makesstepsimmutable, keeping its order. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeploymentNamerecord component.static CheckpointAn empty checkpoint for a plan.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.planId()Returns the value of theplanIdrecord component.The recorded step for a key.steps()Returns the value of thestepsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.with(CompletedStep step, Instant now) This checkpoint with one step added or replaced.This checkpoint with one step removed (after a confirmed rollback delete).
-
Constructor Details
-
Checkpoint
-
-
Method Details
-
empty
An empty checkpoint for a plan.- Parameters:
planId- the plan iddeploymentName- the deployment name- Returns:
- a checkpoint with no step
-
step
The recorded step for a key.- Parameters:
key- the logical key- Returns:
- the step, or empty
-
with
This checkpoint with one step added or replaced.- Parameters:
step- the stepnow- the write time- Returns:
- a new checkpoint
-
without
This checkpoint with one step removed (after a confirmed rollback delete).- Parameters:
key- the logical keynow- the write time- Returns:
- a new checkpoint
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
planId
-
deploymentName
Returns the value of thedeploymentNamerecord component.- Returns:
- the value of the
deploymentNamerecord component
-
steps
-
updatedAt
-