Record Class ProjectCascade

java.lang.Object
java.lang.Record
network.ike.workspace.cascade.ProjectCascade
Record Components:
schema - the manifest schema version (currently 1)
head - true iff this project declares no upstream edge — the cascade head
upstream - edges to the projects this one consumes; the version property each edge pins is derived from G·A via CascadeEdge.versionProperty(); never null
terminal - true iff this project declares no downstream edge — the cascade terminus
downstream - edges to the projects that consume this one; never null

public record ProjectCascade(int schema, boolean head, List<CascadeEdge> upstream, boolean terminal, List<CascadeEdge> downstream) extends Record
One project's own src/main/cascade/release-cascade.yaml — its edges in the IKE release cascade (IKE-Network/ike-issues#420).

The cascade is modelled as a loosely-coupled distributed system: every project version-controls this file in its own git tree and declares only its own upstream and downstream edges. No project authors the global ordering; the full graph is assembled by CascadeAssembler traversing these files.

The head and terminal markers are asserted, not inferred. A project at the head of the cascade has no upstream edge, and one at the end has no downstream edge — but an omitted edge looks identical to a genuine endpoint, so each endpoint must positively declare itself. The canonical constructor rejects a marker that disagrees with the corresponding edge list, turning a forgotten edge into a manifest error rather than an invisible omission.

  • Constructor Details

    • ProjectCascade

      public ProjectCascade(int schema, boolean head, List<CascadeEdge> upstream, boolean terminal, List<CascadeEdge> downstream)
      Canonical constructor — defensively copies the edge lists, substitutes empty lists for null, and verifies the head/terminal markers agree with the edge lists. The per-edge version-property check that the legacy YAML schema needed is gone: every edge derives its canonical G·A version-property from its coordinates, so it is always non-blank (IKE-Network/ike-issues#496).
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • schema

      public int schema()
      Returns the value of the schema record component.
      Returns:
      the value of the schema record component
    • head

      public boolean head()
      Returns the value of the head record component.
      Returns:
      the value of the head record component
    • upstream

      public List<CascadeEdge> upstream()
      Returns the value of the upstream record component.
      Returns:
      the value of the upstream record component
    • terminal

      public boolean terminal()
      Returns the value of the terminal record component.
      Returns:
      the value of the terminal record component
    • downstream

      public List<CascadeEdge> downstream()
      Returns the value of the downstream record component.
      Returns:
      the value of the downstream record component