Record Class ReleaseCascade

java.lang.Object
java.lang.Record
network.ike.workspace.cascade.ReleaseCascade
Record Components:
repos - cascade nodes in topological order; never null

public record ReleaseCascade(List<CascadeRepo> repos) extends Record
The assembled IKE release cascade graph — the full cross-repo release ordering, stitched from the per-project release-cascade.yaml manifests by CascadeAssembler (IKE-Network/ike-issues#402, #420).

No project authors this ordering. Each project version-controls only its own upstream/downstream edges; the assembler traverses those edges and topologically orders the result. The repos() list is that order: a node always follows every node it consumes.

Helper methods answer the questions the release goals ask:

Identity is the groupId:artifactId pair, NOT groupId alone. Foundation members can share a groupId (e.g., network.ike.tooling:ike-tooling and network.ike.tooling:ike-workspace-extension both live under the same group but are independent cascade heads with different downstream edges). Lookups take the GA string ("groupId:artifactId") — see CascadeRepo.ga() — or both coordinates explicitly via findByCoordinates(String, String) (IKE-Network/ike-issues#466).

  • Constructor Details

    • ReleaseCascade

      public ReleaseCascade(List<CascadeRepo> repos)
      Canonical constructor — defensively copies repos and substitutes an empty list for null.
  • Method Details

    • find

      public Optional<CascadeRepo> find(String ga)
      Looks up a cascade node by its "groupId:artifactId" GA string.
      Parameters:
      ga - the CascadeRepo.ga() of the node to find
      Returns:
      the matching node, or empty if ga is not a cascade member
    • findByCoordinates

      public Optional<CascadeRepo> findByCoordinates(MavenCoordinate coordinate)
      Looks up a cascade node by exact MavenCoordinate.
      Parameters:
      coordinate - the project's coordinate
      Returns:
      the matching node, or empty if the coordinate is not a cascade member
    • findByCoordinates

      public Optional<CascadeRepo> findByCoordinates(String groupId, String artifactId)
      Convenience overload — wraps the two-String pair into a MavenCoordinate and delegates.
      Parameters:
      groupId - the project's groupId
      artifactId - the project's artifactId
      Returns:
      the matching node, or empty if the coordinates are not a cascade member
    • contains

      public boolean contains(String ga)
      Tests whether a ga participates in the cascade.
      Parameters:
      ga - the CascadeRepo.ga() to test
      Returns:
      true if ga is a cascade member
    • downstreamOf

      public List<CascadeRepo> downstreamOf(String ga)
      Returns the cascade members reachable downstream of ga, in cascade (topological) order.

      These are exactly the repos that go stale when ga is released: each one consumes, directly or through an intermediate, its artifacts. The traversal follows the downstream edges of each node.

      Parameters:
      ga - the CascadeRepo.ga() that was (or will be) released
      Returns:
      downstream nodes in release order; empty if ga has no consumers or is not a member
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • repos

      public List<CascadeRepo> repos()
      Returns the value of the repos record component.
      Returns:
      the value of the repos record component