Record Class WalkPass
java.lang.Object
java.lang.Record
build.jenesis.repository.walk.WalkPass
public record WalkPass(long generation, Instant started, List<String> roots, int segments, int done, WalkPass.Status status)
extends Record
One walk pass as recorded in the consumer's manifest (
walks/<consumer>/manifest): a monotonically
increasing generation (the pass id every segment claim embeds, so a stale segment object from an earlier pass is
recognisably reclaimable), the roots the pass enumerates, when it started, how its segments stand, and whether it
is still running. The pass is complete when every segment is done; the last finisher flips the manifest, and the
next ArtifactWalk.walk(ArtifactStore, String, List, ArtifactWalk.KeyVisitor) then starts generation + 1.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA pass is running until its last segment is done. -
Constructor Summary
ConstructorsConstructorDescriptionWalkPass(long generation, Instant started, List<String> roots, int segments, int done, WalkPass.Status status) Creates an instance of aWalkPassrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancomplete()Whether the pass has enumerated everything - theonPassCompletedmoment for a consumer that commits or compacts at pass end.intdone()Returns the value of thedonerecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.roots()Returns the value of therootsrecord component.intsegments()Returns the value of thesegmentsrecord component.started()Returns the value of thestartedrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WalkPass
public WalkPass(long generation, Instant started, List<String> roots, int segments, int done, WalkPass.Status status) Creates an instance of aWalkPassrecord class.- Parameters:
generation- the value for thegenerationrecord componentstarted- the value for thestartedrecord componentroots- the value for therootsrecord componentsegments- the value for thesegmentsrecord componentdone- the value for thedonerecord componentstatus- the value for thestatusrecord component
-
-
Method Details
-
complete
public boolean complete()Whether the pass has enumerated everything - theonPassCompletedmoment for a consumer that commits or compacts at pass end. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
generation
public long generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
started
Returns the value of thestartedrecord component.- Returns:
- the value of the
startedrecord component
-
roots
-
segments
public int segments()Returns the value of thesegmentsrecord component.- Returns:
- the value of the
segmentsrecord component
-
done
public int done()Returns the value of thedonerecord component.- Returns:
- the value of the
donerecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-