Record Class LiveGraphSnapshot
LiveGraphState at a point in time.
Consumers must treat every collection here as read-only.
enclosingIdsByNodeId and hideFromViewBlockStartIds are the live concurrent
structures from the underlying state — the CPS VM thread continues to write to them while
the snapshot is in use. Iteration is safe (weakly consistent), mutation is not.
enclosingIdsByNodeId carries each captured node's ancestor chain so graph
construction can resolve parentage without touching the execution's FlowNode storage.
hideFromViewBlockStartIds is the set of hideFromView block-start IDs,
so callers can derive a step's "hidden" flag by intersecting with the step's enclosing IDs.
activeNodeIds contains the IDs of all nodes considered "active" at snapshot
time: the execution's current heads plus every enclosing block start. Status resolution
reads liveness from this set.
version is a monotonic counter that bumps on every new flow node, so callers
can use it as a cache key for computed DTOs.
-
Constructor Summary
ConstructorsConstructorDescriptionLiveGraphSnapshot(List<org.jenkinsci.plugins.workflow.graph.FlowNode> nodes, List<org.jenkinsci.plugins.workflow.graph.FlowNode> workspaceNodes, Map<String, List<String>> enclosingIdsByNodeId, Set<String> hideFromViewBlockStartIds, Set<String> activeNodeIds, long version) Creates an instance of aLiveGraphSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveNodeIdsrecord component.Returns the value of theenclosingIdsByNodeIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehideFromViewBlockStartIdsrecord component.List<org.jenkinsci.plugins.workflow.graph.FlowNode> nodes()Returns the value of thenodesrecord component.final StringtoString()Returns a string representation of this record class.longversion()Returns the value of theversionrecord component.List<org.jenkinsci.plugins.workflow.graph.FlowNode> Returns the value of theworkspaceNodesrecord component.
-
Constructor Details
-
LiveGraphSnapshot
public LiveGraphSnapshot(List<org.jenkinsci.plugins.workflow.graph.FlowNode> nodes, List<org.jenkinsci.plugins.workflow.graph.FlowNode> workspaceNodes, Map<String, List<String>> enclosingIdsByNodeId, Set<String> hideFromViewBlockStartIds, Set<String> activeNodeIds, long version) Creates an instance of aLiveGraphSnapshotrecord class.- Parameters:
nodes- the value for thenodesrecord componentworkspaceNodes- the value for theworkspaceNodesrecord componentenclosingIdsByNodeId- the value for theenclosingIdsByNodeIdrecord componenthideFromViewBlockStartIds- the value for thehideFromViewBlockStartIdsrecord componentactiveNodeIds- the value for theactiveNodeIdsrecord componentversion- the value for theversionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
nodes
Returns the value of thenodesrecord component.- Returns:
- the value of the
nodesrecord component
-
workspaceNodes
Returns the value of theworkspaceNodesrecord component.- Returns:
- the value of the
workspaceNodesrecord component
-
enclosingIdsByNodeId
Returns the value of theenclosingIdsByNodeIdrecord component.- Returns:
- the value of the
enclosingIdsByNodeIdrecord component
-
hideFromViewBlockStartIds
Returns the value of thehideFromViewBlockStartIdsrecord component.- Returns:
- the value of the
hideFromViewBlockStartIdsrecord component
-
activeNodeIds
Returns the value of theactiveNodeIdsrecord component.- Returns:
- the value of the
activeNodeIdsrecord component
-
version
public long version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-